Skip to content

Enhance Dockerfile and Vite configuration for library integration; re… - #608

Merged
tenkus47 merged 6 commits into
developfrom
library_direct_call
Sep 10, 2026
Merged

tenkus47 merged 6 commits into
developfrom
library_direct_call

Conversation

@tenkus47

Copy link
Copy Markdown
Member

…factor API calls to use library service. Update environment variables for library API and adjust Nginx configuration for proxying library requests. Modify tests to mock new library service functions.

…factor API calls to use library service. Update environment variables for library API and adjust Nginx configuration for proxying library requests. Modify tests to mock new library service functions.
@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR is not yet safe to merge because searches with more than 100 openable matches still hide all results beyond the adapter's fixed upstream window.

Findings

  1. P1 Search window truncates pagination
Fix with agent prompt
### Issue 1
src/services/library/search.ts:287
When an exact search has more than 100 openable segment matches, `multilingualSearch` fetches only the first 100 without forwarding the requested offset, paginates that truncated set locally, and calculates `total` from it. Results after the first 100 therefore remain unreachable, and a direct request with `skip` at or above 100 returns no sources despite additional matches.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

  • Adds the library API client, adapters, mappers, and associated tests.
  • Routes browser library requests through Vite and Nginx proxies.
  • Refactors chapter, resource, collection, text, and search views to use the library service.
  • Calculates search page counts from match totals rather than grouped sources.

Diagram

sequenceDiagram
  participant UI as Sources UI
  participant Adapter as multilingualSearch
  participant API as Library content search
  UI->>Adapter: "query, skip, limit=10"
  Adapter->>API: "query, limit=100"
  API-->>Adapter: first 100 hits
  Adapter->>Adapter: filter, group, slice(skip, skip+10)
  Adapter-->>UI: sources, total within first 100
  UI->>UI: derive page count from truncated total
Loading

Reviews (7) · Last reviewed commit: "Refactor layout and styling in Home, Par..."

Comment thread env/.env.development Outdated
Comment thread src/services/library/search.ts
…development; enhance segment handling in library service with new functions for fetching related segments and text commentaries. Improve tests for segment relations and ensure accurate counts for translations and commentaries.
…lback options; update environment variables for backend and library services. Enhance pagination logic in Sources component to accurately reflect total matches across pages and improve related tests.
@tenkus47
tenkus47 requested a review from Tech-lo September 10, 2026 12:55
…re in chapter components by adding type and reference fields. Integrate ResourceState component for loading and error handling in related texts, root texts, and translation views. Refactor API calls to cache text metadata for improved performance and update tests to reflect new segment structure.
…ce footer behavior for the home page with hover effects, and introduce marquee animation for partner logos. Update tests for footer functionality and adjust series card display in plan viewer. Refactor sections in JoinableGroups and PresetMantras to use SectionHeading for improved consistency.
…ponents for improved responsiveness and visual consistency. Adjust height and spacing properties to enhance overall design.
@tenkus47
tenkus47 merged commit 53b940d into develop Sep 10, 2026
10 of 11 checks passed
@tenkus47
tenkus47 deleted the library_direct_call branch September 10, 2026 16:23
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

const raw = await fetchContentSearch({
query: params.query,
search_type: searchType,
limit: MAX_EXTERNAL_SEARCH_LIMIT,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Search window truncates pagination

When an exact search has more than 100 openable segment matches, multilingualSearch fetches only the first 100 without forwarding the requested offset, paginates that truncated set locally, and calculates total from it. Results after the first 100 therefore remain unreachable, and a direct request with skip at or above 100 returns no sources despite additional matches.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/services/library/search.ts
Line: 287

Comment:
**Search window truncates pagination**

When an exact search has more than 100 openable segment matches, `multilingualSearch` fetches only the first 100 without forwarding the requested offset, paginates that truncated set locally, and calculates `total` from it. Results after the first 100 therefore remain unreachable, and a direct request with `skip` at or above 100 returns no sources despite additional matches.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants