Skip to content

Promote reader saved views search - #23

Merged
maniczko merged 1 commit into
mainfrom
codex/issue-11-p2-ux-006-search-saved-views
May 25, 2026
Merged

Promote reader saved views search#23
maniczko merged 1 commit into
mainfrom
codex/issue-11-p2-ux-006-search-saved-views

Conversation

@maniczko

Copy link
Copy Markdown
Owner

Summary

  • Promotes reader search + saved views into a first-class retrieval surface in the browse view.
  • Keeps the implementation on existing /api/v1/workspace/saved-searches: saved views persist query + default_view; source/category, read scope, sort, and queue mode stay visible as scope chips and URL state.
  • Removes the duplicate saved-view rail block and old context panel so active filters appear once, inside the retrieval surface.
  • Wires the existing / keyboard shortcut to the actual search input via searchInputRef.

UX / Design Gate

  • Layout brief applied: one retrieval panel before queue controls; search is primary, scope chips are secondary, saved views are return paths, queue controls stay below.
  • Visual score: 9/10 for this slice. Duplicate chip panel was removed after screenshot review to reduce clutter.
  • Screenshot evidence:
    • output/playwright/reader-saved-views-smoke.png
    • output/playwright/page-audit-read-inbox-desktop-1180.png
    • output/playwright/page-audit-read-inbox-tablet-1024.png
    • output/playwright/page-audit-read-inbox-mobile-390.png

Validation

  • npm ci passed; 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-routes passed.
  • npm run test:unit:web -- reader-search-saved-views reader-browse-view passed after final copy change.
  • npm run build passed after final copy change.
  • npm run test:unit:web passed after final copy change: 43 files, 183 tests.
  • Browser smoke node output/playwright/reader-saved-views-smoke-runner.mjs passed: search -> save view -> clear -> reopen saved view -> refresh.
  • npm run check:reader passed.
  • npm run check:layout passed.
  • git diff --check and git diff --cached --check passed with only CRLF normalization warnings.

Residual Risk

  • Manual screen-reader signoff was not performed; automated browser smoke and reader focus/a11y snapshots are green.
  • v1 saved views still persist only query and default_view; richer persisted source/category/sort/read filters would require an explicit API/schema contract change.

Closes #11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +859 to +860
return !savedSearches.some(
(search) => search.query.trim().toLowerCase() === query.toLowerCase() && search.default_view === libraryView,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@maniczko
maniczko merged commit 2f69f6f into main May 25, 2026
1 check passed
@maniczko
maniczko deleted the codex/issue-11-p2-ux-006-search-saved-views branch May 25, 2026 14:42

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

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.

[P2-UX-006] Promote search and saved views into a first-class retrieval surface

1 participant