Skip to content

fix(ui): opaque session banner + header stacking context - #404

Merged
dimakis merged 3 commits into
mainfrom
fix/session-banner-bg
Jul 4, 2026
Merged

fix(ui): opaque session banner + header stacking context#404
dimakis merged 3 commits into
mainfrom
fix/session-banner-bg

Conversation

@dimakis

@dimakis dimakis commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Session banner used undefined --bg-primary CSS variable (resolved to transparent), causing scrolled content to bleed through
  • Header toolbar had no stacking context, so scroll content could render above it
  • Top padding on .chat-messages created a transparent gap between header and sticky banner

Changes

  • Replace var(--bg-primary) with var(--surface) on .session-banner
  • Add position: relative + z-index: 20 to .chat-header
  • Move top padding from .chat-messages to bottom-only, so sticky banner sits flush
  • Horizontal negative margin on banner to span full scroll container width

Test plan

  • Open a session in mobile Safari — no content bleeds through header or banner
  • Scroll up/down — banner sticks flush, no transparent gap
  • Check desktop layout is unaffected
  • Verify keyboard-open state still compacts header correctly

🤖 Generated with Claude Code

@dimakis dimakis left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Centaur Review

LGTM — no issues found.

dimakis and others added 3 commits July 4, 2026 10:23
The session banner used undefined --bg-primary (resolved to transparent),
so scrolled content bled through behind it and the header toolbar.

- Replace var(--bg-primary) with var(--surface) on .session-banner
- Add position:relative + z-index:20 to .chat-header so scroll content
  never renders above it
- Remove top padding from .chat-messages so the sticky banner sits flush
  against the header with no transparent gap
- Horizontal negative margin on the banner to span full scroll width

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Negative top margin overlaps the header border, eliminating the
sub-pixel rendering gap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use a color-matched box-shadow on the header to extend its visual
coverage, eliminating the remaining transparent gap on iOS Safari.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dimakis
dimakis force-pushed the fix/session-banner-bg branch from 99067fd to 5a6ff48 Compare July 4, 2026 09:23

@dimakis dimakis left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Centaur Review

Found 2 issue(s) (1 warning).

frontend/src/styles/global.css

Good fix for the undefined --bg-primary variable (banner was transparent) and proper stacking context, but removing top padding from .chat-messages introduces a minor visual regression when no session banner is present — first message content gets clipped by the header's box-shadow on mobile.

  • 🟡 regressions (L1672): Removing top padding from .chat-messages (was var(--space-4), now 0) means that when no session banner is rendered (SessionBanner returns null when bootContext and sessionContext are both absent), the first message sits flush against the header. Combined with the new 4px box-shadow on .chat-header (z-index 20), the top ~4px of the first message will be visually obscured. Consider adding a small top margin/padding to .chat-messages children or using a CSS :first-child rule to restore spacing when the banner is absent. [fixable]
  • 🔵 style (L2433): The negative horizontal margin calc(-1 * var(--space-3)) makes the banner full-bleed on mobile where .chat-messages uses var(--space-3) horizontal padding, but on desktop the container padding is var(--space-6) (2rem) while the banner only pulls back 0.75rem. The banner won't reach the container edges on desktop. This may be fine visually, but if full-bleed is intended across breakpoints, the negative margin should use a CSS variable or be overridden in the desktop media query. [fixable]

overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: var(--space-4) var(--space-3);
padding: 0 var(--space-3) var(--space-4);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

🟡 regressions: Removing top padding from .chat-messages (was var(--space-4), now 0) means that when no session banner is rendered (SessionBanner returns null when bootContext and sessionContext are both absent), the first message sits flush against the header. Combined with the new 4px box-shadow on .chat-header (z-index 20), the top ~4px of the first message will be visually obscured. Consider adding a small top margin/padding to .chat-messages children or using a CSS :first-child rule to restore spacing when the banner is absent. [fixable]

position: sticky;
top: 0;
z-index: 10;
margin: -1px calc(-1 * var(--space-3)) 0;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

🔵 style: The negative horizontal margin calc(-1 * var(--space-3)) makes the banner full-bleed on mobile where .chat-messages uses var(--space-3) horizontal padding, but on desktop the container padding is var(--space-6) (2rem) while the banner only pulls back 0.75rem. The banner won't reach the container edges on desktop. This may be fine visually, but if full-bleed is intended across breakpoints, the negative margin should use a CSS variable or be overridden in the desktop media query. [fixable]

@dimakis
dimakis merged commit ad16c55 into main Jul 4, 2026
1 check passed
dimakis added a commit that referenced this pull request Jul 4, 2026
PR #441's squash merge was based on a branch that predated PR #404,
silently reverting three CSS fixes:
- .chat-header: lost position:relative, z-index:20, box-shadow
- .chat-messages: top padding reverted (content bleeds under header)
- .session-banner: background reverted to undefined --bg-primary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dimakis added a commit that referenced this pull request Jul 4, 2026
PR #441's squash merge was based on a branch that predated PR #404,
silently reverting three CSS fixes:
- .chat-header: lost position:relative, z-index:20, box-shadow
- .chat-messages: top padding reverted (content bleeds under header)
- .session-banner: background reverted to undefined --bg-primary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dimakis added a commit that referenced this pull request Jul 5, 2026
* fix(task-board): add spawn kill switch to mobile task board page

The toggle was only in TaskBoardSection (desktop collapsible view).
The mobile full-page TaskBoard at pages/TaskBoard.tsx was missing it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(ui): restore opaque header + session banner from PR #404

PR #441's squash merge was based on a branch that predated PR #404,
silently reverting three CSS fixes:
- .chat-header: lost position:relative, z-index:20, box-shadow
- .chat-messages: top padding reverted (content bleeds under header)
- .session-banner: background reverted to undefined --bg-primary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant