Skip to content

fix(web): drop the macOS traffic-light inset from the paired web client - #24330

Open
innocarpe wants to merge 2 commits into
stablyai:mainfrom
innocarpe:fix-19299-web-traffic-light-pad
Open

innocarpe wants to merge 2 commits into
stablyai:mainfrom
innocarpe:fix-19299-web-traffic-light-pad

Conversation

@innocarpe

Copy link
Copy Markdown
Contributor

ELI5

Opening Orca in a browser on a Mac left an empty gap at the top left, where the desktop app's red, yellow, and green window buttons would be. The browser has no such buttons, so that gap is gone. The desktop Mac app still leaves room for them.

What Changed

Before, any Mac user agent reserved an 80px traffic-light inset and rendered titlebar-traffic-light-pad, including the paired web client. After, that inset is reserved only for the desktop Mac window. Fullscreen still hides the pad element and still keeps the width token, which is what the desktop already did.

Why

The web client already skips Windows and Linux custom window controls. The Mac inset was the remaining desktop-only gap. Gating the existing chrome helper is smaller than a separate web layout.

Linked Issue

Fixes #19299

Visual Proof

N/A. This session did not open a paired browser client. The change is which chrome helper returns a width, covered by unit tests below.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

vitest run --config config/vitest.config.ts src/renderer/src/lib/desktop-window-chrome.test.ts — 6 passed.

Covered: desktop macOS keeps 80px and shows the pad until fullscreen; the paired web client on a Mac gets 0px and no pad, fullscreen or not; Windows and Linux stay at 0px.

Not measured: a live orca serve page in Chrome on macOS, or the desktop Mac window next to it.

AI Disclosure

Cursor Grok 4.7 drafted this change.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Desktop macOS traffic lights are unchanged. SSH and mobile are not involved.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adjusts macOS window chrome layout for paired web client.

The PR appears safe to merge; no outstanding finding or new issue was identified.

Summary

The PR removes the macOS traffic-light inset and pad from the paired web client while preserving desktop macOS behavior. The new helper reads the paired-web flag for both values, and the tests cover the flag-dependent results.

Reviews (2) · Last reviewed commit: "fix(web): drive the traffic-light width ..."

Comment thread src/renderer/src/lib/desktop-window-chrome.test.ts

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

✅ No new issues found.

Reviewed changes

  • Refactored the macOS traffic-light inset into two pure helpers — macTrafficLightsWidth and shouldShowMacTrafficLightPad — in src/renderer/src/lib/desktop-window-chrome.ts, both gated on !isWebClient.
  • MAC_TRAFFIC_LIGHTS_WIDTH in app-window-chrome.ts now derives from macTrafficLightsWidth(...), so a paired Mac web client gets 0px instead of 80px.
  • TitlebarLeftControls.tsx renders the pad via shouldShowMacTrafficLightPad, falling through to the pl-2 branch for a Mac web client (same as desktop fullscreen).
  • Added unit tests covering desktop macOS, Mac web client, and Windows/Linux.

Behavior is unchanged for desktop macOS, and the web client now starts at its real top-left. Both the width token and the pad element key off the same isPairedWebClientWindow() global that hasCustomTitleBar already depends on, so there is no new module-load timing risk. The added tests are exact-value assertions that would fail if either predicate regressed, and the full file passes (6 tests).

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 9dd135ca-e1b3-4a89-8197-9aaed45f859a

📥 Commits

Reviewing files that changed from the base of the PR and between dde585c2964c91046f045fc33ef383d6a2721d76 and d34dabb.

📒 Files selected for processing (4)
  • src/renderer/src/app-shell/TitlebarLeftControls.tsx
  • src/renderer/src/app-shell/app-window-chrome.ts
  • src/renderer/src/lib/desktop-window-chrome.test.ts
  • src/renderer/src/lib/desktop-window-chrome.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The app shell now sets the macOS traffic-light inset to 0px for paired web clients and 80px for desktop clients. It renders traffic-light padding only for non-fullscreen macOS desktop windows. Tests cover these cases, along with Windows and Linux behavior.

Priority: ⬇️ Low

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to d34da

The change removes the empty macOS titlebar gap for paired web clients and leaves desktop macOS, Windows and Linux spacing as before. The tests cover these cases. The remaining uncertainty is that the author did not check a live page in Chrome on macOS, and that is not a merge blocker.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: removing the macOS traffic-light inset from the paired web client.
Description check ✅ Passed The description follows the required template and explains the user impact, implementation, rationale, linked issue, visual-proof decision, testing coverage, AI disclosure, and compatibility considera…
Linked Issues check ✅ Passed Issue #19299 requires the paired Web client to omit the desktop macOS traffic-light inset and requires separate desktop and Web layout decisions. macTrafficLightChromeForWindow reads the paired-Web …
Out of Scope Changes check ✅ Passed The changed source files implement the macOS traffic-light inset decision. The changed test file verifies the linked issue behavior and preserves existing platform behavior. The provided whole-PR summ…
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

innocarpe and others added 2 commits October 1, 2026 19:02
A browser tab has no native window buttons, but a Mac user agent still reserved that left gap. Desktop macOS keeps the inset.

Co-authored-by: Cursor <cursoragent@cursor.com>
The inset token and the pad were each passed isWebClient by their own call site, so a test of the helpers could stay green while one site stopped reading the flag.

Co-authored-by: Cursor <cursoragent@cursor.com>
@innocarpe
innocarpe force-pushed the fix-19299-web-traffic-light-pad branch from dde585c to d34dabb Compare October 1, 2026 10:05
@innocarpe

Copy link
Copy Markdown
Contributor Author

Sync update (d34dabbcc9)

The inset width and the pad now come from one read of the paired-web flag. A test sets ORCA_WEB_CLIENT and checks both results.

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

✅ No new issues found.

Reviewed changes

  • Unified the paired-web read: macTrafficLightChromeForWindow({ isMac, isFullScreen }) in desktop-window-chrome.ts now reads __ORCA_WEB_CLIENT__ once and returns both the '80px' | '0px' width and the showPad flag, replacing two separate helper calls.
  • MAC_TRAFFIC_LIGHTS_WIDTH in app-window-chrome.ts now derives from the combined helper (still isFullScreen: false, so the width token is unchanged in fullscreen).
  • TitlebarLeftControls.tsx renders the pad from the combined helper's showPad, so a Mac web client falls through to the existing pl-2 branch.
  • Added a test that stubs __ORCA_WEB_CLIENT__ and asserts the width and pad together, closing the wiring gap greptile flagged.

Centralizing the single __ORCA_WEB_CLIENT__ read means the width token and the pad can no longer drift — the exact gap the previous two-independent-call-sites shape left. Desktop macOS is unchanged (80px plus the pad until fullscreen); the paired Mac web client gets 0px and no pad. The focused suite passes (7 tests).

ℹ️ Nitpicks

  • docs/STYLEGUIDE.md:304 still states macOS reserves an 80px gutter with titlebar-traffic-light-pad as unconditional. That is now desktop-app-only; a short qualifier noting the paired web client reserves none would keep the guide accurate.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

This branch has not been deployed

No deployments
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.

[Bug]: Paired Web client leaves an empty macOS titlebar inset at top-left

1 participant