Skip to content

fix: clear the theme-transition timer leak and let issues:done close ULID-id ledger rows - #2063

Merged
BigSimmo merged 7 commits into
mainfrom
claude/s1c-residuals-r2-r3-4pb1at
Aug 17, 2026
Merged

fix: clear the theme-transition timer leak and let issues:done close ULID-id ledger rows#2063
BigSimmo merged 7 commits into
mainfrom
claude/s1c-residuals-r2-r3-4pb1at

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

Two loose ends from the S1c session (PR #2052), each its own revertible commit:

  • fix(theme): clear and guard the theme-transition removal timer. The 200 ms setTimeout at src/components/clinical-dashboard/use-theme.ts:93 that removes .theme-transitioning leaked past DOM-test teardown and intermittently failed the Unit coverage job with an unhandled ReferenceError: document is not defined (root-caused on PR fix(rag): verify imperative dosing claims against descriptive guideline norms (packet S1c, R2+R3) #2052's first CI run: 6886/6886 tests passed, 1 unhandled error). The pending timer is now tracked — a rapid second toggle replaces it instead of stacking removals — and a firing after the environment is gone is a no-op. No behavioural change in a browser (document is always defined there).
  • fix(ledger): let issues:done fingerprint ULID display ids.issueRowFingerprint (scripts/check-outstanding-issues.mjs) matched only legacy numeric ids (^#(\d+)$), so done/update requests for reconcile-minted rows (#6BG9X2-style) were rejected as "not in Open items" and those rows were uncloseable through the CLI — PR fix(rag): verify imperative dosing claims against descriptive guideline norms (packet S1c, R2+R3) #2052 had to hand-validate its inbox JSON to close #6BG9X2. ULID display ids now match by the row's exact display id; numeric ids keep the zero-padding-tolerant number match. A new repo-hygiene test covers fingerprint lookup, done application (row moves to Resolved/archive), staleness rejection, and null for archived/nonexistent ids. Verified against the live ledger: #6BG9X2, #0MSNT8, #DP6M3G all fingerprint now.

Neither commit touches a RAG surface, retrieval, ranking, or any answer path.

Verification

  • npm run verify:pr-local
npx vitest run tests/theme.test.ts tests/settings-dialog-actions.dom.test.tsx tests/sidebar-production.dom.test.tsx
→ Tests 20 passed (20)
npx vitest run tests/repo-hygiene.test.ts → Tests 57 passed (57)
npm run verify:pr-local → PR-local verification summary:
completed: check:runtime, check:installed-lock-parity, format:changed, lint, typecheck,
test, build, check:rag:fixtures, check:medication-interactions, check:medication-lexicon-report
failed: (none) · not reached: (none)
npm run check:branch-review-ledger → Branch review ledger guard passed (880 live + 1206 archived + 285 immutable records)
  • npm run verify:ui — UI verification not run: the theme change is a timer-lifecycle guard with no visual or interaction change; no route, styling, or browser behaviour changed
  • npm run verify:release — not run: not a release-confidence claim
  • npm run check:production-readiness — not run: no clinical workflow, privacy, environment, Supabase, source governance, or deployment behaviour changed

Risk and rollout

  • Risk: low. The theme fix only narrows when the removal callback runs (guard + replace-on-reschedule); the ledger fix only widens which display ids the fingerprint can resolve — request validation, staleness checking, and apply semantics are unchanged and test-pinned.
  • Rollback: revert either commit independently before merge; single squash revert after.
  • Provider or production effects: None.

Notes

  • Follow-ups from the S1c babysit session; closes the "use-theme timer leak" and "issues:done ULID gap" loose ends. The third loose end (condition-first trigger binding) is a protected-RAG-surface change and follows separately with its own RAG impact: line and canary pair.

Generated by Claude Code

The 200 ms timeout that removes .theme-transitioning leaked past DOM-test
teardown and intermittently failed Unit coverage with 'document is not
defined' (root-caused on PR #2052's first CI run). Track the pending timer
so a rapid second toggle replaces it instead of stacking removals, and
no-op if it fires after the environment is gone.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNq5LiNDoZVaggA3mHBT5Q
issueRowFingerprint matched only legacy numeric ids, so done/update
requests for reconcile-minted rows (#6BG9X2-style) were rejected as 'not
in Open items' and those rows were uncloseable via the CLI (worked around
by hand-validated inbox JSON in PR #2052). Match ULID display ids by the
row's exact display id; numeric ids keep their zero-padding-tolerant
number match. Adds a repo-hygiene test covering fingerprint, done apply,
and staleness for a ULID row.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNq5LiNDoZVaggA3mHBT5Q
@supabase

supabaseBot commented Aug 17, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNq5LiNDoZVaggA3mHBT5Q
@chatgpt-codex-connector

Copy link
Copy Markdown

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

@BigSimmo
BigSimmo enabled auto-merge August 17, 2026 17:57
@coderabbitai

coderabbitaiBot commented Aug 17, 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:33 minutes

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

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

How can I continue?

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

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c18c98e9-60b9-4a5d-8085-b5e405d56ce6

📥 Commits

Reviewing files that changed from the base of the PR and between 02c14f5 and c9c71fd.

📒 Files selected for processing (4)
  • docs/branch-review-records/5b8f236b72e13bc70a99be7384b79d387fc2317f46ed5f222d2f5ef425a0aadc.record.md
  • scripts/check-outstanding-issues.mjs
  • src/components/clinical-dashboard/use-theme.ts
  • tests/repo-hygiene.test.ts

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

@BigSimmo
BigSimmo merged commit 66979df into mainAug 17, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the claude/s1c-residuals-r2-r3-4pb1at branch August 17, 2026 18:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@claude