Skip to content

Clarify shared mode headings — remove subtitle and use explicit mode titles - #1826

Merged
BigSimmo merged 9 commits into
mainfrom
codex/remove-text-from-all-headings
Aug 11, 2026
Merged

Clarify shared mode headings — remove subtitle and use explicit mode titles#1826
BigSimmo merged 9 commits into
mainfrom
codex/remove-text-from-all-headings

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Clean up the shared-mode home hero by removing the repeated secondary subtitle so the icon + large heading read as a single clear mode label.
  • Replace generic question-style headings with explicit mode names so the large heading communicates the actual mode at a glance.

Description

  • Make the hero subtitle optional and render it only when present by changing ModeHomeHero / ModeHomeTemplate to accept an optional subtitle and conditionally render the <p> element. (src/components/mode-home-template.tsx)
  • Stop passing the shared-empty-state subtitle into the shared-mode hero so the shared home shows only icon + title. (src/components/clinical-dashboard/answer-status.tsx)
  • Replace question-style headings with explicit mode names (e.g. Clinical Answers, Differential Diagnosis, Medication Guidance, Therapy Compass, Patient Factsheets, etc.) in the centralized copy. (src/lib/ui-copy.ts)
  • Update the unit test expectations for the shared-home empty state to assert the new titles and that no subtitle paragraph is rendered. (tests/shared-home-empty-state.dom.test.tsx)
  • Files changed: src/components/mode-home-template.tsx, src/components/clinical-dashboard/answer-status.tsx, src/lib/ui-copy.ts, tests/shared-home-empty-state.dom.test.tsx.

Testing

  • Ran the focused unit test: node scripts/run-vitest.mjs run tests/shared-home-empty-state.dom.test.tsx which passed (the updated test file runs and the 15 assertions in that file succeeded).
  • Verified the running app with npm run ensure and a quick Playwright screenshot check at 390×844 and 1440×900 to confirm headings remain centered and unclipped in phone and desktop viewports.
  • Ran npm run typecheck and npm run format; both completed successfully.
  • Ran the full test suite (npm run test); the run showed a very large number of passing tests but 5 unrelated tests in tests/pr-handoff-stop.test.ts failed / timed out (these failures are in the PR-handoff hook area and are not caused by the UI/title changes). The full-run summary was: ~6061 tests passed, 5 failed, 1 skipped.
  • Push to the remote was not performed from this environment because GitHub authentication was not available, so no remote branch/PR was created from here.

Codex Task

Summary by CodeRabbit

  • Improvements

    • Simplified shared home screens with concise clinical headings.
    • Removed unnecessary subtitle text from shared home presentations.
    • Updated responsive layouts and alignment for streamlined headings.
  • Bug Fixes

    • Prevented empty subtitle elements from appearing when no subtitle is provided.
    • Improved scrolling behavior to prevent overscrolling and support scrollable content areas.
  • Tests

    • Updated coverage for headings, icons, responsive typography, layout geometry, mode switching, and scrolling.

@supabase

supabaseBot commented Aug 11, 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 ↗︎.

@coderabbitai

coderabbitaiBot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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:6 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: 6b459d33-86be-45ee-9012-ab4f7ca954d4

📥 Commits

Reviewing files that changed from the base of the PR and between 788a44a and cb85eba.

📒 Files selected for processing (6)
  • src/lib/ui-copy.ts
  • tests/shared-home-empty-state.dom.test.tsx
  • tests/ui-accessibility.spec.ts
  • tests/ui-chrome-scroll.spec.ts
  • tests/ui-smoke.spec.ts
  • tests/ui-tools.spec.ts
📝 Walkthrough

Walkthrough

Shared home modes now use concise clinical titles without subtitles. ModeHomeHero supports optional subtitles and omits the paragraph when none is provided. Tests cover updated copy, subtitle absence, responsive geometry, and bounded scrolling.

Changes

Shared home copy and rendering

Layer / File(s)Summary
Presentation contract and clinical labels
src/components/mode-home-template.tsx, src/lib/ui-copy.ts
subtitle is optional for mode home props. Shared home presentations now contain concise titles without subtitles.
Conditional hero rendering and UI validation
src/components/mode-home-template.tsx, tests/shared-home-empty-state.dom.test.tsx, tests/ui-tools.spec.ts
The hero omits subtitle paragraphs when no subtitle exists. Tests validate updated titles, subtitle absence, and responsive measurements.

Chrome scroll test behavior

Layer / File(s)Summary
Bounded incremental scrolling
tests/ui-chrome-scroll.spec.ts
scrollBy selects the main content scroller or browser wheel input, applies bounded increments, dispatches scroll events, and waits between steps.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly summarizes the main changes: removing shared-mode subtitles and replacing headings with explicit mode titles.
Description check✅ PassedThe description clearly covers the motivation, implementation, verification results, and known unrelated test failures.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/remove-text-from-all-headings

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

@github-actions

github-actionsBot commented Aug 11, 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 requiredmain-side: the same job also failed on the latest completed main CI run.

Compared with main CI run #9747 (failure).

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

@BigSimmo
BigSimmo enabled auto-merge August 11, 2026 17:05

@coderabbitaicoderabbitaiBot 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.

Actionable comments posted: 1

🤖 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 `@src/lib/ui-copy.ts`:
- Around line 23-24: Change the answer.title value in src/lib/ui-copy.ts at
lines 23-24 from “Clinical Guidance” to “Clinical Answers”; update the expected
title in tests/shared-home-empty-state.dom.test.tsx lines 10-12 and both heading
expectations in tests/ui-tools.spec.ts lines 575 and 1108 to match “Clinical
Answers”.
🪄 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: b73db5a6-8050-45c4-aed2-44dad3d25e42

📥 Commits

Reviewing files that changed from the base of the PR and between 046feb3 and 9d0ddb8.

📒 Files selected for processing (5)
  • src/components/clinical-dashboard/answer-status.tsx
  • src/components/mode-home-template.tsx
  • src/lib/ui-copy.ts
  • tests/shared-home-empty-state.dom.test.tsx
  • tests/ui-tools.spec.ts
💤 Files with no reviewable changes (1)
  • src/components/clinical-dashboard/answer-status.tsx

Comment threadsrc/lib/ui-copy.ts Outdated

@coderabbitaicoderabbitaiBot 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/ui-chrome-scroll.spec.ts (1)

164-164: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Wait for frame and task completion, not only 16 ms.

page.waitForTimeout(16) is a wall-clock delay. It does not guarantee a frame or a React commit. tests/playwright-scroll.ts, Lines 160-193, waits for two requestAnimationFrame callbacks and one task to avoid event coalescing and state races. Reuse that synchronization or an equivalent helper before the next step.

As per coding guidelines, tests/ui-*.spec.ts must use Playwright with the appropriate Chromium UI gate and start the project with npm run ensure.

🤖 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-chrome-scroll.spec.ts` at line 164, Replace the fixed
page.waitForTimeout(16) in the affected test flow with the synchronization used
by tests/playwright-scroll.ts: wait for two requestAnimationFrame callbacks and
one task, or reuse an equivalent helper, before the next step. Ensure
tests/ui-*.spec.ts uses Playwright with the appropriate Chromium UI gate and
starts the project via npm run ensure.

Source: Coding guidelines

🤖 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-chrome-scroll.spec.ts`:
- Around line 141-144: Update the scroll-owner selection in both scrollBy and
readChromeState to reuse the shared predicate used by the existing helper,
including the overflowY auto/scroll/overlay requirement rather than checking
dimensions alone. Keep document-scrolling behavior and state reporting
consistent with the shared predicate’s result.
---
Nitpick comments:
In `@tests/ui-chrome-scroll.spec.ts`:
- Line 164: Replace the fixed page.waitForTimeout(16) in the affected test flow
with the synchronization used by tests/playwright-scroll.ts: wait for two
requestAnimationFrame callbacks and one task, or reuse an equivalent helper,
before the next step. Ensure tests/ui-*.spec.ts uses Playwright with the
appropriate Chromium UI gate and starts the project via npm run ensure.
🪄 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: 79722ba7-bc00-4cde-8e8e-4ef9819eb044

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0ddb8 and 788a44a.

📒 Files selected for processing (2)
  • tests/ui-chrome-scroll.spec.ts
  • tests/ui-tools.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/ui-tools.spec.ts

Comment threadtests/ui-chrome-scroll.spec.ts Outdated
@BigSimmo
BigSimmo merged commit 1e461d5 into mainAug 11, 2026
25 checks passed
@BigSimmo
BigSimmo deleted the codex/remove-text-from-all-headings branch August 11, 2026 20:00
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

PR #1826 babysit summary (this sweep)\n\n- Tip reviewed:cb85eba (codex/remove-text-from-all-headings)\n- Upstream snapshot: behind/ready state: behind origin/main by 21 commits, merge-tree clean, no conflicts (git merge-tree 45fd05c origin/main HEAD), merge checks currently report all required check suites PASS.\n- PR-state checks: PR policy, PR mergeability, Change scope, Semgrep, Semgrep ingestion, Safety and config, Static PR checks, Unit coverage, Build, Production UI critical, Production UI (1|2|3), and PR required all PASS; skipped checks unchanged\n- Fixed vs disposed:\n - ✅ Fixed: resolved strict-mode collisions caused by changed heading text by updating assertions to exact Clinical Answers in\n - ests/ui-accessibility.spec.ts\n - ests/ui-smoke.spec.ts\n - ✅ Implemented earlier in this PR stream (kept): Clinical Answers naming and shared scroll-owner predicate in\n - src/lib/ui-copy.ts\n - ests/shared-home-empty-state.dom.test.tsx\n - ests/ui-tools.spec.ts\n - ests/ui-chrome-scroll.spec.ts\n - ✅ Dispositioned threads: CodeRabbit actionable notes for required answer title and shared scroll-owner predicate are fully addressed and resolved in this head.\n- Local proof on this tip:\n -

pm run test:e2e:chromium -- tests/ui-smoke.spec.ts tests/ui-accessibility.spec.ts (113 passed)\n - CI run 31529693254 with all required checks passing.\n- Residual risk: branch remains 21 commits behind main at this moment; mergeable state returned UNKNOWN in one read, so a final mergeability refresh before merge is still expected on the normal PR process.\n\nMerge left to you; no additional action taken by me beyond review/fix work on this sweep.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@BigSimmo