redesign(documents): declutter search command centre results#501
Conversation
- Compact "Also in your library" into a slim chip row (opt-in compact variant of CrossModeLinksStrip; answer surface keeps existing cards) - Remove the decorative inner icon sidebar (dead chrome, no handlers) - Make the category rail a real source-category filter with live counts, mirrored as chips below xl - De-noise the results table: single evidence badge with page, no chunk slugs or negative pills, one review line, labeled accent Open button, meta line without mid-word truncation - Distinct Best match badge (filled accent + sparkles) with gradient featured-row wash; align mobile cards with the same treatment - Drop disabled "coming soon" header controls; results count on all breakpoints Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…design-d50902 # Conflicts: # src/components/clinical-dashboard/cross-mode-links.tsx # src/components/master-document-flow-mockups.tsx
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughChangesThe PR adds a compact cross-mode link presentation and refreshes the master document search mockup by removing sidebar infrastructure, simplifying controls, and updating mobile and desktop result layouts. Document Search UI
Estimated code review effort: 3 (Moderate) | ~25 minutes Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (9 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4612c1091
ℹ️ 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".
The compact chip's trailing search button re-runs the query in the target mode; it must not emit a cross_mode_link_open (a detail-page open) like the title link does. Matches the card variant and prevents false interaction events polluting retrieval-quality/click telemetry on the documents search page. Addresses PR #501 review (P2). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/master-document-flow-mockups.tsx (1)
719-725: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDo not expose no-op evidence filters.
The
QuotesandRelatedbuttons are rendered here, butrowMatchesEvidenceTypeat Line 630 only filterstableandimage. Selecting either option therefore leaves every result visible. Add and populate the required row fields/predicates, or remove these chips until they work.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/master-document-flow-mockups.tsx` around lines 719 - 725, The evidence filter list in the mockup flow exposes nonfunctional “quote” and “related” options because rowMatchesEvidenceType only handles table and image. Either extend rowMatchesEvidenceType and the row data with the required quote/related predicates so those filters actually narrow results, or remove the corresponding chips from the mapped options until supported; do not leave no-op filters rendered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/components/master-document-flow-mockups.tsx`:
- Around line 719-725: The evidence filter list in the mockup flow exposes
nonfunctional “quote” and “related” options because rowMatchesEvidenceType only
handles table and image. Either extend rowMatchesEvidenceType and the row data
with the required quote/related predicates so those filters actually narrow
results, or remove the corresponding chips from the mapped options until
supported; do not leave no-op filters rendered.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 67e5102e-9380-4e43-b5e1-7685eafb1909
📒 Files selected for processing (2)
src/components/clinical-dashboard/cross-mode-links.tsxsrc/components/master-document-flow-mockups.tsx
Summary
Presentational redesign of the documents Search command centre (
/documents/search). Purely UI over the live-data results panel that #460 introduced — no ingestion, retrieval, ranking, scoring, or answer logic changed.variant="compact"on the sharedCrossModeLinksStrip; the answer surface keeps its existing cards).DocumentMetaRow(fixes the mid-word "Clinical Guid…" truncation), header now scrolls in sync with rows, line-clamped snippet, and a labelled accent Open button replacing the bare icon-square + dead kebab.Sparklesbadge with a soft gradient wash on the featured row (desktop + mobile).document-uiprimitives (DocumentFileTile,DocumentMetaRow) instead of local one-offs.Behaviour-affecting note for review: the previously-decorative category rail was removed entirely (not restyled). An earlier iteration made it a functional Guidelines/Procedures/Reference filter, but that relied on the old fixture's curated
sourcetaxonomy; the liveDocumentSearchRow(from #460) carries only free-text publisher strings, so a clean/defensible category mapping isn't available. Removing it is consistent with removing the dead sidebar. Evidence display uses #460'sDocumentEvidencePillsunchanged.Files:
src/components/master-document-flow-mockups.tsx,src/components/clinical-dashboard/cross-mode-links.tsx.Verification
npm run verify:cheap— green (lint, typecheck, vitest, runtime/sitemap checks)npm run format:check— green for changed files (the only two warnings areCLAUDE.md/.claude/settings.json, a local Windows CRLF checkout artifact; committed content is LF and passes on CI)npm run verify:ui— targeted Chromium specs for the touched surfaces pass on a clean server:ui-smoke"document search mode lists matching documents", "search regressions avoid fetch errors", and "answer results surface cross-mode quick links". The full localverify:uicould not complete reliably due to a recurring Turbopack dev-server cache-corruption flake on this Windows machine (missing-manifest / "Failed to restore task data"), unrelated to this diff — relying on CI'sui-smokegate on Linux.npm run eval:retrieval:quality— no retrieval/ranking/selection/chunking/scoring behaviour changed (presentation only).npm run check:production-readiness— no clinical workflow, privacy, environment, Supabase, governance, or deployment behaviour changed.Clinical Governance Preflight
Presentational change to how existing search results render; no governance-relevant behaviour changed.
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
origin/main(incl. fix: wire document search command centre to live /api/search #460's live-/api/searchrewire) into the branch and re-applied the redesign onto the live-dataDocumentSearchRowmodel. Net diff is exactly the two files above.🤖 Generated with Claude Code