Skip to content

Retire Therapy Compass parallel CSS into Clinical Sky tokens (PR-T) - #1569

Merged
BigSimmo merged 14 commits into
mainfrom
claude/ds-v2-therapy-teardown
Aug 1, 2026
Merged

Retire Therapy Compass parallel CSS into Clinical Sky tokens (PR-T)#1569
BigSimmo merged 14 commits into
mainfrom
claude/ds-v2-therapy-teardown

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Retire Therapy Compass's parallel CSS system: delete src/components/therapy-compass/therapy-compass.css (~3,286 lines / tc-* selectors) and remove its import from src/app/(search-app)/layout.tsx.
  • Migrate therapy-compass components onto shared design-system control recipes (therapyBtn, outlineControl, softControl, etc. in controls.ts), with selected/pressed state carried by aria-pressed / aria-current rather than tc-is-* classes.
  • Keep cardiac qtc- identifiers untouched (finding C).
  • Fix post-cherry-pick break: focusRing was renamed away on main — define the same focus-token string locally in controls.ts so therapy buttons are not coupled to searchFocusRing.
  • Ledger: archive #205 (fresh id for this teardown; main's #183 remains the Sentry alert task) and update #016(e).

This is PR-T of the Site-wide Fable V2 plan, Wave 0.

Verification

  • npm run check:design-system-contract — passed (639 production files)
  • Docs-surface: docs:check-links, docs:check-scripts, docs:check-inventory, docs:check-index, check:outstanding-issues — all green
  • npm run test:e2e:critical -- --max-failures=115 passed
  • npm run verify:ui344 passed (13.5m)
  • npm run verify:pr-local -- --files <explicit branch diff> — green (unit suite, production build, client-bundle secret scan, check:rag:fixtures 36 golden cases / 23 suites)

Risk and rollout

  • Risk: Medium-low UI. Therapy Compass styling/markup migrates onto shared tokens; no RAG, ingestion, auth, or privacy paths. A missed tc-* class would show as unstyled controls — contract check + Therapy journeys in verify:ui cover that.
  • Rollback: revert the single squash commit (restores therapy-compass.css + prior class names).
  • Provider or production effects: None beyond the usual main → psychiatry.tools auto-deploy of this UI change.

Notes

  • docs/branch-review-ledger.md rows appended via ledger:append (product tip f9cf75fef / supersede covering post-append tip).
  • Diverged therapy-branch work that locally reused #183 for this teardown was not reused; #183 on main stays the Sentry metric-alert task.

Open in Devin Review

BigSimmo and others added 8 commits August 1, 2026 15:12
First slice of #183. ui.tsx is now completely free of tc-* classes, and
nav.tsx, workspace.tsx and therapy-card.tsx no longer use any numbered
one-off class. Sizes map to the nearest scale rung so the mode does not
visibly change, per the agreed constraint.

The audit corrected the scope: therapy-compass.css defines 459 selectors
across 3286 lines, not the 81 base classes #183 recorded. 353 of those are
auto-extracted numbered one-offs (.tc-screens-search-screen-009 and
friends), which are per-element and carry no cross-file coupling. That makes
them the safe independent unit, so this slice migrates only those plus the
primitive kit.

Three ordering constraints the audit surfaced, recorded for the rest of the
teardown:

- tc-root must be removed LAST. Every numbered rule is scoped
  `.tc-root .tc-*`, so dropping it early unstyles every un-migrated screen.
  workspace.tsx keeps it with a comment saying so.
- controls.ts and its call sites must move together. State modifiers are
  two-class selectors (.tc-control-outline.tc-is-selected), so retiring the
  base class without the call sites silently drops the selected state.
- Some rules are irreducible to utilities and need a home in globals.css
  rather than deletion: the print isolation block (body:has(.tc-root) *
  visibility plus the named @page), the #phone-header-collapse-addon-slot
  contextual override, and the tc-scroll scrollbar styling.

Tone handling reuses the shared recipes where they are provably identical:
--success is an alias of --success-text and --success-soft of --success-bg,
so toneSuccess/toneInfo/toneWarning render exactly as the tc classes did.
Therapy keeps local neutral/purple/accent, which the shared kit lacks, and
keeps its centred loading/empty states rather than the left-aligned shared
EmptyState, so the CSS retires without the mode changing.

Two gates had to move with the code, both preserving their intent:

- check-design-system-contract.mjs allowed only the --tc-meter-width inline
  style in ui.tsx. That variable existed solely to hand a data-driven
  percentage to the stylesheet being retired, so the exemption now covers
  setting the width directly.
- therapy-compass-responsive-contract.test.ts counted phone reflow only as
  tc-stack-sm / tc-mobile-stack. It now also counts the Tailwind
  grid-cols-1 + sm:grid-cols-* expression of the same guarantee, and checks
  the disabled Favourite button by its cursor-not-allowed utility rather
  than a class name that is going away.

Note for the endgame: check-design-system-contract.mjs asserts on
therapy-compass.css contents (--tc-paper-muted, the .tc-paper focus rule,
.tc-btn hover/disabled, and the paper rule boundaries). Deleting the file
fails that gate until those assertions are rewritten against the migrated
markup.

Gate: check:design-system-contract, check:type-scale, check:icon-scale,
lint, prettier all pass; therapy-compass-responsive-contract 10/10 passed.

Co-authored-by: Cursor <cursoragent@cursor.com>
Delete therapy-compass.css after migrating screens and control recipes to token-backed Tailwind, keep only print/paper/compare residuals in globals.css, and close ledger #183 once verify:cheap is green.

Co-authored-by: Cursor <cursoragent@cursor.com>
Follow-up to the CSS retirement commit so the push blob matches format:check.

Co-authored-by: Cursor <cursoragent@cursor.com>
…PR-T)

The diverged therapy branch had locally reused #183 for this teardown, but
#183 on main is the Sentry metric-alert task. Allocate a fresh id via the
issues writer instead and close it in the same PR.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@supabase

supabase Bot commented Aug 1, 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 ↗︎.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

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: 14 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: 2a1fc136-90a9-41d2-bcb0-fc564c407aec

📥 Commits

Reviewing files that changed from the base of the PR and between 4130249 and 17f0526.

📒 Files selected for processing (28)
  • docs/branch-review-ledger.md
  • docs/outstanding-issues.md
  • scripts/check-design-system-contract.mjs
  • scripts/design-system-contract-utils.mjs
  • src/app/(search-app)/layout.tsx
  • src/app/globals.css
  • src/components/therapy-compass/bindings.tsx
  • src/components/therapy-compass/controls.ts
  • src/components/therapy-compass/filter-sheet.tsx
  • src/components/therapy-compass/nav.tsx
  • src/components/therapy-compass/screens/brief-screen.tsx
  • src/components/therapy-compass/screens/compare-screen.tsx
  • src/components/therapy-compass/screens/detail-screen.tsx
  • src/components/therapy-compass/screens/other-screen.tsx
  • src/components/therapy-compass/screens/pathways-screen.tsx
  • src/components/therapy-compass/screens/recommend-screen.tsx
  • src/components/therapy-compass/screens/search-screen.tsx
  • src/components/therapy-compass/screens/sheets-screen.tsx
  • src/components/therapy-compass/therapy-card.tsx
  • src/components/therapy-compass/therapy-compass.css
  • src/components/therapy-compass/ui.tsx
  • src/components/therapy-compass/workspace.tsx
  • tests/design-system-contract-utils.test.ts
  • tests/helpers/style-contracts.ts
  • tests/therapy-compass-responsive-contract.test.ts
  • tests/ui-accessibility.spec.ts
  • tests/ui-overlay-css-contract.test.ts
  • tests/ui-route-coverage.spec.ts

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

@ecc-tools

ecc-tools Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

@BigSimmo
BigSimmo enabled auto-merge (squash) August 1, 2026 20:12
@BigSimmo
BigSimmo disabled auto-merge August 1, 2026 20:12
@BigSimmo
BigSimmo enabled auto-merge (squash) August 1, 2026 20:13
@ecc-tools

ecc-tools Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

Comment thread src/components/therapy-compass/screens/recommend-screen.tsx
Comment thread src/components/therapy-compass/screens/brief-screen.tsx

@devin-ai-integration devin-ai-integration 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.

Devin Review found 4 potential issues.

View 6 additional findings in Devin Review.

Open in Devin Review

Comment thread src/components/therapy-compass/screens/recommend-screen.tsx Outdated
Comment thread src/components/therapy-compass/screens/sheets-screen.tsx Outdated
Comment thread src/components/therapy-compass/screens/brief-screen.tsx Outdated
Comment thread src/components/therapy-compass/screens/brief-screen.tsx
@BigSimmo

BigSimmo commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

@cursoragent Unblock the current open PR. Confirm the PR number and GitHub head first from context. If more than one open PR could apply, stop and say which one you would use and why.

Fetch and start from the remote tip that matches that GitHub head. If the named branch ref is missing or stale, use the PR head ref. Preserve unrelated local WIP; do not discard dirty work; do not treat a local-ahead commit as the reviewed tip. Do not merge the PR, force-push, rebase, or arm auto-merge. No provider-backed gates without approval. If you cannot push or resolve threads, diagnose and comment only; if inline replies fail, resolve when possible and put blocker dispositions in the summary comment. If auto-merge is already armed, push only for a real blocker and avoid cancelling in-flight required CI unless the push clears that blocker.

If the PR is already merged or closed: confirm outcome, post one summary, and stop.

Primary job: clear mergeability and required-CI blockers on this tip. Do a full product review only if needed to explain or fix a blocker. Stay light otherwise—no broad verification suites or Playwright unless needed to prove one concrete unblock fix.

Snapshot the GitHub head: tip, behind/ahead, mergeable state, merge-tree versus origin/main (real conflict versus behind-but-clean), required checks on that tip including Production UI when selected, and unresolved threads that block merge or required CI. Missing checks while dirty are not green. Tip moved → re-snapshot.

Ledger-lookup against that GitHub head under an unblock/fix scope for this PR. If already handled at this head for unblock work, merge-tree clean, required checks green, and no blocking threads: summarize, comment, stop.

Unblock once: real conflict → merge origin/main with the smallest correct resolution (prefer main’s shared queues; keep this PR’s notes); behind-but-clean → one sync, late if required CI is in flight; clean → leave. skip-branch-sync and similar labels do not block a manual sync needed to clear a real blocker. No sync thrash. After any sync or push, re-snapshot tip, merge-tree, and required checks before declaring done. Dedupe the ledger if a merge touched it.

Fix only what blocks required checks or mergeability on this tip. Ignore advisory red unless it reveals a real required failure. Prefer the smallest safe fix; if a bot/autofix commit caused the break, prefer revert. Prove with the smallest targeted check only. Format and commit before push.

Push only blocker-fix commits. Append ledger for the final GitHub head under the unblock scope. Never push a ledger-only tip.

One PR comment: tip, sync/merge-tree, what blocked and what you fixed or dispositioned, required CI status, residual risks; merge left to me.

Stop when merge-tree is clean on the current GitHub tip, no blocking threads remain for merge/required CI, and required checks are green or clearly in progress.

@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Taking a look!

Open in Web Open in Cursor 

@BigSimmo
BigSimmo disabled auto-merge August 1, 2026 20:16
@BigSimmo
BigSimmo enabled auto-merge (squash) August 1, 2026 20:16
@BigSimmo
BigSimmo disabled auto-merge August 1, 2026 20:17
@ecc-tools

ecc-tools Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

@BigSimmo
BigSimmo enabled auto-merge (squash) August 1, 2026 20:17
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ecc-tools

ecc-tools Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ecc-tools

ecc-tools Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ecc-tools

ecc-tools Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ecc-tools

ecc-tools Bot commented Aug 1, 2026

Copy link
Copy Markdown

🔒 Upgrade Required

Private repository analysis requires Pro or Enterprise.

Upgrade: https://ecc.tools/pricing?plan=pro


ECC Tools keeps the core app open, and puts private repos, team features, and enterprise controls behind paid tiers.

@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Unblock snapshot — PR #1569

Tip: 17f05263c2ef1f4af73365a927dc80cdd3b6cbf1 on claude/ds-v2-therapy-teardown
Base: origin/main @ 41302492902e41e2cd24144b0657477c9068374a
Mergeability: MERGEABLE / merge-tree clean (ahead 14 / behind 0)
Auto-merge: armed (squash) — no further push from this unblock pass

What blocked

At the prior tip dae7435a, GitHub reported DIRTY/CONFLICTING after main advanced with PR-0 (#1568). Local git merge-tree against that tip was clean (behind-but-clean staleness, not a content fight). Required CI on dae7435a was still in flight when the tip moved.

What landed before this pass (already on tip)

  • c84abb7a — merge origin/main after PR-0 (cleared mergeability)
  • 5fc9254a / d5146363 / 2034d05f / 17f05263 — Devin/Sentry Tailwind fixes (accent borders, grid-cols-2 sm:grid-cols-4, MetaCell tone exclusivity)

This pass

  • Confirmed PR Retire Therapy Compass parallel CSS into Clinical Sky tokens (PR-T) #1569 only; fast-forwarded local to GitHub head 17f05263 (no discard, no push)
  • Did not push: auto-merge armed + merge-tree clean + no required-CI code blocker (would only cancel in-flight checks)
  • Resolved remaining open Sentry threads (fixes already on tip). Inline reply mutation forbidden for this token — dispositions here:
    • recommend accent border → fixed as border-l-[3px] border-l-[color:var(--clinical-accent)]
    • brief meta grid → fixed as grid-cols-2 sm:grid-cols-4
  • Skipped ledger-only tip push under armed auto-merge

Required CI (as of comment)

In progress / green so far — no failures. PR mergeability pass. Pending include Static PR, Build, Unit coverage, Production UI critical.

Residual risks (non-blocking)

Devin also noted possible same-property Tailwind cascade hazards in other therapy-compass call sites (therapy-card, compare-screen, detail-screen, controls.ts/filter-sheet). Those threads are resolved; not required-CI blockers. Optional follow-up after merge if visuals look off.

Merge left to you (auto-merge should take it when required checks go green).

@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: a3cedeb1a9

ℹ️ 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/therapy-compass/screens/brief-screen.tsx Outdated
Comment thread src/components/therapy-compass/screens/recommend-screen.tsx Outdated
@BigSimmo

BigSimmo commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. The only repository destination is BigSimmo/Database, and the only branch destination is the pull request head branch claude/ds-v2-therapy-teardown at starting commit 17f0526; never publish fixes to a detached or synthetic work branch and never create a stacked pull request. Use the authenticated GitHub connector to commit each approved fix to BigSimmo/Database:claude/ds-v2-therapy-teardown, then verify that the pull request head contains the published commit before reporting success. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. For a fixed thread, reply with as the first line and as the second line. For a no-code disposition, use followed by . These result markers authorize the workflow to close that exact thread only after it verifies a fixed commit is the pull request head; a local-only commit is not a fix. If publication or verification fails, do not use either result marker, do not claim success, and leave the thread open with the blocker. If human input or new authorization is required, do the same. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@BigSimmo
BigSimmo merged commit e358aa4 into main Aug 1, 2026
86 checks passed
@BigSimmo
BigSimmo deleted the claude/ds-v2-therapy-teardown branch August 1, 2026 20:35
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 17f05263c2

ℹ️ 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".

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