Skip to content

fix(win): keep caption controls outside app content - #543

Merged
milind-soni merged 1 commit into
milind-soni:mainfrom
rahul-vanyar:fix/windows-native-titlebar
Aug 28, 2026
Merged

fix(win): keep caption controls outside app content#543
milind-soni merged 1 commit into
milind-soni:mainfrom
rahul-vanyar:fix/windows-native-titlebar

Conversation

@rahul-vanyar

@rahul-vanyar rahul-vanyar commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Use native title bars on Windows and Linux while retaining macOS hiddenInset traffic lights.
  • Remove the Windows titleBarOverlay, its skin-colour synchronization, and the delayed first-show handshake.
  • Remove the renderer drag regions and the hard-coded 148px caption-button reservation from chat and group headers.
  • Add a focused platform-policy helper and tests for macOS, Windows, and Linux.

The existing desktop:skin IPC remains as a validated acknowledgement, so this does not break the renderer/preload contract introduced in #530.

Why

Follow-up to #454 and #530. Recolouring the Windows caption overlay fixed the black block on light skins, but the overlay still occupies renderer space. Every current and future page must know its dimensions and reserve room or its actions can sit underneath the native minimize/maximize/close buttons.

Native Windows chrome puts caption controls outside renderer content, preventing that class of overlap structurally. The explicit trade-off is a standard Windows title bar instead of a frameless window.

How it was verified

  • pnpm exec vitest run electron/window-chrome.test.mjs electron/skin-overlay.test.mjs — 7/7 passed.
  • pnpm check:electron — syntax-checked 70 Electron modules.
  • pnpm typecheck — passed.
  • pnpm build — passed.
  • git diff --check — passed.
  • Full pnpm test counted 2,275 tests. The only failure was server/drivers/codex-catalog.test.ts; the same failure reproduces on untouched upstream commit 7983055, so it is unrelated to this patch.

Screenshots (UI changes)

Not attached. This replaces the Windows overlay with the operating system's native title bar; the platform mapping and renderer cleanup are covered by the focused tests and build checks above.

Checklist

  • pnpm typecheck and pnpm test pass locally (typecheck passes; one unrelated baseline test fails as documented above)
  • Server behavior changes come with tests (no server behavior change)
  • No dist-server/ edits (it's build output)
  • macOS-only code is platform-gated; no shell: true / cmd.exe string-building
  • No secrets in logs, responses, events, or argv

Summary by CodeRabbit

  • Bug Fixes
    • Improved desktop window title-bar behavior across macOS, Windows, and Linux.
    • Removed inconsistent Windows-specific drag-region styling from chat and room headers.
    • Improved spacing for room header actions.
    • Preserved native title-bar controls on Windows and Linux while maintaining inset controls on macOS.

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@rahul-vanyar is attempting to deploy a commit to the SupaMaus Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e6ccd8c8-56e2-4fd4-bee7-f57a120e1cdb

📥 Commits

Reviewing files that changed from the base of the PR and between 7983055 and ab452cd.

📒 Files selected for processing (5)
  • electron/main.mjs
  • electron/window-chrome.mjs
  • electron/window-chrome.test.mjs
  • src/components/ChatView.tsx
  • src/components/GroupView.tsx

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The window chrome configuration now uses a shared platform helper. macOS retains inset title-bar settings. Windows and Linux use native chrome. Windows skin synchronization, delayed window display, and header drag-region styling were removed.

Window chrome simplification

Layer / File(s) Summary
Platform chrome helper and coverage
electron/window-chrome.mjs, electron/window-chrome.test.mjs
windowChromeOptions returns macOS inset chrome settings and empty options for Windows and Linux. Tests cover all platform branches.
Main-process window and skin integration
electron/main.mjs
createWindow uses the shared helper. The Windows native overlay, skin state, hidden-window synchronization, and recovery fallback were removed. desktop:skin now validates the skin and acknowledges it.
Cross-platform header layout
src/components/ChatView.tsx, src/components/GroupView.tsx
Windows drag-region styles and caption-button spacing were removed from both headers. The group action-row gap changed to gap-1.5.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to ab452

This change moves Windows and Linux caption controls to native operating-system chrome and removes obsolete renderer layout handling, while preserving macOS behavior and the existing acknowledgement contract. No actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: milind-soni, aivsomkar, willsigmon

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description covers what changed, why it changed, verification steps, UI screenshot status, and checklist items. It clearly documents the unrelated baseline test failure.
Title check ✅ Passed The title clearly states the primary change: keeping Windows caption controls outside app content. It is concise and related to the pull request objectives.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 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.

@milind-soni
milind-soni merged commit 952a1a9 into milind-soni:main Aug 28, 2026
1 of 2 checks passed
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