Skip to content

fix(ui): bring the overseas AI line back on the Answer home, centred - #3606

Merged
gitar-bot[bot] merged 6 commits into
mainfrom
claude/project-thread-q7uuaz
Oct 17, 2026
Merged

gitar-bot[bot] merged 6 commits into
mainfrom
claude/project-thread-q7uuaz

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

User description

Summary

  • Before: since fix(ui): remove the overseas AI line from the Answer home #3598 the Answer home had no line saying where a question goes. The line only showed under each answer.
  • After: the Answer home shows the same line again, centred under the home content to match the line under each answer. It only appears in Answer mode, never in demo mode, and the composer does not move.
  • Both places use the one shared wording, so when Answer page tidy-up: amber line under a shorter notice, square chips, plain rows #3605 shortens it to "Sent to OpenAI overseas. Don't include patient details." the home picks that up too. This PR does not touch the wording.
  • Decision recorded in docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md. The earlier removal record is marked superseded.

Areas touched: App experience, Knowledge and records

Verification

  • Checks run:
    • npx vitest run tests/answer-provider-notice.dom.test.tsx: Tests 2 passed (2)
    • npm run check:decisions: 136 entries, 1 full records, 0 errors, 0 warnings
    • Prettier and ESLint on changed files: clean
    • Browser checks: left to CI.

Risk and rollout

  • Risk: low. One display line on the Answer home.
  • Rollback: revert this PR.
  • Provider or production effects: None

Notes

Owner chose "Bring it back restyled" in the project thread on 17 Oct 2026.


Generated by Claude Code


Summary by cubic

Brings the overseas AI line back to the Answer home so users see where their question goes before sending it. The line disappeared in #3598 and only showed under each answer.

The line is centred below the home content and only appears in Answer mode, never in demo mode, so the composer does not move. The home and its line share one canvas grid item, so tall desktop windows cannot split them into two stretched rows. Both places use the one shared wording from answer-provider-notice.tsx, so the shortened wording from #3605 applies on the home too. Records the decision and marks the earlier removal record as superseded.

Written for commit aa1f6ba. Summary will update on new commits.

View guided diff Turn on auto-fix


CodeAnt-AI Description

Bring back the overseas AI notice on the Answer home

What Changed

  • The Answer home now shows a centred notice explaining that questions go to OpenAI overseas and asking users not to include patient details.
  • The notice also appears under answers, uses the same wording in both places, and is hidden in demo mode.

Impact

✅ Clearer overseas processing disclosure before asking
✅ Patient-detail warning before the first question

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • New Features
    • The provider notice now appears centered beneath the content on the Answer home, before the first question. It continues to appear beneath the latest answer, keeping the notice visible in both places.

The owner chose to keep the line on the Answer home in the same centred style
as the line under each answer. Both use the one shared wording.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ
@supabase

supabase Bot commented Oct 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 ↗︎.

@greptile-apps greptile-apps 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.

BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@codeant-ai

codeant-ai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR a69497c Oct 17, 2026 · 09:20 09:26

@codeant-ai

codeant-ai Bot commented Oct 17, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

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

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 111 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: BigSimmo/PsychSift/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 82ab41da-99a3-4c66-8b1b-186e3198ad21
📥 Commits

Reviewing files that changed from the base of the PR and between 78b3d48 and aa1f6ba.

📒 Files selected for processing: 6
  • data/repo-awareness-snapshot.json
  • docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md
  • docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md
  • src/components/ClinicalDashboard.tsx
  • src/components/clinical-dashboard/answer-provider-notice.tsx
  • tests/answer-provider-notice.dom.test.tsx

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: BigSimmo/PsychSift/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 8512d0c7-97f6-4642-8d51-52168f568e86
📥 Commits

Reviewing files that changed from the base of the PR and between db9f0f3 and 78b3d48.

📒 Files selected for processing: 6
  • data/repo-awareness-snapshot.json
  • docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md
  • docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md
  • src/components/ClinicalDashboard.tsx
  • src/components/clinical-dashboard/answer-provider-notice.tsx
  • tests/answer-provider-notice.dom.test.tsx

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

📝 Walkthrough

The Answer home now displays a centered provider notice when the selected mode is Answer and client demo mode is off. Updated decision records describe the notice placement and supersede the earlier removal decision.

Changes: Answer Home Notice

Layer / File(s) Summary
Document and render the Answer home notice
docs/decisions/*, data/repo-awareness-snapshot.json, src/components/ClinicalDashboard.tsx, src/components/clinical-dashboard/answer-provider-notice.tsx, tests/answer-provider-notice.dom.test.tsx
The decision records describe the centered Answer home notice and mark the earlier removal decision as superseded. The shared home renders the notice under the Answer-mode and non-demo conditions. The test checks its placement and mount conditions.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 78b3d

The change restores the provider notice on the Answer home outside demo mode. The supplied context establishes no concrete regression; merge readiness is minimal, subject to normal CI.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: restoring and centering the overseas AI line on the Answer home.
Description check Passed The description includes the required Summary, Verification, Risk and rollout, and Notes sections. It states the changed behavior, verification results, risk, rollback, and provider effects. The descr…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes the required Summary, Verification, Risk and rollout, and Notes sections. It states the changed behavior, verification results, risk, rollback, and provider effects. The description is complete enough for review.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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-10-17T09:24:35.313242Z a69497c 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.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Oct 17, 2026
@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Restore the centred overseas AI notice on the Answer home

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Restores the overseas AI notice before the first Answer question, centred below home content.
• Keeps the notice out of demo mode and other modes while sharing wording with answers.
• Adds a regression check and records the decision superseding the earlier removal.
Diagram

graph TD
  Dashboard["Dashboard state"] --> Home["Shared home"] --> Gate{"Answer non-demo?"} -->|Yes| Notice["Shared notice"]
  Gate -->|No| Hidden["No home notice"]
  Dashboard --> Answer["Latest answer"] -->|Non-demo| Notice
Loading
High-Level Assessment

Reuse the existing notice below home content as proposed. Duplicating its markup risks divergent wording, while placing it beside the composer would work against the stated goal of keeping the composer stationary.

Files changed (6) +45 / -18

Bug fix (1) +17 / -11
ClinicalDashboard.tsxRestore the notice below Answer-home content +17/-11

Restore the notice below Answer-home content

• Mounts the shared notice below the home state only when Answer mode is active and client demo mode is off. Its placement leaves the composer untouched.

src/components/ClinicalDashboard.tsx

Tests (1) +7 / -4
answer-provider-notice.dom.test.tsxCheck the restored home notice mount +7/-4

Check the restored home notice mount

• Updates the source-based regression check to expect two dashboard mounts and verifies the Answer-only, non-demo condition and centring classes.

tests/answer-provider-notice.dom.test.tsx

Documentation (4) +21 / -3
repo-awareness-snapshot.jsonCatalogue the new decision record +5/-0

Catalogue the new decision record

• Adds the Answer-home notice decision to the repository awareness snapshot.

data/repo-awareness-snapshot.json

2026-10-17-no-overseas-line-on-home-pages.mdMark the removal decision as superseded +3/-1

Mark the removal decision as superseded

• Links to the later same-day decision to retain a centred notice on the Answer home and updates the source reference.

docs/decisions/2026-10-17-no-overseas-line-on-home-pages.md

2026-10-17-overseas-line-centred-on-answer-home.mdRecord the centred Answer-home notice decision +11/-0

Record the centred Answer-home notice decision

• Documents the owner's choice to restore the notice on the Answer home using the same component and wording as the line under answers.

docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md

answer-provider-notice.tsxDocument both notice placements +2/-2

Document both notice placements

• Updates the component comment to reflect its use on the Answer home and beneath the latest answer; the notice wording is unchanged.

src/components/clinical-dashboard/answer-provider-notice.tsx

Comment thread src/components/ClinicalDashboard.tsx Resolved
@gitar-bot
gitar-bot Bot enabled auto-merge (squash) October 17, 2026 09:21
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 17, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 17, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo Fixer

No findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR.

@codeant-ai

codeant-ai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: aa1f6ba8
Scan Time: 2026-10-17 10:41:36 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED No IAC issues

View Full Results

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

ℹ️ 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/ClinicalDashboard.tsx Resolved
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 17, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@codeant-ai

codeant-ai Bot commented Oct 17, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

1 code suggestion

1. With an invalid server-side Supabase key outside production, the API returns a demo answer even when clientDemoMode is false, so this notice falsely says the question goes to OpenAI.

Logic error · src/components/ClinicalDashboard.tsx:2825-2827

@codeant-ai

codeant-ai Bot commented Oct 17, 2026

Copy link
Copy Markdown

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge: it shows the overseas-processing notice on the Answer home before the first question.
  • The notice is limited to Answer mode outside demo mode, and the test checks both its placement and centering.

Assessed commit: 9907d02075c8

@qodo-code-review

qodo-code-review Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (1)

Grey Divider


Action required

No findings for this group


Remediation recommended

1. Local users miss the overseas warning 🟠 Medium 🐞 Bug ≡ Correctness
Description
The new home condition suppresses AnswerProviderNotice whenever clientDemoMode is true,
including when local no-auth mode is enabled. With a configured real answer backend, that mode still
submits the question to /api/answer/stream, which can run the external answer pipeline without
showing the warning before submission.
Code

src/components/ClinicalDashboard.tsx[R2827-2828]

+                    {searchMode === "answer" && !clientDemoMode ? (
+                      <AnswerProviderNotice className="mt-2 justify-center text-center" />
Relevance

●●● Strong

Accepted precedent treats overseas disclosure as safety-critical and requires correct demo gating
before Answer submission.

PR-#3519

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Local no-auth sets the client demo flag, but the request function uses that flag only to omit the
authorization header; it still posts the question. The server independently decides whether to
return a demo answer and otherwise enters the real answer path, while the notice under a completed
answer uses the answer payload rather than the client flag.

src/lib/client-env.ts[24-35]
src/components/clinical-dashboard/answer-request.ts[35-61]
src/app/api/answer/stream/route.ts[329-343]
src/app/api/answer/stream/route.ts[222-252]
src/components/ClinicalDashboard.tsx[2995-3002]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Local no-auth mode sets `clientDemoMode` even when the answer endpoint uses a configured real backend, hiding the overseas-provider notice before a question is submitted.
## Fix Focus Areas
- src/components/ClinicalDashboard.tsx[2827-2829]
- src/lib/client-env.ts[24-35]
- src/app/api/answer/stream/route.ts[329-343]
## Recommended Fix
Use a demo-processing signal consistent with the server's answer mode to decide whether to hide the home notice. Do not treat local no-auth or browser-auth fallback alone as proof that the question will receive a demo answer.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗



Informational

2. Home notice can disappear unnoticed 🟡 Low 📜 Skill insight ☼ Reliability
Description
The added test only counts source occurrences and matches a class string, so it cannot prove the
Answer home renders the notice or that demo mode suppresses it. A dead, misplaced, or unreachable
mount would still pass, while the existing UI smoke coverage exercises only a demo answer where this
notice is intentionally absent.
Code

tests/answer-provider-notice.dom.test.tsx[R29-30]

+    expect(source.match(/<AnswerProviderNotice\b/g)).toHaveLength(2);
+    // Both mounts live in the dashboard, so nothing else in src may mount it.
Relevance

● Weak

The team rejected this exact rendered-coverage request; source checks remain accepted as
supplemental stopgaps.

PR-#3598

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The testing-review skill requires rendered frontend behavior to have UI coverage; the changed test
explicitly performs source-text checks, while the existing smoke test path uses demo mode and
therefore cannot observe the newly added non-demo home notice.

tests/answer-provider-notice.dom.test.tsx[24-39]
Skill: testing-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

Issue description
The new test verifies static source text rather than the rendered Answer home, so regressions in mounting, layout placement, or the Answer-only/demo-mode condition can pass unnoticed.

Fix Focus Areas
- tests/answer-provider-notice.dom.test.tsx[24-39]
- tests/ui-smoke.spec.ts[3040-3129]

Recommended Fix
Add a focused Playwright test for the non-demo Answer home that asserts the provider notice is visible, centered, and rendered below the home content without changing the composer position. Add a corresponding demo-mode assertion that the notice is absent, and keep the source-level test only for the mount-count invariant if it remains useful.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider


Resolved findings

1. The home composer shifts upward on phones ✓ Resolved
Description
The new AnswerProviderNotice is added as a second child of the shared-home canvas, whose compact
mobile classes use a growing centered flex column. On phone Answer homes, adding that notice
increases the centered stack's height and re-centers SharedHomeEmptyState, including its composer
portal slot, so the composer moves upward even though the notice itself is below it.
Code

src/components/ClinicalDashboard.tsx[R2825-2827]

+                    {searchMode === "answer" && !clientDemoMode ? (
+                      <AnswerProviderNotice className="mt-2 justify-center text-center" />
+                    ) : null}
Relevance

●●● Strong

Accepted layout-shift precedent requires reserving notice space to prevent centered home content
movement.

PR-#2313
PR-#3519

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed lines add the notice as a sibling immediately after SharedHomeEmptyState inside the
dashboard canvas. That canvas uses max-sm:flex, max-sm:flex-col, max-sm:grow, and
max-sm:justify-center for centered compact homes, while SharedHomeEmptyState contains the
desktop composer portal slot; therefore the new sibling changes the height of the centered stack
that includes the composer.

src/components/ClinicalDashboard.tsx[2825-2827]
src/components/clinical-dashboard/mode-home-canvas.ts[34-43]
src/components/clinical-dashboard/dashboard-mode-surface.ts[315-320]
src/components/mode-home-template.tsx[315-335]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Answer home notice is rendered as a sibling inside the centered mobile home canvas. Because that canvas uses a growing, vertically centered flex column, the notice increases the stack height and moves the existing composer upward on compact phones.

## Fix Focus Areas
- src/components/ClinicalDashboard.tsx[2825-2827]
- src/components/clinical-dashboard/mode-home-canvas.ts[34-43]
- src/components/mode-home-template.tsx[315-335]

## Recommended Fix
Render the notice outside the vertically centered home-content canvas, or otherwise take it out of the canvas's centering flow while keeping it visually below the shared home content. Preserve the existing Answer-only and non-demo conditions, and add or update a mobile layout test that verifies the composer position is unchanged when the notice is present.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
❌ Tickets: failed to load — Ticket collection could not establish complete evidence
✅ Compliance rules (platform): 9 rules
✅ Cross-repo context — repo relationships
Review mode: Auto: ⚖️ Balanced: Localized UI change, but conditional rendering and composer positioning carry real behavioral risk.
✅ Fix-loop round: fix loop

Grey Divider

Tip of the day
💡 Did you know, you can see how risky a PR is at a glance with blast radius labels

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit aa1f6ba

Results up to commit 9907d02 🚀 Fast


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (1)


Action required

No findings for this group


Remediation recommended

No findings for this group


Informational
1. Home notice can disappear unnoticed 🟡 Low 📜 Skill insight ☼ Reliability
Description
The added test only counts source occurrences and matches a class string, so it cannot prove the
Answer home renders the notice or that demo mode suppresses it. A dead, misplaced, or unreachable
mount would still pass, while the existing UI smoke coverage exercises only a demo answer where this
notice is intentionally absent.
Code

tests/answer-provider-notice.dom.test.tsx[R29-30]

+    expect(source.match(/<AnswerProviderNotice\b/g)).toHaveLength(2);
+    // Both mounts live in the dashboard, so nothing else in src may mount it.
Relevance

● Weak

The team rejected this exact rendered-coverage request; source checks remain accepted as
supplemental stopgaps.

PR-#3598

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The testing-review skill requires rendered frontend behavior to have UI coverage; the changed test
explicitly performs source-text checks, while the existing smoke test path uses demo mode and
therefore cannot observe the newly added non-demo home notice.

tests/answer-provider-notice.dom.test.tsx[24-39]
Skill: testing-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

Issue description
The new test verifies static source text rather than the rendered Answer home, so regressions in mounting, layout placement, or the Answer-only/demo-mode condition can pass unnoticed.

Fix Focus Areas
- tests/answer-provider-notice.dom.test.tsx[24-39]
- tests/ui-smoke.spec.ts[3040-3129]

Recommended Fix
Add a focused Playwright test for the non-demo Answer home that asserts the provider notice is visible, centered, and rendered below the home content without changing the composer position. Add a corresponding demo-mode assertion that the notice is absent, and keep the source-level test only for the mount-count invariant if it remains useful.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗



Resolved findings

1. The home composer shifts upward on phones ✓ Resolved
Description
The new AnswerProviderNotice is added as a second child of the shared-home canvas, whose compact
mobile classes use a growing centered flex column. On phone Answer homes, adding that notice
increases the centered stack's height and re-centers SharedHomeEmptyState, including its composer
portal slot, so the composer moves upward even though the notice itself is below it.
Code

src/components/ClinicalDashboard.tsx[R2825-2827]

+                    {searchMode === "answer" && !clientDemoMode ? (
+                      <AnswerProviderNotice className="mt-2 justify-center text-center" />
+                    ) : null}
Relevance

●●● Strong

Accepted layout-shift precedent requires reserving notice space to prevent centered home content
movement.

PR-#2313
PR-#3519

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed lines add the notice as a sibling immediately after SharedHomeEmptyState inside the
dashboard canvas. That canvas uses max-sm:flex, max-sm:flex-col, max-sm:grow, and
max-sm:justify-center for centered compact homes, while SharedHomeEmptyState contains the
desktop composer portal slot; therefore the new sibling changes the height of the centered stack
that includes the composer.

src/components/ClinicalDashboard.tsx[2825-2827]
src/components/clinical-dashboard/mode-home-canvas.ts[34-43]
src/components/clinical-dashboard/dashboard-mode-surface.ts[315-320]
src/components/mode-home-template.tsx[315-335]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The Answer home notice is rendered as a sibling inside the centered mobile home canvas. Because that canvas uses a growing, vertically centered flex column, the notice increases the stack height and moves the existing composer upward on compact phones.

## Fix Focus Areas
- src/components/ClinicalDashboard.tsx[2825-2827]
- src/components/clinical-dashboard/mode-home-canvas.ts[34-43]
- src/components/mode-home-template.tsx[315-335]

## Recommended Fix
Render the notice outside the vertically centered home-content canvas, or otherwise take it out of the canvas's centering flow while keeping it visually below the shared home content. Preserve the existing Answer-only and non-demo conditions, and add or update a mobile layout test that verifies the composer position is unchanged when the notice is present.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit 78b3d48 ⚖️ Balanced


🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required

No findings for this group


Remediation recommended
1. Local users miss the overseas warning 🟠 Medium 🐞 Bug ≡ Correctness
Description
The new home condition suppresses AnswerProviderNotice whenever clientDemoMode is true,
including when local no-auth mode is enabled. With a configured real answer backend, that mode still
submits the question to /api/answer/stream, which can run the external answer pipeline without
showing the warning before submission.
Code

src/components/ClinicalDashboard.tsx[R2827-2828]

+                    {searchMode === "answer" && !clientDemoMode ? (
+                      <AnswerProviderNotice className="mt-2 justify-center text-center" />
Relevance

●●● Strong

Accepted precedent treats overseas disclosure as safety-critical and requires correct demo gating
before Answer submission.

PR-#3519

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Local no-auth sets the client demo flag, but the request function uses that flag only to omit the
authorization header; it still posts the question. The server independently decides whether to
return a demo answer and otherwise enters the real answer path, while the notice under a completed
answer uses the answer payload rather than the client flag.

src/lib/client-env.ts[24-35]
src/components/clinical-dashboard/answer-request.ts[35-61]
src/app/api/answer/stream/route.ts[329-343]
src/app/api/answer/stream/route.ts[222-252]
src/components/ClinicalDashboard.tsx[2995-3002]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Local no-auth mode sets `clientDemoMode` even when the answer endpoint uses a configured real backend, hiding the overseas-provider notice before a question is submitted.
## Fix Focus Areas
- src/components/ClinicalDashboard.tsx[2827-2829]
- src/lib/client-env.ts[24-35]
- src/app/api/answer/stream/route.ts[329-343]
## Recommended Fix
Use a demo-processing signal consistent with the server's answer mode to decide whether to hide the home notice. Do not treat local no-auth or browser-auth fallback alone as proof that the question will receive a demo answer.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗



Informational

No findings for this group

Grey Divider

Qodo Logo

Comment thread src/components/ClinicalDashboard.tsx Resolved
On tall desktop windows the home canvas grid split them into two stretched
rows, leaving the line far below the home.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ
gitar-bot[bot]
gitar-bot Bot previously approved these changes Oct 17, 2026

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

The centred home stack no longer grows in Answer mode, so the home and its
composer sit in the same place in every mode, on phones and desktop.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSauML59o7cTRNznSdX4sQ
Comment thread src/components/ClinicalDashboard.tsx Resolved
@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 78b3d48

Copy link
Copy Markdown
Owner Author

On the CodeAnt nitpick (an invalid server-side Supabase key outside production gives a demo answer while the home line says OpenAI): this is non-production only, and the line errs towards over-warning, which is the safe direction for a privacy notice. No change. Qodo's high finding (the composer shifting) is fixed in 00bc6a5. The line is now out of layout flow, and the composer position measured the same with and without it at four viewport sizes.


Generated by Claude Code

@gitar-bot gitar-bot 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.

Gitar has auto-approved this PR (configure)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 00bc6a5

@qodo-code-review

qodo-code-review Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

No code changes since the last review — review skipped

Qodo Logo

@gitar-bot

gitar-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk · Adding an overseas-processing and patient-detail warning to the Answer home could be missed or misunderstood, allowing users to submit sensitive details.

Restores the overseas AI notice on the Answer home, centred beneath the home content and shown only in Answer mode, using the same shared wording as the line under each answer. No open issues found.

✅ 1 closed
Closed: Quality: Answer line isn't centred, so the two lines still look different

📄 src/components/ClinicalDashboard.tsx:2822-2826 📄 src/components/ClinicalDashboard.tsx:2996 📄 docs/decisions/2026-10-17-overseas-line-centred-on-answer-home.md:6-8
The new comment (ClinicalDashboard.tsx:2822-2824) and the decision record both say the home line is centred "to match the line under each answer". But the line under each answer is still mounted as <AnswerProviderNotice className="mt-1" /> (line 2996). That line has no justify-center/text-center, and the component's base classes (flex items-start) put it on the left. So the owner's "same style" choice isn't what ships: the home line is centred and the answer line is left-aligned. One fix is to centre the answer-line mount too. The other is to correct the comment and decision record so they say only the home line is centred.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Approved

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 4 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🟠 Medium blast radius size:M This PR changes 30-99 lines, ignoring generated files 🕐 10-20 Minutes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants