Skip to content

Feat: Linux Custom Titlebar#17

Open
boggedbrush wants to merge 2 commits into
am-will:mainfrom
boggedbrush:feat/linux-custom-titlebar
Open

Feat: Linux Custom Titlebar#17
boggedbrush wants to merge 2 commits into
am-will:mainfrom
boggedbrush:feat/linux-custom-titlebar

Conversation

@boggedbrush

Copy link
Copy Markdown
Contributor

Summary

Adds a custom Linux titlebar to the Codex desktop runtime, replacing Electron’s Linux title-bar overlay with Codex-owned in-app chrome: menu bar, window controls, and floating-sidebar/header layout fixes. This gives the Linux app a more integrated desktop feel and brings it closer to the Windows version of Codex.

The new titlebar improves access to core app controls by rendering the application menu directly in the app shell, while preserving native window actions through Linux-specific IPC. Menus use Codex’s existing dark UI tokens so the shell reads as a native Linux app rather than detached system chrome.

What changed

  • Adds a Linux-specific custom titlebar using a hidden native titlebar (titleBarStyle: hidden) and Codex-rendered window controls (no Linux titleBarOverlay).
  • Adds Linux IPC bridge support for:
    • Minimize
    • Maximize / restore
    • Close
    • Application menu serialization
    • Application menu item clicks (with active BrowserWindow and webContents context)
  • Renders File, Edit, View, Window, and Help in the Linux custom titlebar.
  • Supports nested submenu rendering for the Linux app menu (in-renderer panels via IPC, not GTK popups).
  • Skips Linux title-bar overlay sync and hides/removes the native menu bar so the app shell owns that chrome.
  • Adjusts Linux titlebar and safe-area handling so inline controls do not reserve Windows-style spacing (right: 0).
  • Updates floating sidebar and header chrome positioning to work correctly beneath the custom Linux titlebar:
    • Hides duplicate nav header when the title bar owns the sidebar toggle
    • Fixes z-index and top offset using compiled Tailwind classes only
    • Shifts the main header left when the floating panel is open
  • Refreshes recovered runtime artifacts and manifest data for upstream 26.601.21319 (including incidental auth webview asset refresh from manifest regen).
  • Updates the update-codex skill notes so future runtime updates preserve the Linux titlebar and menu behavior.
  • Expands Linux recovered-bundle tests to cover:
    • Custom titlebar markers
    • Menu IPC wiring
    • Nested submenu rendering
    • Safe-area behavior
    • Sidebar/header chrome positioning markers
    • Menu click handler window/webContents context

Visual comparison

The previous Linux runtime used Electron’s title-bar overlay, which felt visually detached from the Codex shell. The updated runtime replaces it with an app-owned titlebar that matches Codex’s dark UI, adds visible File/Edit/View/Window/Help menus, and keeps the window controls aligned with the rest of the shell.

Before: native Linux titlebar

Before: native Linux titlebar with detached window controls

After: custom Codex titlebar

After: Codex-owned Linux titlebar with app menus and integrated window controls

Before: sidebar/header chrome

Before: native titlebar layout with sidebar chrome

After: adjusted sidebar/header chrome

After: custom Linux titlebar with adjusted sidebar and header chrome

Testing

cd desktop
node --check scripts/assemble-codex-runtime.mjs
npm run assemble:codex-runtime
npm test -- --runInBand tests/linux/recovered-bundle.red.test.ts

Implemented a Linux custom title bar that matches Codex's existing styling so the desktop app feels like a native Linux application, with in-renderer menus, window controls, and floating sidebar fixes.
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.

1 participant