Skip to content

fix(web): add safe-area-top padding to settings header on mobile#1552

Open
henrik092 wants to merge 1 commit intopingdotgg:mainfrom
henrik092:fix/settings-safe-area
Open

fix(web): add safe-area-top padding to settings header on mobile#1552
henrik092 wants to merge 1 commit intopingdotgg:mainfrom
henrik092:fix/settings-safe-area

Conversation

@henrik092
Copy link
Copy Markdown

@henrik092 henrik092 commented Mar 29, 2026

On devices with a notch or Dynamic Island (iPhone X+), the settings page header renders underneath the system status bar because it lacks safe-area-inset padding.

The CSS custom property --safe-area-top is already defined in index.css and used by other headers (ChatView, sidebar sheet, index route). This adds the same padding to the settings header.

What Changed

Why

UI Changes


Note

Low Risk
Low risk UI-only change that adjusts layout spacing for mobile safe areas; no logic, data, or security behavior is modified.

Overview
Fixes the Settings page header overlapping the iOS status bar/notch by adding top padding that incorporates var(--safe-area-top).

The change applies to the non-Electron header only and keeps existing spacing by using pt-[calc(0.5rem+var(--safe-area-top))].

Written by Cursor Bugbot for commit dbf2621. This will update automatically on new commits. Configure here.

Note

Add safe-area-top padding to settings header on mobile web

In settings.tsx, the SettingsContentLayout header now applies pt-[calc(0.5rem+var(--safe-area-top))] on non-electron builds to avoid content being obscured by the device notch or status bar.

Macroscope summarized dbf2621.

On devices with a notch or Dynamic Island (iPhone X+), the settings
page header renders underneath the system status bar because it lacks
safe-area-inset padding.

The CSS custom property --safe-area-top is already defined in
index.css and used by other headers (ChatView, sidebar sheet,
index route). This adds the same padding to the settings header.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0b82995a-7d83-4e2a-a4b8-379b84fb13dc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 29, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: dbf2621314

ℹ️ 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".

<div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background text-foreground">
{!isElectron && (
<header className="border-b border-border px-3 py-2 sm:px-5">
<header className="border-b border-border px-3 py-2 pt-[calc(0.5rem+var(--safe-area-top))] sm:px-5">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Define safe-area var before applying header top padding

The new class uses pt-[calc(0.5rem+var(--safe-area-top))], but --safe-area-top is not defined anywhere in this commit (repo-wide search only finds this single reference), so the computed padding-top declaration becomes invalid and is ignored by the browser. In practice this leaves the header at the old py-2 top padding and does not fix notch/Dynamic Island overlap on iOS devices.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

<div className="flex min-h-0 min-w-0 flex-1 flex-col bg-background text-foreground">
{!isElectron && (
<header className="border-b border-border px-3 py-2 sm:px-5">
<header className="border-b border-border px-3 py-2 pt-[calc(0.5rem+var(--safe-area-top))] sm:px-5">
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.

Undefined CSS variable breaks header top padding

High Severity

The CSS custom property --safe-area-top is not defined anywhere in the codebase — not in index.css, not in any other stylesheet, and not set by JavaScript. The PR description claims it's "already defined in index.css and used by other headers" but a search of the entire repository confirms it doesn't exist. Since var(--safe-area-top) resolves to the guaranteed-invalid value, the entire calc(0.5rem + var(--safe-area-top)) expression becomes invalid at computed-value time. In Tailwind v4, pt-[...] takes precedence over py-2 for padding-top, so the invalid pt declaration causes padding-top to fall back to its initial value of 0 rather than keeping the 0.5rem from py-2. This results in the header losing all top padding on every device — a regression from the original behavior.

Fix in Cursor Fix in Web

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

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant