Skip to content

fix(filters): resolve PR #1998 merge conflicts and required CI failures - #2025

Merged
BigSimmo merged 23 commits into
mainfrom
claude/pr-1998-review-fix-u9u9ps
Aug 17, 2026
Merged

fix(filters): resolve PR #1998 merge conflicts and required CI failures#2025
BigSimmo merged 23 commits into
mainfrom
claude/pr-1998-review-fix-u9u9ps

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Carries the complete clinical filter overhaul from feat(filters): implement clinical result filter overhaul #1998 (codex/filter-system-overhaul) forward, merged cleanly onto current main, with the specific fixes needed to satisfy the required pr-required CI aggregate:
    • Resolved the real merge conflict against main in docs/design-system/COMPONENTS.md, docs/design-system/adoption-manifest.json, and src/components/ui/sheet.tsx (kept the headerRef/headerHidden/data-sheet-header header-collapse attributes that landed on main via feat(guide): pin guide chrome controls to shared scroll-hide behavior #2007 after feat(filters): implement clinical result filter overhaul #1998 branched).
    • Regenerated the design-sync contract and design-system adoption manifest (npm run design-system:design-sync:update, generate-design-system-adoption.mjs --write) so check:design-sync-contract and the design-sync-contract/design-sync-visual-exports unit tests pass again — they were failing with dtsPropsFor must be generated from source public Props types because the merge left the generated artifacts stale relative to sheet.tsx.
    • Fixed a genuine test/implementation mismatch in tests/ui-tools.spec.ts: feat(filters): implement clinical result filter overhaul #1998's first commit rewrote several assertions to expect the /tools hero composer visible at every viewport width, but never changed the production composer-placement logic in ClinicalDashboard.tsx / global-search-shell.tsx, which deliberately keeps /tools on the phone footer dock per the documented contract in docs/search-chrome-behaviour.md ("Tools directory... Compact bottom dock on phones; in-flow hero composer from sm"). Restored the phone/desktop branching in the 4 affected tests to match the shipped, documented behaviour instead of changing production code on a protected search-chrome surface.
    • Extracted the new handleDocumentFiltersApply callback out of ClinicalDashboard.tsx into src/components/clinical-dashboard/use-apply-filters.ts (mirroring the existing useScopeFilterRelax pattern) because feat(filters): implement clinical result filter overhaul #1998's addition pushed the component to 4146 lines, past the 4140-line no-growth budget check:maintainability-budgets enforces. Pure extraction, no behaviour change.
    • Merged the one commit that landed on main after this branch started (Add outstanding-issues row-staleness fingerprint checks #2009, a URL-regex assertion robustness fix in the same test file).

Verification

  • npm run verify:pr-local — see below (ran the constituent gates directly: full unit suite, typecheck, lint, design-sync/adoption/maintainability-budget checks, targeted + full ui-tools.spec.ts Chromium Playwright run, and a clean rm -rf .next && npm run build)
  • npm run verify:ui — ran tests/ui-tools.spec.ts (95/95 passed) against a clean production build with --project=chromium, including the 4 tests that were failing in feat(filters): implement clinical result filter overhaul #1998's CI (Production UI (3))
  • Unit suite: npx vitest run — 635 files / 6771 tests passed, 4 skipped
  • Typecheck: npx tsc --noEmit -p tsconfig.json — clean
  • Lint: npx eslint on all changed files — clean
  • node scripts/check-design-sync-contract.mjs — passes (54 components, 7 guidelines)
  • node scripts/generate-design-system-adoption.mjs --check — passes (54 components, 59 roots)
  • node scripts/check-maintainability-budgets.mjs — passes (ClinicalDashboard.tsx: 4136/4140 lines)
  • npm run format — clean, nothing to reformat

Risk and rollout

  • Risk: the only production-code behaviour change versus feat(filters): implement clinical result filter overhaul #1998 is the ClinicalDashboard.tsx extraction, which is a pure refactor (same logic, moved to a hook module) — verified by the unchanged document-filter-panel.dom.test.tsx / medication-prescribing-workspace.dom.test.tsx suites and typecheck/lint. The sheet.tsx conflict resolution keeps both features (existing header-collapse from main + this PR's filter-sheet changes) with no logic removed on either side.
  • Rollback: revert this commit; feat(filters): implement clinical result filter overhaul #1998 remains open and untouched as a fallback source of the original diff.
  • Provider or production effects: None.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • 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 behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed — this is a filter/search UI change, no clinical decision-support logic changed

Notes


Generated by Claude Code

BigSimmoand others added 20 commits August 16, 2026 19:50
…ests
The filter overhaul rewrote these assertions to expect the tools hero
composer visible at every width, but never changed the production
composer-placement logic (ClinicalDashboard.tsx, global-search-shell.tsx)
that deliberately keeps /tools on the phone footer dock per the
documented contract in docs/search-chrome-behaviour.md. Restore the
phone/desktop branching so the tests match shipped behaviour.
…nder the ClinicalDashboard line budget
PR #1998 added a new inline callback (handleDocumentFiltersApply) that
pushed ClinicalDashboard.tsx to 4146 lines, past the 4140-line no-growth
budget check:maintainability-budgets enforces. Extract it into
use-apply-filters.ts following the same pattern already used for
useScopeFilterRelax — a hook module beside the component instead of
inline growth. Pure extraction, no behaviour change.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@supabase

supabaseBot commented Aug 17, 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

coderabbitaiBot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in:57 minutes

Limit details: You’ve used all 1 included review currently available under your plan. You completed 94 included PR reviews in the past 7 days; at that activity level, included reviews refill at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 39b43fc1-43c8-4b49-b007-1b60c10ea1ed

📥 Commits

Reviewing files that changed from the base of the PR and between f2cdb69 and 7e8ac75.

📒 Files selected for processing (61)
  • .design-sync/config.json
  • docs/branch-review-records/3cb7ccda715349528ce874a104d8f7086772b310145b8ef3f028b82ae6b4f63c.record.md
  • docs/branch-review-records/7765db7390f88c4cb763e05a58bef1158fb0db2c3232072b73ddddd3d653876a.record.md
  • docs/branch-review-records/81782f186cfefcfe52006b705b15b5018bd6bc01d0998839c9544151db434263.record.md
  • docs/branch-review-records/c77521d7551a10d87a7824257e5ec615ced08a21d9254bc8612ea6318a73e9f4.record.md
  • docs/design-system/COMPONENTS.md
  • docs/design-system/adoption-manifest.json
  • docs/search-results-bar-decisions.md
  • src/app/(search-app)/dsm/search/page.tsx
  • src/components/ClinicalDashboard.tsx
  • src/components/applications-launcher-page.tsx
  • src/components/calculators/search-page.tsx
  • src/components/clinical-dashboard/differentials-home.tsx
  • src/components/clinical-dashboard/document-search-results.tsx
  • src/components/clinical-dashboard/favourites-command-library-page.tsx
  • src/components/clinical-dashboard/medication-prescribing-workspace.tsx
  • src/components/clinical-dashboard/result-filter-control.tsx
  • src/components/clinical-dashboard/search-results-header-band.tsx
  • src/components/clinical-dashboard/use-apply-filters.ts
  • src/components/differentials/differential-stream-workspace.tsx
  • src/components/dsm/dsm-search-page.tsx
  • src/components/factsheets/factsheets-search-page.tsx
  • src/components/forms/forms-search-results-page.tsx
  • src/components/formulation/formulation-home-page.tsx
  • src/components/services/service-group-nav.tsx
  • src/components/services/services-navigator-page.tsx
  • src/components/specifiers/specifiers-home-page.tsx
  • src/components/therapy-compass/screens/search-screen.tsx
  • src/components/tools/tools-search-results-page.tsx
  • src/components/ui/sheet.tsx
  • src/lib/document-filter-model.ts
  • src/lib/form-filters.ts
  • src/lib/medication-filters.ts
  • src/lib/result-filter-url.ts
  • src/lib/search-scope-filter-chips.ts
  • tests/differential-stream-page.dom.test.tsx
  • tests/differentials-compare-selection.dom.test.tsx
  • tests/document-filter-model.test.ts
  • tests/document-filter-panel.dom.test.tsx
  • tests/document-search-scope-zero-results.dom.test.tsx
  • tests/dsm-search-empty-state.dom.test.tsx
  • tests/factsheets-search-page.dom.test.tsx
  • tests/favourites-auth-gate.dom.test.tsx
  • tests/favourites-empty-state.dom.test.tsx
  • tests/filter-review-regressions.dom.test.tsx
  • tests/form-filters.test.ts
  • tests/forms-search-filters.dom.test.tsx
  • tests/formulation-search-filters.dom.test.tsx
  • tests/medication-filters.test.ts
  • tests/medication-prescribing-workspace.dom.test.tsx
  • tests/mobile-interaction-regressions.test.ts
  • tests/result-filter-url.test.ts
  • tests/search-results-header-band.dom.test.tsx
  • tests/services-navigator-scope-empty-state.dom.test.tsx
  • tests/sheet.dom.test.tsx
  • tests/specifiers-search-filters.dom.test.tsx
  • tests/ui-route-coverage.spec.ts
  • tests/ui-smoke.spec.ts
  • tests/ui-specifiers.spec.ts
  • tests/ui-stress.spec.ts
  • tests/ui-tools.spec.ts
✨ 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/pr-1998-review-fix-u9u9ps

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

@BigSimmo
BigSimmo enabled auto-merge August 17, 2026 09:35
@github-actions

github-actionsBot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 4 failed job(s):

  • Lighthouse budgetneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Production UI (1)needs investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Advisory UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #11281 (cancelled).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

…arget and layout-transition ratchets
check:design-system-contract regressed on this PR's head:
- favourites-command-library-page.tsx's new 'Recently used' toggle used
bare min-h-10 (40px) on every viewport instead of the file's own
min-h-tap ... sm:min-h-10 pattern, dropping below the 48px phone tap
floor.
- result-filter-control.tsx's new coverage progress bar animated width
directly (transition-[width]), which is a real layout-thrash risk the
ratchet exists to catch; switched to the scaleX(...) + origin-left
pattern already used by ui/progress.tsx and DocumentManagerPanel.tsx.
Both are genuine fixes to new code from #1998, not baseline bumps.
@BigSimmo
BigSimmo disabled auto-merge August 17, 2026 10:16
@BigSimmo
BigSimmo enabled auto-merge August 17, 2026 10:16
@BigSimmo
BigSimmo merged commit ab7c513 into mainAug 17, 2026
40 of 45 checks passed
@BigSimmo
BigSimmo deleted the claude/pr-1998-review-fix-u9u9ps branch August 17, 2026 10:26
Sign up for freeto 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.

2 participants

@BigSimmo@claude