Skip to content

Match terminal chrome layout to the user’s OS - #105

Draft
scaryrawr with Copilot wants to merge 4 commits into
mainfrom
copilot/match-terminal-buttons-os
Draft

Match terminal chrome layout to the user’s OS#105
scaryrawr with Copilot wants to merge 4 commits into
mainfrom
copilot/match-terminal-buttons-os

Conversation

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown

The embedded terminal chrome was using a single hardcoded title bar layout for every platform. This updates the window controls to follow the user’s OS conventions, including placing macOS controls on the left and keeping other platforms on the right.

  • Terminal chrome by platform

    • Detects macOS via navigator.userAgentData.platform, with fallback to navigator.platform and navigator.userAgent
    • Uses macOS-style traffic lights on the left
    • Preserves the existing right-aligned controls for non-macOS platforms
    • Keeps the title centered independent of button placement
  • Rendering cleanup

    • Centralizes window chrome selection in a small helper inside terminal.tsx
    • Uses decorative, non-interactive styling for the fake window controls
  • Coverage

    • Adds focused tests for:
      • userAgentData macOS detection
      • navigator.platform fallback
      • navigator.userAgent fallback
      • default non-macOS behavior
  • PR screenshots

    • Adds updated screenshots for:
      • default/non-macOS terminal chrome
      • macOS terminal chrome
const getTerminalWindowChrome = (navigatorLike?: NavigatorLike): TerminalWindowChrome =>
  isMacOs(navigatorLike) ? MACOS_WINDOW_CHROME : DEFAULT_WINDOW_CHROME;

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl bin/rustc d30fe3.rlib u.o s-b9543289228bff/tmp/cargo-installn6Y46R/release/deps/rustc5XnioV/symbols.o bin/rustc (dns block)
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl bin/rustc d30fe3.rlib /bin" && bun run serve:playwright s-b9543289228bff/tmp/cargo-installn6Y46R/release/deps/rustc5XnioV/symbols.o bin/rustc (dns block)
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl lib/rustlib/x86_--diagnostic-width=120 e1d.walrus_macronode e1d.walrus_macro/home/REDACTED/work/sl/sl/node_modules/.bin/tsc e1d.walrus_macro--noEmit e1d.walrus_macro--project (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 3 commits April 3, 2026 05:06
Agent-Logs-Url: https://github.com/scaryrawr/sl/sessions/9a12051f-666a-405c-a0b2-7daaf1b63772

Co-authored-by: scaryrawr <661373+scaryrawr@users.noreply.github.com>
Agent-Logs-Url: https://github.com/scaryrawr/sl/sessions/9a12051f-666a-405c-a0b2-7daaf1b63772

Co-authored-by: scaryrawr <661373+scaryrawr@users.noreply.github.com>
Agent-Logs-Url: https://github.com/scaryrawr/sl/sessions/9a12051f-666a-405c-a0b2-7daaf1b63772

Co-authored-by: scaryrawr <661373+scaryrawr@users.noreply.github.com>
Copilot AI changed the title [WIP] Update terminal window buttons and title bar for user's OS Match terminal chrome layout to the user’s OS Apr 3, 2026
Copilot AI requested a review from scaryrawr April 3, 2026 05:10
@scaryrawr

Copy link
Copy Markdown
Owner

@copilot can we add screenshots to demo the OS detection? I don't see any in the PR right now.

Copilot AI commented Apr 4, 2026

Copy link
Copy Markdown
Author

@copilot can we add screenshots to demo the OS detection? I don't see any in the PR right now.

Added the screenshots to the PR description and linked them here as well:

Default/non-macOS: https://github.com/scaryrawr/sl/blob/copilot/match-terminal-buttons-os/.github/images/terminal-default.png?raw=1
macOS: https://github.com/scaryrawr/sl/blob/copilot/match-terminal-buttons-os/.github/images/terminal-macos.png?raw=1

ed5d41e

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