Skip to content

feat(settings): edge-to-edge mobile chrome for the settings sheet#958

Merged
BigSimmo merged 9 commits into
mainfrom
claude/settings-page-components-xe4zky
Jul 20, 2026
Merged

feat(settings): edge-to-edge mobile chrome for the settings sheet#958
BigSimmo merged 9 commits into
mainfrom
claude/settings-page-components-xe4zky

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

On device the fullscreen settings sheet (src/components/clinical-dashboard/settings-dialog.tsx) had broken mobile chrome: the header lived inside the scroll region (so it scrolled away) with a floating close button and no status-bar coverage, so content bled up behind the notch/status bar; the bottom stopped short of the edge instead of running under the home indicator.

This makes the settings sheet edge-to-edge on mobile, reusing the app's existing header primitive:

  • Header → the app's .edge-glass-header + .edge-glass-header-backdrop scrim as a sticky, full-bleed glass header covering the status-bar/notch band, holding the title + a single integrated close button. It hides on scroll-down and returns on scroll-up via useScrollHideReporter (phone-gated), so the top runs fully edge-to-edge while scrolling — the same behaviour as the app's search bar. Desktop reverts to a static in-panel header (lg: resets); the two-column nav layout is unchanged.
  • Bottom → drop the panel's mobile pb-safe (max-lg:!pb-0) and carry a safe-area-aware pad on the content wrapper so content fills edge-to-edge to the physical bottom under the home indicator.
  • Full-bleed restructure → the mobile scroll container loses its horizontal padding/max-width; a centred content wrapper insets the sections so the header scrim spans the true width (no 100vw/negative-margin overflow).
  • Polish → lighten the repeated "Saved for later — not active yet" markers from a heavy bordered pill to a quiet muted caption. Text, id, aria-describedby, and per-row placement are unchanged so the inert-preferences contract holds.

No globals.css changes — it reuses existing classes (which already carry no-blur / reduced-transparency / forced-colors fallbacks).

Verification

  • npm run typecheck — clean for all src/ files.
  • npm run lint + prettier --check — clean on the changed file.
  • Manual Chromium QA (Playwright against the running app), iPhone 390×820/844 in light + dark: confirmed (a) the glass header covers the top and slides away on scroll with no status-bar bleed, (b) content runs edge-to-edge to the bottom, (c) desktop nav + panel unchanged with a single close button. Screenshots captured.
  • Automated contract assertion in Chromium passed: dialog name "Account & app", the four section headings and four row test-ids each present once, exactly 1 "Close settings" button, Escape closes, the fullscreen box fills the viewport (x0/y0/390×820), and documentElement horizontal overflow is 0.
  • npm run verify:pr-local — Verification not run: this environment's node_modules is missing the @testing-library / @axe-core dev-dependencies, so the DOM/UI suites and the build's TS-of-tests pass cannot run here; substituted the checks above.
  • npm run verify:ui — UI verification not run: the @testing-library / @axe-core dev-dependencies are absent from this environment, so the Chromium UI gate cannot run here; substituted the manual cross-theme, cross-viewport Playwright QA above and recommend running the formal gate in CI.

Risk and rollout

  • Risk: Low. The change is confined to the settings dialog's presentation (layout/CSS classes and a mobile-only scroll-hide on its own header). No server, API, ingestion, retrieval, or answer-generation code is touched; desktop layout is preserved behind lg: resets.
  • Rollback: Revert this commit; no migrations, persisted state, or schema involved.
  • Provider or production effects: None.

Clinical Governance Preflight

This is a local, presentation-only settings UI change and does not alter ingestion, answer generation, search/ranking, source rendering, document access, privacy, or clinical output logic; every item below remains true and unchanged.

  • 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

Notes

  • The "Saved for later — not active yet" markers keep their exact text and aria-describedby wiring on the same 7 inert rows, so tests/settings-inert-preferences.dom.test.tsx (marker text, count = 7, aria) stays green.

Generated by Claude Code

Summary by CodeRabbit

  • UI Improvements
    • Improved mobile settings navigation with an edge-to-edge header that hides on scroll and reappears when scrolling up.
    • Updated the settings dialog’s scrollable layout and responsive spacing for better mobile/desktop alignment.
    • Refined close button styling and positioning.
    • Restyled the “Not yet active” indicator for a cleaner inline appearance with a dot marker.

The fullscreen settings sheet had broken mobile chrome: the header lived
inside the scroll region (so it scrolled away) with a floating close button
and no status-bar coverage, letting content bleed up behind the notch; the
bottom stopped short of the edge instead of running under the home indicator.

- Header: reuse the app's `.edge-glass-header` + `.edge-glass-header-backdrop`
  scrim as a sticky, full-bleed glass header that covers the status-bar/notch
  band, holding the title + the (now single, integrated) close button. It
  hides on scroll-down and returns on scroll-up via `useScrollHideReporter`
  (phone-gated), so the top runs fully edge-to-edge while scrolling — the same
  behaviour as the app's search bar. Desktop reverts to a static in-panel
  header (`lg:` resets); the two-column nav layout is unchanged.
- Bottom: drop the panel's mobile `pb-safe` (`max-lg:!pb-0`) and carry a
  safe-area-aware pad on the content wrapper so content fills edge-to-edge to
  the physical bottom under the home indicator.
- Restructure the mobile scroll region full-bleed (scroll container loses its
  horizontal padding/max-width; a centred content wrapper insets the sections)
  so the header scrim spans the true width.
- Lighten the repeated "Saved for later — not active yet" markers from a heavy
  bordered pill to a quiet muted caption (text/id/aria-describedby and per-row
  placement unchanged, so the inert-preferences contract holds).

Preserves the settings test contract: dialog name "Account & app", the four
section headings, the row test ids, a single "Close settings" button,
Escape-to-close, the 390x820 fullscreen box, and no horizontal overflow —
all verified in Chromium.

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

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8bf1badb-e7d5-436f-988b-25572d3883e1

📥 Commits

Reviewing files that changed from the base of the PR and between 7c7e61e and a36cd41.

📒 Files selected for processing (1)
  • src/components/clinical-dashboard/settings-dialog.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/clinical-dashboard/settings-dialog.tsx

📝 Walkthrough

Walkthrough

SettingsDialog now reports mobile scroll metrics to control a sticky header’s visibility and updates responsive sheet layout, desktop spacing, close-button styling, and inactive badge presentation.

Changes

Settings dialog updates

Layer / File(s) Summary
Scroll-hide state wiring
src/components/clinical-dashboard/settings-dialog.tsx
SettingsDialog reports scroll offsets through useScrollHideReporter and receives the headerHidden state.
Responsive sticky header layout
src/components/clinical-dashboard/settings-dialog.tsx
The sheet and scroll container render a mobile edge-to-edge sticky header, with updated responsive spacing, aside placement, and close-button styling.
Inactive badge presentation
src/components/clinical-dashboard/settings-dialog.tsx
NotYetActiveBadge uses an inline marker with a small indicator dot instead of a bordered pill.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: codex

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ScrollContainer
  participant SettingsDialog
  participant useScrollHideReporter
  participant StickyMobileHeader
  User->>ScrollContainer: scroll settings content
  ScrollContainer->>SettingsDialog: send scroll metrics
  SettingsDialog->>useScrollHideReporter: report scroll position and max offset
  useScrollHideReporter-->>SettingsDialog: update headerHidden
  SettingsDialog->>StickyMobileHeader: apply hidden or visible state
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main mobile edge-to-edge settings sheet change.
Description check ✅ Passed The description follows the template and includes the required summary, verification, risk, governance, and notes sections.
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.
✨ 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 claude/settings-page-components-xe4zky

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

@supabase

supabase Bot commented Jul 20, 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 ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 20, 2026 06:43
@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 (squash) July 20, 2026 06:43

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

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/components/clinical-dashboard/settings-dialog.tsx`:
- Around line 322-334: Update the sticky header class list in the header element
to use Tailwind v4 important-modifier syntax, replacing lg:!bg-transparent and
lg:!px-0 with the corresponding trailing-! forms so the desktop transparent
background and zero horizontal padding overrides apply.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fd954634-6014-43ee-b6dc-cc57bd21c0d9

📥 Commits

Reviewing files that changed from the base of the PR and between 51e747e and 7c7e61e.

📒 Files selected for processing (1)
  • src/components/clinical-dashboard/settings-dialog.tsx

Comment thread src/components/clinical-dashboard/settings-dialog.tsx
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 1 unresolved review comment.

Files modified:

  • src/components/clinical-dashboard/settings-dialog.tsx

Commit: df90b4afecf567f62f2434433d66557b7a24cb2b

The changes have been pushed to the claude/settings-page-components-xe4zky branch.

Time taken: 5m 26s

@BigSimmo
BigSimmo merged commit 7bba9c7 into main Jul 20, 2026
16 checks passed
@BigSimmo
BigSimmo deleted the claude/settings-page-components-xe4zky branch July 20, 2026 09:18
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