Skip to content

fix(app): unify Windows titlebar chrome and continue sidebar divider - #1283

Merged
Astro-Han merged 1 commit into
devfrom
claude/titlebar-os-preview
Jun 13, 2026
Merged

fix(app): unify Windows titlebar chrome and continue sidebar divider#1283
Astro-Han merged 1 commit into
devfrom
claude/titlebar-os-preview

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

Two CSS-only changes in packages/app/src/index.css, both about the desktop titlebar chrome:

  1. Unify the Windows titlebar chrome with macOS via :is([data-shell-os="macos"], [data-shell-os="windows"]) — the titlebar background gradient (left segment carries --sidebar, right falls through to the thread background) and the ghost icon-button radius / hover / expanded-transparent treatment now apply to Windows too. The traffic-light inset (padding-inline-start: 8px) stays macOS-only.
  2. Continue the sidebar↔content divider through the titlebar — bake a 1px --border-weaker band into the titlebar gradient at the [sidebar-width - 1px, sidebar-width] boundary so it continues the body divider (drawn as border-r border-border-weaker on the sidebar <aside>) pixel-for-pixel. No extra element; a collapsed sidebar (--sidebar-width: 0px) clamps every gradient stop to 0 so the band vanishes.

linux is unaffected. There is no tracked issue; this came from direct design feedback on how Windows renders.

Why

On Windows the in-app toolbar rendered as a flat white slab, disconnected from both the native Windows title bar above it and the warm-grey sidebar below. The sidebar↔content divider that runs down the body also stopped at the session-title ("New session") row instead of continuing up through the titlebar.

Related Issue

None — see Summary.

Human Review Status

Pending

Review Focus

  • The 1px alignment math: the gradient seam and the --border-weaker band both pivot on sidebar-width - 1px, landing on the body sidebar <aside>'s border-box right edge so the titlebar line is colinear with, and composites to the same shade as, the body border-r border-border-weaker.
  • A collapsed sidebar (--sidebar-width: 0px) clamps the gradient stops to 0, so the band disappears with no extra element or gating.
  • macOS only shares the existing rules; the seam was confirmed pixel-identical, so it should look unchanged in practice.

Risk Notes

  • Pure CSS, scoped to the [data-shell-os="macos"|"windows"] titlebar branch; linux and all non-titlebar surfaces are untouched.
  • The real Windows native title bar can only be confirmed on a Windows machine — the Mac-side render covers our app branch only.
  • Skipped checklist item: the third (conditional) item (docs / release notes / dependencies / permissions / credentials / deletion / generated / local files) is left unticked because none of those surfaces was touched — CSS only.

How To Verify

Rendered windows + macos shell branches on Mac via __PAWWORK_SHELL_OS override (Chromium snap):
  both show the divider continuous from titlebar top down into the body.
Pixel sample of the seam — titlebar row (y=40) vs body row (y=400), both OSes — identical:
  grey (248,246,243) -> divider (235,235,235) -> content (255,255,255).
Collapsed sidebar: --sidebar-width=0 -> gradient stops clamp to 0, band not visible.
shell-frame-contract test: 10 pass / 0 fail.
bun run typecheck: clean.

Screenshots or Recordings

Rendered before/after comparisons were produced — a full Windows/macOS 4-panel and a 4x-zoomed seam strip — showing the divider absent in the titlebar before and continuous after. They live in the git-ignored docs/design/preview/screenshots/ (divider-before-after.png, seam-zoom.png) and cannot be inlined from the CLI; drag them into the PR if an embedded image is required. The pixel table in How To Verify is the substantive proof that the titlebar and body seams match exactly.

Checklist

How to use this checklist:

  • Tick a box by replacing [ ] with [x]. Do not edit, add, or remove items.
  • The bot-applied label items can only be honestly ticked AFTER the PR is opened and the labeler / priority-triage bots have run — return to the PR description and tick them then.
  • Most items are required. The few that are conditional are explicitly marked (conditional); for those, leave unticked if they truly do not apply and explain why in Risk Notes. All other items must be ticked before requesting human review.
  • Type label — this PR carries exactly one of bug, enhancement, task, documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.
  • Routing labels — this PR carries at least one of app, ui, platform, harness, ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.
  • Priority label — this PR carries exactly one of P0, P1, P2, P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.
  • Human Review Status above is set to Pending, Approved by @<reviewer>, or Not required: <reason> (default is Pending; "not required" is restricted to bot-authored low-risk PRs).
  • I linked the related issue, or stated in Summary why there is no issue.
  • I described the review focus and any meaningful risks.
  • I replaced the example block in How To Verify with the real verification steps and the key result for each.
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope.
  • (conditional) I manually checked visible UI or copy changes when needed, with screenshots or recordings. Leave unticked only if no visible UI or copy changed.
  • (conditional) I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes. Leave unticked only if no platform/packaging surface was touched.
  • (conditional) I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant. Leave unticked only if none of those surfaces was touched.
  • I reviewed the final diff for unrelated changes and suspicious dependency changes.
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English.

Summary by CodeRabbit

  • Style
    • Refactored desktop titlebar styling to deliver consistent visual appearance across macOS and Windows platforms.
    • Enhanced sidebar-continuity gradient with refined border styling details for improved visual cohesion.
    • Expanded icon styling enhancements to both macOS and Windows, featuring updated hover effects and improved visual appearance for title bar controls.

@coderabbitai

coderabbitai Bot commented Jun 13, 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: 6ed9a0d0-947d-4066-a1ab-a425c364dd1e

📥 Commits

Reviewing files that changed from the base of the PR and between f604858 and 973a333.

📒 Files selected for processing (1)
  • packages/app/src/index.css

📝 Walkthrough

Walkthrough

The PR refactors desktop titlebar styling in index.css to extend cross-platform support from macOS-only to include Windows. The sidebar-continuity gradient gains a 1px border band, and icon button interactivity styling (hover and expanded states) is broadened to Windows while retaining macOS-specific padding.

Changes

Cross-platform desktop titlebar refinement

Layer / File(s) Summary
Sidebar continuity gradient and border band
packages/app/src/index.css
The desktop titlebar left/chrome linear-gradient background now applies to both macOS and Windows via :is([data-shell-os="macos"], [data-shell-os="windows"]). Gradient stops are updated to add a 1px --border-weaker band aligned to the sidebar width boundary; macOS-only padding-inline-start: 8px is retained in a separate macOS selector.
Icon button hover and expanded states
packages/app/src/index.css
The "ghost" titlebar icon selector expands from macOS-only to macOS+Windows, setting border-radius: 10px and applying background-color: var(--surface-sunken) on hover (when not disabled). The sidebar-toggle icon expanded state (aria-expanded="true" with not-hover/not-active handling) now extends to Windows as well.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Astro-Han/pawwork#880: Both PRs adjust the titlebar icon expanded/hover visual contract via CSS selectors/states for .titlebar-icon (main PR extends the ghost sidebar-toggle expanded styling to Windows in app/index.css, while retrieved PR #880 fixes the .titlebar-icon[aria-expanded] styling scope in ui/components/icon-button.css).
  • Astro-Han/pawwork#887: Both PRs modify packages/app/src/index.css in the macOS [data-component="titlebar-shell"] styling around the titlebar/rail padding behavior (padding-inline-start: 8px), aligning with the seam-related titlebar fixes in #887.
  • Astro-Han/pawwork#845: The main PR's index.css adds a 1px --border-weaker band at the sidebar boundary (within the titlebar "left/chrome" gradient), which is directly tied to the retrieved PR's work restoring the sidebar/thread hairline via the same --border-weaker token and sidebar border.

Suggested labels

ui, desktop

Poem

🐰 The titlebar hops cross-platform now,
Gradient bands in perfect row,
macOS, Windows, side by side—
Icons hover with pride,
A CSS hop and glide! 🎨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main CSS changes: unifying Windows titlebar chrome with macOS styling and continuing the sidebar divider through the titlebar.
Description check ✅ Passed The description comprehensively addresses the required sections: Summary explains the CSS changes clearly, Why provides context, Human Review Status is set to Pending, Review Focus highlights critical alignment details, and How To Verify includes specific verification steps with results. One conditional checklist item is properly explained as skipped in Risk Notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/titlebar-os-preview

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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 app Application behavior and product flows P2 Medium priority labels Jun 13, 2026

@github-actions github-actions 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.

Suggested priority: P2 (includes user-path files (packages/app/src/index.css)).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request extends the titlebar styling and sidebar-to-content transition effects from macOS to Windows desktop environments, ensuring visual continuity. It introduces a 1px divider line at the sidebar boundary using an absolute-positioned ::after pseudo-element. The review feedback suggests a cleaner approach: drawing the 1px divider line directly within the linear-gradient background of the titlebar. This eliminates the need for the extra pseudo-element and avoids off-canvas positioning when the sidebar is collapsed.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/app/src/index.css Outdated
@Astro-Han Astro-Han added the bug Something isn't working label Jun 13, 2026
Windows rendered a flat white toolbar that read as disconnected from both
the native title bar above it and the warm-grey sidebar below. Share the
macOS unified-chrome treatment with Windows via :is(): the titlebar's left
segment carries the sidebar color, the right falls through to the thread
background, and the ghost icon buttons get the same radius/hover.

The sidebar<->content divider is drawn as border-r border-border-weaker on
the sidebar <aside>, which only spans the body row, so the line stopped at
the session-title row. Bake the same 1px --border-weaker band into the
titlebar gradient at the [sidebar-width - 1px, sidebar-width] boundary so it
continues the body divider pixel-for-pixel -- verified identical on macOS
and Windows (grey 248,246,243 -> divider 235,235,235 -> content 255). A
collapsed sidebar (--sidebar-width: 0px) clamps every gradient stop to 0, so
the band vanishes with no extra element or gating. linux is unaffected.
@Astro-Han
Astro-Han force-pushed the claude/titlebar-os-preview branch from c1c0c1a to 973a333 Compare June 13, 2026 18:15
@Astro-Han
Astro-Han merged commit eecbd5f into dev Jun 13, 2026
37 of 38 checks passed
@Astro-Han
Astro-Han deleted the claude/titlebar-os-preview branch June 13, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application behavior and product flows bug Something isn't working P2 Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant