Skip to content

(CODUX-119) Restore the Electron title bar UI - #2699

Merged
numnx merged 1 commit into
feature/CODUX-187-fix-system-barfrom
task/feature-codux-187-fix-system-bar-t02-codex-mrc37cmo
Jul 8, 2026
Merged

(CODUX-119) Restore the Electron title bar UI#2699
numnx merged 1 commit into
feature/CODUX-187-fix-system-barfrom
task/feature-codux-187-fix-system-bar-t02-codex-mrc37cmo

Conversation

@numnx

@numnx numnx commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Restore the Electron title bar UI

Automated task PR opened by Code UX for T02.

📋 Summary

Sprint: Sprint 187 · Fix System Bar · Task: T02

Restore the Electron desktop system bar so it is visible in the app, shows the Code UX version, exposes an update action, and reliably supports maximize/restore by double-clicking the bar.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.5

⏱️ Timing

Started 2026-07-08 13:01:45 UTC
Finished 2026-07-08 13:10:20 UTC
Duration 8m 35s

📊 Token Usage

Metric Value
Input tokens 83,252
Cached input tokens 2,116,992
Output tokens 17,242
Total tokens 2,217,486
Invocations 1
Tool calls 60
Active time 8m 9s

Included usage estimate (subscription/local login): $1.99

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

📝 Full Task Prompt
## Objective
Update the renderer `TitleBar` so the Electron desktop app always shows the system bar when the desktop window API is present, includes the version number and update button, and supports maximize/restore from double-clicking the bar.

## Scope
- Edit `dashboard/src/v2/components/TitleBar.tsx`
- Create `tests/dashboard/v2/title-bar.test.tsx`
- Relevant symbols: `TitleBar`, `__APP_VERSION__`, `window.codeUxDesktop`, `CodeUxWindowApi.toggleMaximize`, `CodeUxWindowApi.onStateChange`, `CodeUxWindowApi.getState`
- Consumes the `window.codeUxDesktop.openUpdates()` bridge added by T01

## Implementation Requirements
1. Keep `TitleBar` desktop-only by returning `null` when `window.codeUxDesktop?.window` is unavailable, but render the full bar whenever that window API exists.
2. Preserve the current logo and `v{__APP_VERSION__}` display, and add a compact `Update` control in the title-bar chrome that calls `window.codeUxDesktop.openUpdates()` when clicked.
3. Ensure all interactive controls are marked as no-drag regions and do not trigger the title-bar double-click handler.
4. Implement double-click maximize/restore through `windowApi.toggleMaximize()` for the non-interactive title-bar area, and update local maximize state from both the returned result and `onStateChange` events.
5. Preserve platform behavior: keep native macOS traffic-light spacing and hide custom window buttons on `darwin`; keep minimize/maximize/close buttons on Windows/Linux/other platforms.
6. Add focused Preact tests that mock `window.codeUxDesktop`, stub `__APP_VERSION__`, assert the version and update button render, assert update click calls the bridge, assert double-click toggles maximize, and assert the maximize button label/icon state updates after state changes.

## Constraints
- Do not render the title bar in normal browser dashboard sessions.
- Do not remove or bypass the existing preload bridge contract.
- Do not add external UI libraries; use existing Preact, Tailwind, and `lucide-preact` patterns.
- Keep text compact enough for the `h-9` system bar and preserve accessible labels for all icon controls.
- Do not break existing rounded Electron shell styling or macOS traffic-light spacing.

## Verification
- Run `pnpm run test:dashboard -- tests/dashboard/v2/title-bar.test.tsx`.
- Run `pnpm run typecheck:dashboard`.
- Success means the mocked Electron title bar shows Code UX, the app version, an update action, working window controls, and double-click maximize/restore without rendering in non-Electron mode.
🌿 Branch Info

Base: feature/CODUX-187-fix-system-bar
Head: task/feature-codux-187-fix-system-bar-t02-codex-mrc37cmo


🤖 Generated by Code UX

@numnx
numnx merged commit 2fa9ae9 into feature/CODUX-187-fix-system-bar Jul 8, 2026
6 checks passed
@numnx
numnx deleted the task/feature-codux-187-fix-system-bar-t02-codex-mrc37cmo branch July 8, 2026 13:13
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