Promote reader saved views search - #23
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b9197d373
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rankingExplanations={rankingExplanations} | ||
| canSaveCurrentSearch={canSaveCurrentSearch} | ||
| savedViewChips={savedViewChips} | ||
| savingSavedView={workspaceBusy} |
There was a problem hiding this comment.
Decouple saved-view loading state from global workspace busy
Passing workspaceBusy as savingSavedView makes the "Zapisz widok" control show Zapisuję... and become disabled during unrelated operations (for example tag/annotation/collection mutations that also toggle workspaceBusy), so users can be blocked from saving a search even when no saved-view request is running. This should use a dedicated pending flag scoped to handleCreateSavedSearch to avoid misleading status and unnecessary lockout in the reader retrieval surface.
Useful? React with 👍 / 👎.
| return !savedSearches.some( | ||
| (search) => search.query.trim().toLowerCase() === query.toLowerCase() && search.default_view === libraryView, |
There was a problem hiding this comment.
Align saved-query dedupe with active-chip matching
The new dedupe check disables saving when a saved query matches case-insensitively, but chip activation still uses exact string equality; with input like money.pl vs saved Money.pl, "Zapisz widok" is disabled while no saved view appears active. That creates contradictory UI state and makes it unclear which view already exists; use the same normalization rule for both checks.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Code Review
This pull request refactors the reader's search and saved views interface by introducing a consolidated ReaderSearchSavedViews component. This change replaces the previous toolbar-based search and context panel with a dedicated "retrieval surface" that integrates search input, active scope chips, result counts, and saved view management. The update includes corresponding CSS styling, unit tests for the new component, and documentation outlining the design principles for this unified retrieval UI. I have no feedback to provide as there were no review comments to evaluate.
Summary
/api/v1/workspace/saved-searches: saved views persistquery+default_view; source/category, read scope, sort, and queue mode stay visible as scope chips and URL state./keyboard shortcut to the actual search input viasearchInputRef.UX / Design Gate
output/playwright/reader-saved-views-smoke.pngoutput/playwright/page-audit-read-inbox-desktop-1180.pngoutput/playwright/page-audit-read-inbox-tablet-1024.pngoutput/playwright/page-audit-read-inbox-mobile-390.pngValidation
npm cipassed; existing audit output still reports 4 vulnerabilities, no dependency changes made.npm run test:unit:web -- reader-search-saved-views reader-browse-view channel-lab-presenters app-routespassed.npm run test:unit:web -- reader-search-saved-views reader-browse-viewpassed after final copy change.npm run buildpassed after final copy change.npm run test:unit:webpassed after final copy change: 43 files, 183 tests.node output/playwright/reader-saved-views-smoke-runner.mjspassed: search -> save view -> clear -> reopen saved view -> refresh.npm run check:readerpassed.npm run check:layoutpassed.git diff --checkandgit diff --cached --checkpassed with only CRLF normalization warnings.Residual Risk
queryanddefault_view; richer persisted source/category/sort/read filters would require an explicit API/schema contract change.Closes #11