Skip to content

redesign(documents): declutter search command centre results#501

Merged
BigSimmo merged 6 commits into
mainfrom
claude/search-page-redesign-d50902
Jul 11, 2026
Merged

redesign(documents): declutter search command centre results#501
BigSimmo merged 6 commits into
mainfrom
claude/search-page-redesign-d50902

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

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.

  • "Also in your library" → compact one-line chips in a single slim row (opt-in variant="compact" on the shared CrossModeLinksStrip; the answer surface keeps its existing cards).
  • Decluttered results table: dot-separated meta line via 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.
  • Best match is now a filled-accent Sparkles badge with a soft gradient wash on the featured row (desktop + mobile).
  • Removed dead chrome: the purely decorative inner icon sidebar (no handlers) and all disabled "coming soon" header controls (Save search, More filters, Table/List toggle, Sort). Results count now shows at every breakpoint.
  • Adopts shared document-ui primitives (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 source taxonomy; the live DocumentSearchRow (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's DocumentEvidencePills unchanged.

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 are CLAUDE.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 local verify:ui could 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's ui-smoke gate on Linux.
  • n/a npm run eval:retrieval:quality — no retrieval/ranking/selection/chunking/scoring behaviour changed (presentation only).
  • n/a 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.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behaviour remain conservative (status pill still renders "—" for unknown status; no status logic changed)
  • Deployment classification/TGA SaMD impact — n/a, no clinical decision-support behaviour changed

Notes

🤖 Generated with Claude Code

BigSimmo and others added 5 commits July 11, 2026 03:13
- 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
@supabase

supabase Bot commented Jul 11, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

The 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

Layer / File(s) Summary
Compact cross-mode link variant
src/components/clinical-dashboard/cross-mode-links.tsx
Adds compact link chips, variant selection, horizontal scrolling, and compact-mode accessibility behavior.
Document shell and sidebar removal
src/components/master-document-flow-mockups.tsx
Removes document category rails and sidebar rendering, simplifies DocumentShell, and updates its callers.
Search controls and result presentation
src/components/master-document-flow-mockups.tsx
Updates filters, best-match indicators, document tiles, mobile spacing, and desktop result actions, including compact cross-mode links.

Estimated code review effort: 3 (Moderate) | ~25 minutes


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Verification Claims ❌ Error The PR text says “verification reports verify:cheap and formatting checks passing” and “targeted Chromium specs ... pass” without the required exact command/result format. Rewrite verification notes as exact entries, e.g. Ran npm run verify:cheap: passed, Ran npm run format:check: passed, and Not run: npm run verify:ui — Windows cache flake.
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 70.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (9 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly reflects the main change: a documents search results redesign.
Description check ✅ Passed The description matches the template with Summary, Verification, Clinical Governance Preflight, and Notes sections filled out.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Generated And Sensitive Files ✅ Passed Diff only touches two .tsx source files; no added .env/log/cache/build artifacts or secret-like strings were found.
Risky Git Or Deployment Actions ✅ Passed PASS: The diff only touches TSX presentation code and contains no force-push/reset/destructive-clean/rebase/deletion/deployment guidance.
Supabase Project And Schema Safety ✅ Passed Only cross-mode-links.tsx changed; it’s a client-side UI tweak with no Supabase env/project refs or schema/RLS/migration edits.
Runtime And Package Manager Integrity ✅ Passed PR diff only touches two TSX files; package.json, lockfile, .npmrc, .nvmrc, and .node-version are unchanged, preserving Node 24/npm 11 integrity.
Api Route Failure Handling ✅ Passed Only presentation files changed; the live /api/search client still handles non-OK responses, exceptions, and empty results with explicit UI states.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/search-page-redesign-d50902
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/search-page-redesign-d50902

Comment @coderabbitai help to get the list of available commands.

@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: 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".

Comment thread src/components/clinical-dashboard/cross-mode-links.tsx Outdated
@BigSimmo
BigSimmo enabled auto-merge (squash) July 11, 2026 14:42
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>
@BigSimmo
BigSimmo merged commit 6f1f16d into main Jul 11, 2026
15 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 win

Do not expose no-op evidence filters.

The Quotes and Related buttons are rendered here, but rowMatchesEvidenceType at Line 630 only filters table and image. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 889e446 and 7d077a1.

📒 Files selected for processing (2)
  • src/components/clinical-dashboard/cross-mode-links.tsx
  • src/components/master-document-flow-mockups.tsx

@BigSimmo
BigSimmo deleted the claude/search-page-redesign-d50902 branch July 11, 2026 14:56
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.

1 participant