feat(specifiers): add guided diagnosis builder - #1881
Conversation
…at-specifier-builder-guide-specifier-builder-guide
…at-specifier-builder-guide-specifier-builder-guide
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:20 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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe specifier builder now uses a guided, multi-step workflow with progress tracking, review and edit controls, clipboard copying, reset behavior, focus management, centralized copy, expanded UI tests, and manifest registration. ChangesSpecifier builder workflow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant SpecifierBuilderPage
participant ClipboardAPI
User->>SpecifierBuilderPage: Select specifiers and navigate steps
SpecifierBuilderPage->>SpecifierBuilderPage: Render working wording and review screen
User->>SpecifierBuilderPage: Edit or copy completed wording
SpecifierBuilderPage->>ClipboardAPI: Write completed wording
ClipboardAPI-->>SpecifierBuilderPage: Return copy result
SpecifierBuilderPage-->>User: Show success or failure status
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:e8c07e97c8
ℹ️ 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".
Uh oh!
There was an error while loading. Please reload this page.
BigSimmo
commented
Aug 12, 2026
@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 codex/chat-specifier-builder-guide-specifier-builder-guide at starting commit e8c07e9; 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:codex/chat-specifier-builder-guide-specifier-builder-guide, 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
commented
Aug 12, 2026
@claude Address every currently unresolved inline review thread on this PR against the current GitHub head. The two open threads are duplicate reports of the same visual bug in |
Hi @BigSimmo — thanks for the @claude mention. Open this in Claude Code on the web to continue here: https://claude.ai/code Context: Automated backlink from the Claude backlink workflow. Claude Code can pick up the mention and push a scoped fix to the branch. |
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
BigSimmo
commented
Aug 12, 2026
Fixed the duplicate review finding on the current head. The |
BigSimmo
commented
Aug 12, 2026
@codex Address both currently unresolved inline review threads on this PR against the current GitHub head. They are duplicate reports of the same |
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/components/specifiers/specifier-builder-page.tsx (1)
313-328: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReuse
severityNotSpecifiedfor the nativecheckedprop.Line 314 recomputes the same predicate that line 185 already stores in
severityNotSpecified. The native checked state and the painted marker then derive from two separate expressions. The defect fixed in this PR came from exactly that split. One source of truth prevents the split from returning.♻️ Proposed refactor
type="radio" name="severity-remission" aria-label={specifierBuilderCopy.review.notSpecified} - checked={!selectedRecords.some((record) => record.family === "severity-remission")}+ checked={severityNotSpecified} onChange={() => chooseSeverity(null)} className="peer sr-only"🤖 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/specifiers/specifier-builder-page.tsx` around lines 313 - 328, Update the native input’s checked prop in the severity selector to use the existing severityNotSpecified value instead of recomputing the selectedRecords predicate. Keep the painted marker and checked state driven by this single source of truth.tests/ui-specifiers.spec.ts (1)
319-327: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for the clipboard failure branch.
The init script installs a
writeTextthat always resolves. The component renderserrorCopy.clipboardCopyFailedthroughrole="status"when the copy fails, and that branch stays untested.copyTextToClipboardfalls back todocument.execCommand, so a rejectingwriteTextalone does not force the failure state; the fallback must also fail.Add a second case that installs a rejecting
writeTextand removesdocument.execCommand, then assert the failure status text.🤖 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/ui-specifiers.spec.ts` around lines 319 - 327, Add a separate test near “guides choices into a reviewable and copyable diagnosis” that overrides navigator.clipboard.writeText to reject and disables document.execCommand, ensuring copyTextToClipboard cannot fall back successfully. Trigger the copy action and assert the failure message via role="status", using errorCopy.clipboardCopyFailed as the expected text.
🤖 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 `@tests/ui-specifiers.spec.ts`:
- Around line 354-359: Reorder the assertions in the copy-wording test so the
sessionStorage clipboard value is polled immediately after clicking the “Copy
wording” button, before checking the transient “Copied” label and status text.
Keep the existing expectations and values unchanged, ensuring the clipboard read
completes before the 2200 ms copyState reset.
---
Nitpick comments:
In `@src/components/specifiers/specifier-builder-page.tsx`:
- Around line 313-328: Update the native input’s checked prop in the severity
selector to use the existing severityNotSpecified value instead of recomputing
the selectedRecords predicate. Keep the painted marker and checked state driven
by this single source of truth.
In `@tests/ui-specifiers.spec.ts`:
- Around line 319-327: Add a separate test near “guides choices into a
reviewable and copyable diagnosis” that overrides navigator.clipboard.writeText
to reject and disables document.execCommand, ensuring copyTextToClipboard cannot
fall back successfully. Trigger the copy action and assert the failure message
via role="status", using errorCopy.clipboardCopyFailed as the expected text.
🪄 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: f1de2cd9-5971-4736-ad9b-40bc075e208c
📒 Files selected for processing (4)
docs/design-system/adoption-manifest.jsonsrc/components/specifiers/specifier-builder-page.tsxsrc/lib/ui-copy.tstests/ui-specifiers.spec.ts
Uh oh!
There was an error while loading. Please reload this page.
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #10286 (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
Addressed the review finding on the current head |
BigSimmo
commented
Aug 12, 2026
@claude Work only the current unresolved review finding on this PR at head |
Hi @BigSimmo — thanks for the @claude mention. Open this in Claude Code on the web to continue here: https://claude.ai/code Context: Automated backlink from the Claude backlink workflow. Claude Code can pick up the mention and push a scoped fix to the branch. |
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Verification
RAG impact: no retrieval, ranking, synthesis, or source-rendering behavior change.
Risk and rollout
Clinical Governance Preflight
Notes
Summary by CodeRabbit
New Features
Accessibility
Bug Fixes