Skip to content

Answer page: "Report a problem" opens as a sheet, not a panel behind the composer - #2541

Merged
BigSimmo merged 6 commits into
mainfrom
claude/answer-page-handover-c2qlwy
Sep 2, 2026
Merged

Answer page: "Report a problem" opens as a sheet, not a panel behind the composer#2541
BigSimmo merged 6 commits into
mainfrom
claude/answer-page-handover-c2qlwy

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Open the answer's "Report a problem" list as a Sheet rather than an in-flow disclosure below the utility row. On a phone the disclosure opened partly behind the fixed composer, and it could not scroll itself clear: every scripted scroll that would do it is a downward scroll, a downward scroll is what hides the phone chrome, and closing the panel then shrank the page back to the top without generating the upward travel that reveals the chrome again — so the composer stayed gone. ui-smoke's critical answer journey caught exactly that, twice, and the auto-scroll was reverted both times.
  • Reachability was never the defect. Measured at 390×844, the last option cleared the composer by 180px at full scroll. The defect was that the list looked complete when it was not. A sheet answers both halves at once: it owns its own scrollport above the composer, so nothing is clipped and no page scroll is needed.
  • It is also the same overlay the safety-findings control beside it already opens. mobilePlacement defaults to "bottom", so it rises from the bottom on a phone and is a centred dialog from sm: up.
  • The trigger becomes a dialog opener — aria-haspopup="dialog", focus returned to it on close — rather than a disclosure. aria-expanded and the aria-controls target are kept.
  • AnswerFeedbackPanel gains chrome="bare", which drops its card border and its own heading pair for a host that already carries them: the sheet's title and description are answerFeedbackQuestion, now exported so the two cannot drift apart. Asking the same question twice in one overlay is the duplication that prop exists to avoid. The default chrome="card" leaves the full-tone panel in visual-evidence.tsx untouched.

Verification

  • npm run verify:ui646 passed (25.0m), exit 0. This includes the critical answer journey that the reverted auto-scroll broke.
  • npm run test (full offline unit suite) — Test Files 947 passed (947), Tests 12055 passed | 1 skipped (12056).
  • npm run lint — exit 0 ([gate-receipts] recorded a pass for "lint:internal" (5999 input files)). npm run typecheck — exit 0.

Verification not run: npm run verify:pr-local — its heavy scope is lint + typecheck + the full unit suite + build-backed gates, each run directly on this tree and reported above with its own output. npm run verify:release, eval:retrieval:quality, eval:rag, eval:quality and check:production-readiness are provider-backed and were not authorized; no retrieval, ranking, generation, ingestion or environment behaviour changed here.

After the gate the branch merged origin/main (documentation splits, a review record, an issue record, and the Ward Flow pinned-clock fix) with no conflict and no change to any file this branch touches.

Risk and rollout

  • Risk: Low, and confined to how one existing control presents. The list's contents, its options and what each records are unchanged; only its container is. The one behavioural difference a reader could notice is that the list is now modal — the page behind it is inert until dismissed — which is the same behaviour as the safety-findings control in the same row.
  • Rollback: revert the single commit. No data, schema, or configuration change accompanies it.
  • Provider or production effects: None.
  • RAG impact: none — no retrieval, ranking, selection, or answer-generation surface is touched; the diff is presentation placement plus its tests.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

On the sixth item: nothing about source metadata or review status is read or rendered differently here. On the seventh: no decision-support behaviour changed — no claim, ranking, citation or verification output differs — so the classification is unaffected.

Notes

  • A new ui-smoke case pins the phone geometry the old panel failed: at 390×844, with the sheet at rest and no page scroll, every option must sit inside the viewport at the repo's 48px production tap floor (not the generic 44px, which reintroduces a known flake), the affirmative "Verified" option must be absent from a list opened to report a fault, and Escape must both return focus to the trigger and leave the composer where it was.
  • The existing critical journey was updated rather than relaxed: the panel now portals out of the "Answer utilities" section, so it is asserted on the page and explicitly asserted absent from that section, which is what proves the move actually happened.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NkKHznd5E5KLnKbowRTLd8


Generated by Claude Code


Note

Low Risk
Presentation-only change to one answer feedback control; feedback options and submission behavior are unchanged aside from closing the modal so notices remain visible.

Overview
Report a problem on the answer utilities row now opens a Sheet instead of an in-flow panel under the thumbs-down control. That fixes mobile UX where the old list looked complete while options sat behind the fixed composer, and avoids the scroll trap that hid the phone chrome when trying to scroll the list into view.

The thumbs-down trigger is wired as a dialog opener (aria-haspopup="dialog", focus return via returnFocusRef). AnswerFeedbackPanel adds chrome="bare" and shared answerFeedbackQuestion copy so the sheet header owns the title/description without duplicating the card chrome. Choosing a problem type closes the sheet immediately so page-level outcome notices (success, errors, demo paths) are not hidden behind the modal backdrop.

Tests and ui-smoke now assert the portaled sheet, Escape dismissal, bare panel chrome, close-on-submit, and at 390×844 that every option is fully in the viewport at the 48px tap floor.

Reviewed by Cursor Bugbot for commit ea9887e. Configure here.

…flow panel

The list of problem types opened as a disclosure below the utility row, and
on a phone it opened partly behind the fixed composer. It could not scroll
itself clear: every scripted scroll that would do it is a DOWNWARD scroll,
a downward scroll is what hides the phone chrome, and closing the panel
then shrank the page back to the top without generating the upward travel
that reveals the chrome again — so the composer stayed gone. `ui-smoke`'s
critical answer journey caught exactly that, twice, and the auto-scroll was
reverted both times.

Reachability was never the defect. Measured at 390x844, the last option
cleared the composer by 180px at full scroll. The defect was that the list
LOOKED complete when it was not.

A Sheet answers both halves at once. It owns its own scrollport above the
composer, so nothing is clipped and no page scroll is needed, and it is the
same overlay the safety-findings control beside it already opens —
`mobilePlacement` defaults to "bottom", so it rises from the bottom on a
phone and is a centred dialog from `sm:` up. The trigger becomes a dialog
opener (`aria-haspopup="dialog"`, focus returned to it on close) rather
than a disclosure.

`AnswerFeedbackPanel` gains `chrome="bare"`, which drops its card border
and its own heading pair for a host that already carries them: the sheet's
title and description ARE `answerFeedbackQuestion`, now exported so the two
cannot drift apart, and asking the same question twice in one overlay is
the duplication that prop exists to avoid. The default `chrome="card"`
leaves the full-tone panel in `visual-evidence.tsx` untouched.

Verification: `npm run test` 12055 passed | 1 skipped; `npm run lint` and
`npm run typecheck` exit 0; the six affected Chromium journeys pass,
including the critical answer flow that the reverted auto-scroll broke. A
new `ui-smoke` case pins the phone geometry the old panel failed — at
390x844 every option must sit inside the viewport with the sheet at rest,
at the repo's 48px tap floor, and Escape must return focus to the trigger
and leave the composer where it was.

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

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 18e10ce0-d75c-4d19-bab0-b01136715567


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@supabase

supabase Bot commented Sep 2, 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 ↗︎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T05:47:03.327264Z c7d5536 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_047be90b-02b8-4318-b886-71e53f83ddba)

@BigSimmo
BigSimmo enabled auto-merge September 2, 2026 05:42

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

ℹ️ 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/clinical-dashboard/evidence-panels.tsx Outdated
@BigSimmo

BigSimmo commented Sep 2, 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/answer-page-handover-c2qlwy at starting commit c7d5536; 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/answer-page-handover-c2qlwy, 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Added a scoped submission handler that forwards the selected problem type and immediately closes the feedback sheet, allowing the existing page-level success or error notice to become visible. src/components/clinical-dashboard/evidence-panels.tsxL195-L204 src/components/clinical-dashboard/evidence-panels.tsxL297-L302
  • Extended the focused DOM regression test to verify that selecting Wrong source submits wrong_source, dismisses the sheet, and resets the trigger’s expanded state. tests/answer-support-priority.dom.test.tsxL138-L178
  • Created local commit 53f1e37daf339e22b9b18fa9a4bae48fddc6d58f on claude/answer-page-handover-c2qlwy.
  • Publication is blocked: the checkout has no GitHub credentials, so the commit could not be pushed to BigSimmo/Database. In accordance with the trigger, I did not post resolution markers or claim the review thread was fixed on the PR head. The provided make_pr MCP helper was also unusable because its runtime lacks mcp.server.fastmcp.

Testing

  • node scripts/run-vitest.mjs run tests/answer-support-priority.dom.test.tsx --reporter=dot — 1 file and 8 tests passed.
  • npm run format
  • git diff --check
  • git commit -m "fix(ui): close feedback sheet after submission"
  • ⚠️ git push origin HEAD:refs/heads/claude/answer-page-handover-c2qlwy — blocked because GitHub authentication is unavailable (could not read Username for 'https://github.com').
  • ⚠️ gh auth status — confirmed that no GitHub host is authenticated.
  • ⚠️ /opt/codex/mcp/.venv/bin/python /tmp/call_make_pr.py — the local make_pr MCP server could not start because mcp.server.fastmcp is missing.

View task →

BigSimmo and others added 3 commits September 2, 2026 14:23
…is visible

Codex P2 on #2541, confirmed against the code. `submitAnswerFeedback` in
ClinicalDashboard reports EVERY outcome through the page-level
`actionNotice` alone — success, network failure, an expired feedback token,
and synthetic demo answers — and that notice renders outside the portaled
sheet. Leaving the sheet open put it behind the backdrop with the page under
it inert, so choosing a problem type read as a tap that did nothing.

The demo and expired-token paths are the worst of it: both return before
`pendingFeedback` is ever set, so there was not even a spinner to explain
the silence. Demo mode is how the app runs without Supabase configured, so
that was the common case, not an edge one.

This did not exist while the list was an in-flow disclosure — the notice was
simply visible above it — so it is a regression introduced by the sheet in
the preceding commit, not a pre-existing fault.

Submitting now closes the sheet, which restores the notice and the focus
return to the trigger. The affirmative thumb-up path was never in a sheet
and is untouched.

Verification: the new DOM case fails without the fix (`1 failed | 8 passed`)
and passes with it, so it catches the regression rather than describing it;
`npm run test` 947 files, 12058 passed | 1 skipped; `npm run lint` and
`npm run typecheck` exit 0; focused browser proof on the owning spec —
`tests/ui-smoke.spec.ts`, 106 passed (4.5m) — with the full Chromium suite
left to CI.

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

cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_16d4eed9-8803-4e6c-9c21-f70e535a15cd)

@BigSimmo
BigSimmo merged commit 6ff6566 into main Sep 2, 2026
29 checks passed
@BigSimmo
BigSimmo deleted the claude/answer-page-handover-c2qlwy branch September 2, 2026 07:30
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.

2 participants