Redesign documents search results header chrome#936
Conversation
Lead with the identity header, merge sort and type filters into one compact toolbar with a chip-sized Library action, remove Also in your library from documents search, and place governance notices below the controls. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reached
Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughDocument search rendering now uses dedicated result controls, conditionally displays scope and governance notices, removes cross-mode links from document mode, and passes document-specific scope data. Smoke tests cover filtering, sorting, result controls, and the source library dialog. ChangesDocument search workspace
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Collapse documents governance prop wiring so the dashboard file stays within the no-growth hotspot limit. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #3627 (cancelled). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Use flex-nowrap so type filters scroll and Sort plus Library stay aligned on narrow viewports. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Unify sort/filter/library into one inset control band, add focus rings on type filters, compact the Sort label on narrow viewports, and extend smoke coverage for filter and sort interactions. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Assert type-filter toggles and sort URL persistence on the unified results controls toolbar. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Format the documents results toolbar files for CI Static PR checks, and use a module-level empty warnings array so panel memoization stays intact. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Declare the module-level empty array used as the panel default so the memo-safe default is defined at runtime. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.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/clinical-dashboard/document-search-results.tsx (1)
992-1007: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
DocumentTagFacetRailcan never be opened — the facet picker is gated behind an already-active facet.
DocumentTagFacetRail(the UI that lets a user pick a tag facet) only renders whenactiveFacetKeys.length > 0. But the only way to populateactiveFacetKeysistoggleTagFacet, which is only invoked via this same component'sonToggleprop. Since the component itself already returnsnullwhengroups.length === 0(line 152), the extraactiveFacetKeys.length > 0gate serves no purpose except to make the picker permanently unreachable — users can never select their first tag facet from this control.🐛 Proposed fix
<> - {activeFacetKeys.length > 0 ? ( - <DocumentTagFacetRail - groups={tagFacetGroups} - activeKeys={activeFacetKeys} - onToggle={toggleTagFacet} - onClear={() => setActiveFacetState({ query, keys: [] })} - /> - ) : null} + <DocumentTagFacetRail + groups={tagFacetGroups} + activeKeys={activeFacetKeys} + onToggle={toggleTagFacet} + onClear={() => setActiveFacetState({ query, keys: [] })} + /> {activeFacetKeys.length > 0 ? ( <div className={cn(metadataPill, "min-h-8 w-fit max-w-full text-2xs")}> {sortedMatches.length} result{sortedMatches.length === 1 ? "" : "s"} after filters </div> ) : null}🤖 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/clinical-dashboard/document-search-results.tsx` around lines 992 - 1007, Render DocumentTagFacetRail whenever tagFacetGroups are available, rather than gating it on activeFacetKeys.length, so users can select their first facet; keep activeKeys, onToggle, and onClear wiring unchanged. Retain the separate activeFacetKeys check for the filtered-results metadata pill.
🤖 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/clinical-dashboard/document-search-results.tsx`:
- Around line 992-1007: Render DocumentTagFacetRail whenever tagFacetGroups are
available, rather than gating it on activeFacetKeys.length, so users can select
their first facet; keep activeKeys, onToggle, and onClear wiring unchanged.
Retain the separate activeFacetKeys check for the filtered-results metadata
pill.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a5aeea3f-495b-4e34-85de-5e3f8fba1d7e
📒 Files selected for processing (4)
src/components/ClinicalDashboard.tsxsrc/components/clinical-dashboard/document-search-results.tsxsrc/components/clinical-dashboard/search-results-header-band.tsxtests/ui-smoke.spec.ts
Replace the stale #932 PR_POLICY_BODY leftover so CI can sync a correct ready-for-review description with governance evidence. Project identity strings match the existing in-repo PR policy checklist items.
Drop the head-local PR body template once CI has synced the accurate description, so a stale summary cannot overwrite future pull requests. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Keep the feature branch current so squash auto-merge is not blocked by a behind base. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Capture the final review outcome, verification evidence, and merge-readiness state for PR #936. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Resolve ledger-only conflict; product auto-merge clean. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
* Fix differentials results top clipped by ModeHomeMain centering Tall search results were vertically centered inside ModeHomeMain, so on phones the Best Answer and header band sat above the scrollport. Top-align results via an explicit contentAlign prop (cn cannot override justify-*), and prove Best Answer remains in the fold at scrollTop 0. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Harden ModeHomeMain alignment API against flex-center regressions Trace the clipped differentials top to 39d14a5's always-centered flex shell. Expose exclusive contentAlign values (center/start/startOnPhone), strip stray justify-* className tokens, migrate therapy/formulation/ specifiers off fragile overrides, and add static + Playwright guards so tall results cannot silently re-center and hide their top again. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Record PR #938 ModeHomeMain alignment review in ledger Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Polish ModeHomeMain alignment guards and restore PR #938 body Rewrite PR_POLICY_BODY.md so Sync PR policy body no longer overwrites #938 with the stale #932 admin/migration summary. Strip responsive justify-* tokens, give Chip an exclusive density scale, top-align remaining content-rich mode homes, harden the home header wait against hydration double-mount, and bind the Best Answer fold check to the header band. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Record PR #938 follow-up alignment polish in review ledger Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Satisfy PR policy UI verification evidence for #938 Record hosted Production UI / verify:ui evidence in PR_POLICY_BODY.md so the Sync PR policy body job keeps the description policy-compliant. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Record PR #938 merge-readiness after hosted UI green Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Center forms/services ModeHomeMain when registry is empty Seeded forms/services homes stay startOnPhone to avoid phone clipping; loading and unseeded notices are short, so keep those vertically centred instead of pinning them under the header. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Clarify forms/services seeded alignment in PR #938 body Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Record PR #938 final review and auto-merge handoff Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Record PR #938 main-merge revalidation in review ledger Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Record fresh PR #938 final review after main sync Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * Fix conflict markers left in branch-review ledger The #936 merge commit accidentally retained conflict markers in docs/branch-review-ledger.md. Keep both #936 and #938 review rows. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Add ledger rows for the documents search header redesign and the ui-overlap dual-header flake fix after squash merge and remote prune. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
Verification
npm run verify:pr-local— runtime, format, lint, typecheck, build, and RAG fixtures passed on PR head. Full unit suite locally: 2948 passed / 2 failed intests/pdf-extraction-budget.test.ts(Python/PDF env artifact; identical on clean main; hosted Unit coverage green).@critical, deferred source/admin@critical, and forms result-sort URL persistence — all passed.npm run check:design-system-contract,check:icon-scale --strict,check:maintainability-budgets— passed.verify:uisuite deferred; focused Chromium smoke for the redesigned documents controls passed locally and hosted Production UI remains the broader UI gate.Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
PR_POLICY_BODY.mdfrom fix: resolve bottom layout spacing, remove info page footer search, and fix unit test regression #932 so CI syncs an accurate ready-for-review body for this PR.