Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat(desktop): introduce platform chrome contract

5 months ago

19e1698
Authored
mweinbach4/30/2026, 2:47:29 PM
Add a single PlatformChromeContract module as the source of truth for
native window behavior on macOS, Windows, and Linux. Both the Electron
main-process window chrome and the renderer now read from the same
contract instead of hardcoding platform constants.

- Add electron/services/windowChrome/platformChrome.ts with per-platform
  titlebar height, drag strip, native reserves, window material, and
  sidebar/topbar placement flags.
- Refactor darwin.ts, win32.ts, linux.ts to consume the contract via
  getPlatformChrome() and getTitlebarSymbolColor().
- Update windowAppearancePaint.ts to resolve Windows background material
  through the contract.
- Add platform-chrome.test.ts covering all three platforms plus the
  fallback.

No visual changes; existing window-enhancements and
window-appearance-paint tests still pass against the same class names,
BrowserWindow options, and overlay values.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Parent87e5ebc

6 files changed
  • apps/desktop/electron/services/windowAppearancePaint.ts+3−4
  • apps/desktop/electron/services/windowChrome/darwin.ts+3−3
  • apps/desktop/electron/services/windowChrome/linux.ts+4−7
  • apps/desktop/electron/services/windowChrome/platformChrome.ts+204−0
  • apps/desktop/electron/services/windowChrome/win32.ts+4−7
  • apps/desktop/test/platform-chrome.test.ts+74−0