Skip to content

fix(ui): repair three dropped CSS custom-property references, and record the defect family - #1451

Merged
BigSimmo merged 42 commits into
mainfrom
claude/frosty-mayer-2c6167
Jul 31, 2026
Merged

fix(ui): repair three dropped CSS custom-property references, and record the defect family#1451
BigSimmo merged 42 commits into
mainfrom
claude/frosty-mayer-2c6167

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Final scope after current-main reconciliation

Current head 742f767de09fdc4dfad2ca30431dc8d09c49ce6d contains PR #1480. That PR established the correct production resolution by defining --clinical-accent-strong on the high-contrast ramp (--primary-700 in both themes, LinkText in forced-colors) with token-presence and 4.5:1 contrast contracts. This PR now preserves that stronger role; it no longer changes answer-status.tsx relative to main.

The remaining implementation delta repairs the two undefined references in gate-exempt favourites design scratch: --primary-hover -> --primary-strong, and --success-hover -> hover:brightness-110. The issue and design-sync evidence now records the combined #1480/#1451 resolution; the unused runtime-set --med-accent-soft follow-up is #149.

RAG impact: no retrieval behaviour change — mockup-only CSS references and documentation/evidence reconciliation.

Final local reconciliation checks: tests/design-token-contract.test.ts 31/31 passed; outstanding-issues guard passed (147 rows, 67 open, 80 archived, next-id 150); branch-review-ledger guard passed (202 live + 1206 archived); docs synchronization hook passed. Exact-head hosted checks are rerunning after this scope reduction.


Summary

Three independently revertible items, bundled per AGENTS.md "PR bundling". classifyPullRequestFiles returns clinicalRisk: false, operationalRisk: false, ragRanking: false, ui: true for this diff, and nothing here touches the broader risk list (no auth, privacy, migrations/RLS, retrieval, workers, upload/download, or provider calls), so no item needs a governance preflight or a RAG impact: line.

  • fix(ui): repair three dropped CSS custom-property references (e78fe31). The 2026-07-30 design-sync re-sync reported [TOKENS_MISSING]var(--token) references with no definition anywhere in the compiled Tailwind stylesheet. With no fallback, the whole declaration is dropped at CSS parse time, so the colour silently never applies, which is invisible to every static gate. Three were real:

    • src/components/clinical-dashboard/answer-status.tsx:252--clinical-accent-strong became --clinical-accent. That token never existed; both docs/redesign/permanent-colour-direction.md and docs/design-system.md enumerate the family as --clinical-accent plus -hover, -active, -soft, -border, -contrast. I chose --clinical-accent over --primary-strong because this repo uses --primary-strong exclusively as a hover or pressed fill (badge.tsx:14, differential-detail-page.tsx:641, :774, :1078), never as a resting text colour. I also kept it in the accent family rather than switching to success green: these are answer generation stages, not source readiness, and colouring four of five steps green while the answer is still being verified would be the wrong signal on a clinical surface.
    • src/components/favourites-page-mockups/favourites-library-redesign-page.tsx:203--primary-hover became --primary-strong, matching the existing bg-[color:var(--primary)] plus hover:bg-[color:var(--primary-strong)] pattern in badge.tsx:14.
    • Same file, line 217 — --success-hover had no token to map to, because the success triad is text, background and border only with no darker step. Rather than invent --success-strong for design-scratch, it now uses hover:brightness-110 with a comment explaining the asymmetry.

    The same commit documents the report's three false positives in .design-sync/NOTES.md, which previously read "None" under "Known render warns" despite two of them being known. --med-accent, --med-accent-border and --med-accent-soft are not defects: medicationAccentStyle() injects them at runtime onto the <div> at medication-record-page.tsx:393 that wraps all four consumers, as a per-medication identity accent keyed to drug class, so they cannot be static tokens. --mobile-composer-reserve is runtime-set and always read through a var(…, 0rem) fallback. --x is not a token at all — Tailwind v4 scanned the literal string bg-[color:var(--x)] out of prose in docs/redesign/03-decision-log.md:9.

  • issues: record the defect family under #094, close #141, open #147 (01c8728). #141 ("Production --clinical-accent-strong and mockup hover tokens are undefined") is the task this PR was written from, filed as a ledger row; it is archived as resolved here, and it independently recommended the same --clinical-accent mapping this PR arrived at. Adds the 2026-07-30 evidence to #094 ("Design-system gates assert structure, not rendered effect"), since this is the same inert-style gap in a cheaper-to-close form, and notes the static remedy: diff var(--name) references against --name: definitions in the compiled stylesheet, allowlisting runtime setters and var(…, fallback) reads. Opens #147, a P3 for --med-accent-soft, which medicationAccentStyle() sets but nothing reads; it was left in place rather than deleted because the comment block at lines 84-87 documents the accent trio as a deliberate contract.

  • issues: record this PR's own sync cost as #133 evidence. Landing a three-line fix took four origin/main sync cycles. The id this branch allocated was taken by main three times running, so one P3 row was renumbered #135 -> #141 -> #145 -> #147, and the third merge conflicted as a single hunk covering the entire open-items table, resolved by taking main's table wholesale and re-applying this branch's deltas with a script. Two further findings recorded there: the GitHub Update branch button auto-merged this file into duplicate #141 rows with the marker left below main's highest id (a head that would have failed check:outstanding-issues — the guard, not the merge, caught it), and removing merge=union in Remove merge=union from the issues ledger, per its own #133 #1444 did not reduce collision frequency, it converted silent duplication into loud conflicts.

Note for reviewers: the merge commits in this branch resolve real id collisions, not just drift. #1444 removed merge=union from the issues ledger and this was the first merge after it, so each main advance surfaced the clash loudly rather than duplicating rows silently — except via the Update-branch button, which did duplicate them. Final state is #147 for this branch's own row with the marker at 148; origin/main's table was taken as canonical on the widest conflict and this branch's deltas re-applied on top, verified by confirming all 70 of main's open ids are still present.

Verification

Re-run against the post-merge base after each sync, since main advanced repeatedly during this work and earlier gate runs predated those merges.

  • npm run verify:pr-local — exit 0. Full unit suite Tests 4570 passed | 3 skipped (4573); production build ✓ Generating static pages using 1 worker (1694/1694) in 47s; Offline RAG fixture and manifest validation passed (36 golden cases, 21 suites) and Offline RAG fixture and production-contract checks passed.
  • npm run verify:cheap (pre-merge base) — exit 0, Test Files 434 passed (434), Tests 4564 passed | 3 skipped (4567), Design-system contract passed (612 production files; raw colors 2; literal shadows 0; legacy tap classes 0).
  • npm run verify:ui (pre-merge base) — 339 passed, 3 failed. All three failures re-ran clean in isolation on an idle box (3 passed (17.4s), at 2.0s, 5.4s and 5.1s versus 11.9s, 21.1s and 16.4s under load), which is this repo's documented hydration-race false-red signature. None of the three reference the changed tokens or components; the only nominal overlap is a top-of-file import of an unrelated data helper. Effective result 342/342. Note that verify:ui reported a misleading exit status here — the background task notification claimed exit 0 while the captured $? marker was 1, so the tally, not the exit code, is the evidence.
  • npx prettier --check . whole-tree — exit 0, "All matched files use Prettier code style!".
  • npm run verify:cheap (final merged base) — exit 0, Test Files 436 passed (436), Tests 4575 passed | 3 skipped (4578), Design-system contract passed (613 production files).
  • npm run check:outstanding-issues — exit 0 after each collision fix; final 145 rows (70 open, 75 archived), unique ids, next-id=148 above the highest, no merge driver.
  • npm run check:branch-review-ledger — exit 0, 134 live table records + 1206 archived, ledger merge active, six cells each, no conflict markers, mojibake, heading records, or duplicates.
  • Rendered-effect proof, which is the part static gates cannot give. A targeted Playwright probe read computed styles on the real pages in both light and dark. It reproduced the bug: text-[color:var(--clinical-accent-strong)] computed to rgb(1, 2, 3), a deliberate sentinel parent colour, confirming the declaration was dropped and the colour inherited. The fixed class computes to rgb(29, 111, 184) in light and rgb(116, 189, 240) in dark. All four medication accent sites paint rgb(225, 29, 72) with the icon tile's color-mix correctly differing per theme, confirming that report entry was a false positive.

Not run: npm run verify:release and any provider-backed gate, none of which this diff needs.

Risk and rollout

Low. The production change is one CSS custom-property name in one className string on a surface that was already rendering the wrong colour, so the only behavioural delta is that completed answer-progress steps now paint the clinical accent instead of inheriting their parent colour. The second file is *-mockups design-scratch, which 404s in production and is exempt from the wiring and reachability gates. The third is documentation.

Rollback: git revert any of the three commits independently while this PR is open. After the normal squash merge the two fold into one commit, so a post-merge revert of a single item means reverting that commit's relevant hunks by hand; all three are small and self-contained enough that this is not a concern.

Contrast was checked rather than assumed: --clinical-accent is #1d6fb8 on white at 5.23:1, above the 4.5:1 AA floor for normal text, consistent with the globals.css:165 note that primary-500 is legal as both a text colour and a button fill. Dark mode is well clear per the colour doc, and forced-colors mode maps --clinical-accent to LinkText.

🤖 Generated with Claude Code

BigSimmo and others added 3 commits July 30, 2026 20:32


Adds 2026-07-30 evidence to #94: the design-sync [TOKENS_MISSING] report found
var(--token) references with no definition, so the declaration is dropped at CSS
parse time and the colour silently never applies. Notes the cheaper static remedy
(reference-vs-definition diff over the compiled stylesheet) alongside the existing
computed-style recommendation, plus the allowlist any such gate needs.

Opens #135 for --med-accent-soft, which medicationAccentStyle() sets but nothing
reads.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The design-sync [TOKENS_MISSING] report found var(--token) references with no
definition anywhere in the compiled Tailwind stylesheet. Without a fallback the
whole declaration is dropped at CSS parse time, so the colour silently never
applies — invisible to every static gate.

- answer-status.tsx: --clinical-accent-strong -> --clinical-accent. That token
  never existed; docs/redesign/permanent-colour-direction.md and
  docs/design-system.md both enumerate the family as --clinical-accent with
  -hover/-active/-soft/-border/-contrast. Chose --clinical-accent over
  --primary-strong because this repo uses --primary-strong exclusively as a
  hover/pressed fill (badge.tsx, differential-detail-page.tsx), never a resting
  text colour. Kept it in the accent family rather than switching to success
  green: these are generation stages, not source readiness.
- favourites-library-redesign-page.tsx (design-scratch): --primary-hover ->
  --primary-strong, matching badge.tsx. --success-hover has no token to map to,
  since the success triad is text/bg/border only with no darker step, so it uses
  hover:brightness-110 rather than inventing --success-strong for a mockup.

Also documents the report's three false positives in .design-sync/NOTES.md
(--med-accent*, --mobile-composer-reserve, --x), which were previously
undocumented despite the section reading "None".

--med-accent is NOT a defect: medicationAccentStyle() injects it at runtime onto
the div wrapping every consumer, as a per-medication identity accent that cannot
be a static token.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 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: 55 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: b79c3c05-54d0-4fe3-8a8a-dfe2f355d82a

📥 Commits

Reviewing files that changed from the base of the PR and between 8e158e7 and 3bfcc54.

📒 Files selected for processing (3)
  • .design-sync/NOTES.md
  • docs/branch-review-ledger.md
  • docs/outstanding-issues.md

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

@BigSimmo
BigSimmo enabled auto-merge (squash) July 30, 2026 13:07
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

CI triage

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

  • Production UI (1)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 #7122 (cancelled).

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

# Conflicts:
#	docs/outstanding-issues.md
@BigSimmo
BigSimmo disabled auto-merge July 30, 2026 13:47
@BigSimmo
BigSimmo enabled auto-merge (squash) July 30, 2026 14:31
@BigSimmo
BigSimmo disabled auto-merge July 30, 2026 14:32
@BigSimmo
BigSimmo enabled auto-merge (squash) July 30, 2026 14:34
# Conflicts:
#	docs/outstanding-issues.md
BigSimmo and others added 2 commits July 30, 2026 23:06
The id this branch allocated was taken by main three times running (#135 ->
#141 -> #145 -> #147), and the third merge conflicted as one hunk covering the
entire open-items table, so main's table was taken wholesale and the branch's
deltas re-applied by script.

Two further findings: the GitHub Update-branch button auto-merged this file into
duplicate #141 rows with the marker left below main's highest id, a head that
would have failed check:outstanding-issues; and removing merge=union did not
reduce collision frequency, it converted silent duplication into loud conflicts.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@BigSimmo
BigSimmo enabled auto-merge (squash) July 30, 2026 15:10
@BigSimmo
BigSimmo disabled auto-merge July 30, 2026 15:21
@BigSimmo BigSimmo added the skip-branch-sync Opt out of hosted pr-branch-sync / update-branch on this PR label Jul 30, 2026
@BigSimmo
BigSimmo enabled auto-merge (squash) July 30, 2026 15:54
@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Taking a look!

Open in Web Open in Cursor 

Resolve docs/outstanding-issues.md against current main: keep main's
archived #94 (enriched with #1480/#1451 token-reference evidence),
renumber the unused --med-accent-soft follow-up to #154, and point
NOTES/#141 at that id so check:outstanding-issues stays unique.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent this PR will be re-opened soon. Please resolve any failing CI, run bugbot and resolve any bugbot comments against current repo and fix any merge conflicts and also fix any errors and address and fix all comments or suggestions that are likely to improve the PR and Codebase. Please implement smallest required fix according to best code practices. Check your work. Leave this PR closed for now but still make all these changes and run the review. I want it ready to go for when I re-open it.

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

PR #1451 is ready to reopen and still closed.

Main had moved again (#1511), so I re-synced and fixed a new id collision: main took #154 for row-id stability guidance, so this PR’s unused --med-accent-soft follow-up is now #155 (next-id=156).

Tip: 7b6f7d2a — merge-tree clean, not behind main, 0 review threads, Bugbot none, design-token 31/31, outstanding-issues guard green. GitHub’s closed-PR metadata may still show the old dirty head until you reopen.

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 31, 2026 00:13
Attribute production --clinical-accent-strong to PR #1480 and the mockup
hover repairs to #1451, keep the TOKENS_MISSING count at seven benign-or-
repaired names, and stop implying open #154 is the static token gate.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Merge conflict resolved against current main, Bugbot had no findings,
NOTES attribution P3 fixed, and the PR stays closed pending reopen.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Reopen readiness (kept closed)

Branch tip is ready at c7fecf5f16b9571b89e71df39d6130647af931d9 on claude/frosty-mayer-2c6167. This PR stays closed as requested.

Done

  • Merge conflict resolved against current origin/main (68e973a4). Only conflict was docs/outstanding-issues.md.
  • git merge-tree --write-tree origin/main HEAD is clean.
  • Unique delta vs main remains four files: mockup CSS repair, .design-sync/NOTES.md, docs/outstanding-issues.md, docs/branch-review-ledger.md.
  • Bugbot / review threads: none exist on this PR (0 inline comments, 0 unresolved threads). Local pr-bugbot + diff review found no P0–P2 defects.
  • Issue hygiene: kept main’s archived #094 (enriched with fix: resolve bounded outstanding reliability tasks #1480/fix(ui): repair three dropped CSS custom-property references, and record the defect family #1451 evidence), renumbered unused --med-accent-soft follow-up to #154, next-id=155, fixed NOTES/Fix verify typecheck regressions in scratch/catalog access and smart-index metadata #141 cross-refs. check:outstanding-issues passed.
  • NOTES attribution P3 fixed (#1480 for production strong accent; #1451 for mockup hover repairs; TOKENS_MISSING count stays 7).
  • Local proof: tests/design-token-contract.test.ts 31/31; outstanding-issues + branch-review-ledger guards passed.
  • Prior exact-head CI on 8a192626 had PR required success (all production UI shards green). The only later red was PR mergeability / dirty from main advancing — now fixed on the branch tip.

Note about closed-PR metadata

GitHub still reports this closed PR’s headRefOid as the old 8a192626 even though the branch tip has advanced. That is closed-PR staleness; reopening should attach the current tip. Local merge-tree against current main is already clean.

Local verify caveat (not a PR defect)

verify:pr-local hit 2 failures in tests/codex-cloud-setup.test.ts because this Cloud Agent environment rewrites git remote get-url through a credentialed url.*.insteadOf. The same two tests fail on current main in this VM. Hosted CI does not use that rewrite; do not “fix” product code for it on this PR.

Ready to reopen when you want.

cursoragent and others added 3 commits July 31, 2026 00:18
…c6167

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Main's #1511 allocated #154 for row-id stability guidance; keep that row
and move this PR's unused --med-accent-soft item to #155 with matching
NOTES/#94/#141 pointers.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Reopen readiness refresh (still closed)

Main advanced with #1511 after the earlier prep tip. Re-synced and fixed the resulting id collision; PR remains closed.

Branch tip: 7b6f7d2a on claude/frosty-mayer-2c6167
vs origin/main: merge-tree clean, not behind
Unique delta: mockup CSS repair + NOTES + outstanding-issues + ledger only

Fixes in this refresh

Unchanged from prior pass

  • No Bugbot / inline review threads to resolve
  • Prior exact-head CI on 8a192626 had PR required green; dirty mergeability was the blocker and is cleared on the tip
  • Closed-PR GitHub metadata may still show old headRefOid until reopen

Ready to reopen when you want.

cursoragent and others added 2 commits July 31, 2026 00:32
…c6167

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Preserve main's #155 concurrency-hazard row from #1513; move this PR's
unused --med-accent-soft item to #156 and update NOTES/#94/#141 pointers.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Reopen prep complete (left CLOSED)

Tip: 913db45c on claude/frosty-mayer-2c6167
vs origin/main: merge-tree clean, ahead 39 / behind 0
Threads: 0 unresolved (Codex/Bugbot/Copilot/human)
Unique delta: mockup CSS + NOTES + outstanding-issues + ledger only

Snapshot

  • Closed-PR GitHub head still frozen at stale 8a192626 with DIRTY/CONFLICTING — that is closed-PR rollup, not the branch tip.
  • Failing mergeability check was against that stale head; tip is clean.

Sync

Threads / tip hygiene

  • Nothing actionable to fix or reply to.
  • No secrets/junk; tip is not ledger-only.

Fresh mergeability and required checks apply only after reopen.

BigSimmo added a commit that referenced this pull request Jul 31, 2026
* issues: capture the unreadable-CI token, at-risk worktree work, and the unpushed hook fix

Three findings from the 2026-07-30 organisation session that were recorded
nowhere durable:

- #149 the session GitHub PAT lacks Checks: Read, so no agent can confirm a PR
  is green. The endpoint that does work returns an empty result rather than an
  error, so it reads like an absence of checks rather than an absence of
  permission.
- #150 four worktrees on already-merged branches hold uncommitted work that
  exists in no branch and no PR, the largest being +395/-200 across 19 files
  including CI config.
- #151 the pre-commit fail-open for #143 lives only on a never-pushed local
  branch, which is also 17 behind main and conflicts on the file whose count
  sentence main's new docs:update generator now owns.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(ledger): record the session-followup capture review for PR #1490

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(ledger): record #143/#151/#149 reconciliation for PR #1490

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): supersede PR #1490 reconciliation after remote sync

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* issues: record the worktree snapshots and redirect #151 to PR #1494

#150 — the four at-risk worktrees were snapshotted onto their own already-merged
branches (748ef018f, 5dbd9f965, b7eae51a4, d949859c3), so the work survives a
worktree reclaim. All four are clean now. None is pushed or reviewed; the next
action is per-snapshot promote-or-reset.

#151 — the never-pushed branch is superseded rather than salvageable: its script
and hook reached main by other routes, so the fail-open guard was applied to
main's committed hook in PR #1494 instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs: remove credential metadata and correct audit dates

* docs: consolidate session follow-up findings

* docs: record consolidated follow-up review

* issues: record that #101 hydration shipped

PR #1463 merged as dba7356, so #86's "Next X3 unit — rag-hydration.ts" is
now stale. The row records the extraction as shipped and keeps the corrected
boundary: hydration re-homed only two of prepareCoverageGateResults's five
rag.ts-only dependencies, so it did not unblock that function — exactly as the
Codex review on PR #1461 predicted.

This row was deliberately dropped from #1463 itself (commit 6290d02) after
docs/outstanding-issues.md conflicted on five consecutive main syncs. Recording
it separately here is the same pattern used for #1454 via #1461.

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

* docs(ledger): record the landed X3 hydration review

Appended with npm run ledger:append (never hand-written), keyed to the squash
commit dba7356 so ledger:lookup can resolve it.

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

* docs: fix the #101 mislabel and key the ledger row to a resolvable ref

Both defects were raised by Codex on PR #1495 and both are real; verified
against the files before accepting.

1. #101 is NOT this extraction. docs/outstanding-issues.md:138 shows #101 is
   "Canary-gated retrieval parallelisation candidates" (P3, rec) — a separate,
   still-open recommendation gated on a live canary pair. Calling the hydration
   extraction "#101" marked that unrelated work as shipped and could have caused
   the live-evaluation work to be skipped. The label came from the original task
   brief and was propagated without checking it against the ledger. Both the
   #86 row and the X3 work-order entry now identify the change as the X3
   hydration unit (PR #1463) instead. #101's own row is untouched and still open.

2. The ledger row did not resolve. `npm run ledger:lookup --
   dba7356` returned NOT REVIEWED, because the
   ref cell held only the slash-form branch token and that branch no longer
   resolves locally, so the throttling record could not prevent a repeat review.
   Appended a superseding record keyed to the landed SHA; the same lookup now
   returns ALREADY REVIEWED. The original row is retained, per the ledger's
   append-only rule.

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

* docs: record consolidated PR reviews

* docs: record ingestion recovery review

* docs(visual): document the platform-scoped baseline layout and how to seed it

`playwright.visual.config.ts` records snapshots under
`__screenshots__/{platform}/`, so a baseline taken on Windows lands in `win32/`
and is never consulted by the `ubuntu-24.04` CI job, which reads `linux/`.
Nothing said so, and committing `win32/` images looks like protection while
providing none.

Records the constraint, names the CI artifact as the supported recorder for
`linux/` baselines, and notes that comparison stays advisory until the jobs come
off `continue-on-error`. Also creates the tracked directory `.gitignore` already
claims exists, which sets `ui_changed=true` (`scripts/ci-change-scope.mjs`) so
the visual job can run and produce that first artifact.

No baselines are added here — they cannot be produced on this platform.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs: correct visual baseline adoption steps

* docs: record visual baseline guidance review

* fix(ui): repair mockup accent token references

* docs: record token-reference repair review

* docs: archive advisory UI scoping task

* docs: record advisory UI closure review

* issues: archive #151 after #1494 and mark #143 fully resolved

PR #1494 landed the fail-open guard on main, so close the open salvage
row and update the #143 archive from PARTIAL to resolved across #1442
and #1494. Also carries the merge of origin/main that cleared the
GitHub DIRTY mergeability state.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): record PR #1490 main-sync and #151 closeout

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): record #1496 id-collision renumber for PR #1490

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* issues: record the withdrawn live-region finding as #151 so it is not re-filed

Archive-only row. There is no defect and no work to do — the row exists purely
as a guard rail against repeating a misreading that already happened once.

search-results-header-band.tsx sets aria-live={faulted ? "off" : "polite"} on
its count/status span, which reads like a silenced failure announcement. It is
not: the band mounts a separate fault panel with role="alert" carrying the
failure title, body and Retry, and the mute is deliberate so the two do not both
speak. The reasoning is in a comment directly above the attribute, and
tests/search-results-header-band.dom.test.tsx pins it with singular role queries
that throw on duplicates.

During session 2026-07-30 (PR #1481) this was filed as a real P2 defect on the
strength of the attribute alone, and the proposed fix — escalating the count span
to role="alert"/aria-live="assertive" — would have produced a duplicate
announcement and a red test, making it worse than no change. Codex caught it.
An earlier withdrawal row was then lost to the squash that merged #1481, which
is the row-deletion shape #148 now guards against.

Also records that the mockup's escalation is correct in the mockup and must not
be ported: search-refine-adaptive-mockups.tsx has no fault panel, so there the
count span is the only announcement channel.

#148 needed no work — the merge-base deletion check landed on main
independently, and its output now reports the base it compared against.

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

* docs(rag): record refuted lexical probe collapse (#98)

* issues: capture the residual id-allocation hazard as #151

#133 is resolved: #1444 removed merge=union and #1479 excluded the ledger from
Prettier, which together fixed conflict frequency. Neither changes id
allocation, which is still read-modify-write against the next-id marker, so
concurrent branches still claim the same number.

Measured on PR #1451: one row was renumbered #135 -> #141 -> #145 -> #147 ->
#149 across four sync cycles. The sharper finding is that GitHub's Update-branch
button resolved one such collision into duplicate #141 rows with the marker left
below main's highest id — git reported success and only
check:outstanding-issues caught it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(issues): attribute the mobile CLS breach — a 128px reserve round trip

#147 asked which elements shift. Driving Chromium against the same
offline production build with a PerformanceObserver on layout-shift
(Lighthouse mobile emulation, reading entry.sources[].node) gives one
dominant cause on all four breaching routes: the entire main content
region moves down 128px and straight back up 128px within 15-60ms. Both
moves score, so it is pure cost with zero net movement — 100% of
/documents/search's 0.220 and about 75% of /dsm's.

The shifting element is the max-sm:pt-[var(--phone-overlay-chrome-h)]
wrapper around <main>. A MutationObserver timeline on the root style
attribute pins the mechanism rather than inferring it: the property goes
CSS seed -> 200px -> 72px, and the 200px is written when the header
stack ALREADY measures 72px (t=1552ms reserve=200px stack=72, corrected
at t=1612ms). usePhoneOverlayChromeReserve reads stack.offsetHeight
while the stack is transiently tall, publishes a value that is stale by
the time it lands, and its ResizeObserver then corrects it.

The CSS seed at globals.css:375 is correct for the settled stack, which
corrects the mechanism recorded on the now-archived #130 — that framed
the defect as the seed under-reserving by 0-8px. Measured, the driver is
a 128px transient over-reserve written by the hook, not the seed. / is
the control: it never writes the property and is the one clean route.

Variance is stated rather than smoothed: /dsm measured 0.363 and 0.219
across two runs, and this harness has no network throttling so /forms
and /therapy-compass run high locally. Only /dsm, /documents/search and
/ reproduced the live dispatch exactly.

Also recorded: attaching a MutationObserver to document.documentElement
inside a Playwright addInitScript throws before the document element
exists, silently killing the CLS observer and reporting a uniform
CLS=0.000 — a false clean bill that voided one run of this harness.

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

* docs(ledger): record the #151 capture review for PR #1506

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(review): clarify snapshot branch state

* docs(ledger): record PR #1490 main sync after snapshot wording

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs: archive rendered style contract task

* docs: record style contract closure review

* docs: record synced style contract review

* docs: record post-121 style closure review

* docs: normalize style review ledger after sync

* docs: record post-1490 style closure review

* docs: record consolidated PR 1490 review

* docs: record replacement consolidation review

* docs: record reconciled consolidation review

* docs: record post-1511 consolidation review

* docs: normalize PR 1510 ledger after main sync

* docs: record PR 1510 post-sync review

* docs: correct false #98 canary evidence and NOTES triage

Remove the incorrect probe-collapse canary attribution from #98 and
point the unread --med-accent-soft note at #157 without breaking the
seven-token TOKENS_MISSING accounting.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): record PR #1510 evidence-correction review

Supersede the prior approve-with-no-findings row after correcting the
false #98 canary attribution and NOTES triage drift.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs: keep concurrency note inside issue table

* docs: record post-1513 consolidation review

* docs: address CodeRabbit notes on PR #1510

Fix the computed-value-time wording in design-sync notes, give #33 a
unique recommended-queue order, and drop the duplicated #98 Done block.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): record PR #1510 CodeRabbit fix review

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo BigSimmo reopened this Jul 31, 2026
@supabase

supabase Bot commented Jul 31, 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 ↗︎.

@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent Work this open PR (confirm number + GitHub head first). Start from
origin/ matching that head; preserve unrelated local WIP.
Do not merge, force-push, rebase, or arm auto-merge. No provider-backed
gates without approval. If you can’t push or resolve threads: diagnose +
comment only.

Goal: review + Bugbot the tip, fix actionable issues with smallest changes,
clear merge/required-CI/thread blockers, push fixes, post one PR summary.
Stay light — no full local verify:* / Playwright / broad suites unless
needed to prove one concrete fix. Don’t regenerate large assets unless required.

  1. Snapshot tip, behind/ahead, mergeable, merge-tree (real conflict vs
    behind-but-clean), required checks on that tip, unresolved actionable
    threads. Missing checks while dirty ≠ green. If the tip moves mid-work,
    re-snapshot.
    npm run ledger:lookup -- <branch> --scope "PR #<n> review+bugbot+fix".
    If already reviewed at this HEAD/scope and still clean with required checks
    green and no new actionable threads: summarize, comment, stop.

  2. Unblock once: real conflict → merge origin/main (for ledger/issues churn,
    prefer main’s queues, keep this PR’s notes); behind-but-clean → sync once
    (wait if required CI is in flight); else leave. No sync thrash.
    If auto-merge is already armed, push only for a real blocker.

  3. Review + Bugbot the delta vs base. High-confidence only (correctness,
    security, privacy, auth, data loss, migrations/RLS, clinical/RAG/source,
    prod reliability, user-facing). Separate PR-introduced defects from
    pre-existing re-emitted data. For generated assets, review generator/
    contracts/aliases/cache — not every generated line. If RAG/governance
    surfaces are touched, note/fix PR body only when policy text is wrong
    or missing. Ignore bot summary/rate-limit noise.

  4. Fix P0/P1 always; fix clear scoped P2; otherwise short disposition reply
    then resolve. Fix required-check failures on this tip only (ignore advisory).
    Prove with the smallest targeted check only. No broad refactors.

  5. Format + commit before push. Push only this PR’s fix commits. Append ledger
    for the final GitHub head + scope above (--supersede on a requested fresh
    same-HEAD pass). Never push a ledger-only tip.

  6. Post one concise top-level PR comment: tip SHA, sync, fixed vs dispositioned,
    required CI status, residual risks. Leave merge to me. Inline comments only
    for remaining open P0/P1 needing a human decision.

Stop when merge-tree clean, no actionable threads left, and required checks are
green or clearly in progress on the current tip.

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

PR #1451 @ tip fff95d31 — unblocked and in good shape.

Snapshot → sync

  • Head matched 913db45c; real conflict vs main (not behind-but-clean); 0 threads; required CI missing while dirty
  • Merged origin/main (main moved again mid-work with #1521 — second sync)
  • Kept main’s issues queue; preserved #094/#141 evidence; archived #161 (mockup tokens already fixed on main)

Review / Bugbot

  • No actionable threads; no P0–P2 in the unique delta
  • Unique tip delta is docs only: NOTES + outstanding-issues + ledger (mockup CSS already on main)

Status now

  • merge-tree clean · GitHub MERGEABLE
  • PR mergeability / PR policy SUCCESS on tip
  • Other required checks in progress on fff95d31
  • Summary comment posted; merge left to you
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 31, 2026 04:59
Resolve NOTES/issues/mockup conflicts: keep main's #157 med-accent and
queues, preserve PR #1451 attribution, archive #161 now that mockup hover
tokens are repaired.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Resolve outstanding-issues against #1521: keep main's new queue rows,
preserve #94/#141 token evidence, and keep #161 archived as resolved.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

PR #1451 review + Bugbot + fix summary

Tip: fff95d31 on claude/frosty-mayer-2c6167
Sync: merged origin/main twice (through #1521); git merge-tree clean; GitHub mergeable: MERGEABLE
Threads: 0 unresolved (Codex / Bugbot / Copilot / human) — nothing to fix or disposition
Unique delta vs main: .design-sync/NOTES.md, docs/outstanding-issues.md, docs/branch-review-ledger.md only

Fixed

  • Real conflicts in NOTES / outstanding-issues / mockup comment wording
  • Prefer main’s issues queue (#157 med-accent-soft, new #162+ rows); kept this PR’s #094 / #141 token-reference evidence
  • Archived #161 as resolved (mockup --primary-hover / --success-hover already repaired on main; tip matches)

Review / Bugbot

  • No high-confidence P0–P2 in the unique docs delta
  • Mockup CSS repair is no longer a unique code delta (already on main); this tip is evidence/NOTES reconciliation

Required CI

  • PR mergeability SUCCESS, PR policy SUCCESS on this tip
  • Remaining required jobs in progress on fff95d31 (Change scope / Semgrep / Gitleaks / …)
  • Prior dirty/missing-check rollup was conflict/staleness, not a product failure

Residual

  • PR body Final-scope still mentions follow-up #149 (stale id; live open row is #157) — policy RAG impact: line remains accurate; risk class still non-clinical / non-RAG-ranking
  • Ledger row recorded at pre-amend merge SHA da0b7d5a (same tree family as tip; avoided a ledger-only tip)

Merge left to you.

@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent fix merge conflict

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Merge conflict on PR #1451 is cleared.

It was behind-but-clean staleness (GitHub DIRTY, merge-tree already clean), not a real content fight. I merged origin/main and pushed.

  • Tip: 3bfcc545 on claude/frosty-mayer-2c6167
  • GitHub: mergeable: MERGEABLE (blocked only while required checks catch up)
  • vs main: ahead 42 / behind 0, merge-tree clean
Open in Web Open in Cursor 

Sync behind-but-clean tip for PR #1451 after main advanced (#1435/#1439/#1447/#1460).

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Merge conflict cleared on tip 3bfcc545.

GitHub had reported DIRTY/CONFLICTING against stale head fff95d31, but git merge-tree was already clean — behind-but-clean staleness after main advanced (#1435 / #1439 / #1447 / #1460).

  • Merged origin/main (8e158e79); auto-merge, no content conflicts
  • Tip 3bfcc545 · merge-tree clean · GitHub mergeable: MERGEABLE (state BLOCKED only while required checks catch up)
  • Ahead 42 / behind 0 vs origin/main
  • Outstanding-issues guard still green; no ledger dedupe needed

Merge left to you.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 31, 2026 05:44
@BigSimmo
BigSimmo merged commit a99de86 into main Jul 31, 2026
23 checks passed
@BigSimmo
BigSimmo deleted the claude/frosty-mayer-2c6167 branch July 31, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-branch-sync Opt out of hosted pr-branch-sync / update-branch on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants