Skip to content

feat(desktop): draw the Windows title bar in the page - #521

Merged
kgoedecke merged 3 commits into
doop-design:mainfrom
davidabou:feat/windows-custom-titlebar
Nov 21, 2026
Merged

kgoedecke merged 3 commits into
doop-design:mainfrom
davidabou:feat/windows-custom-titlebar

Conversation

@davidabou

Copy link
Copy Markdown
Contributor

What

On Windows, the desktop app now drops the native title bar and draws its own,
like macOS already does with its overlay title bar: the minimize / maximize
(restore) / close buttons sit at the end of the tab strip, sized and styled like
the Windows 11 caption buttons (Close turns red on hover).

How

  • src/lib/windowFrame.ts: on Windows, the page calls setDecorations(false)
    once at startup, then tracks the maximized state (including Win+↑, Aero snap
    and double-clicking the drag region) so the middle button shows Restore.
  • src/components/WindowControls.tsx: the caption buttons, rendered only once
    the page owns the frame.
  • DesktopTabs ends with the controls; ShellDragBar carries them on the
    signed-out screens so the window can always be closed. The signed-out guest
    canvas is pushed below that bar through the existing --app-inset contract
    so its toolbar isn't covered.
  • capabilities/default.json: grants set-decorations, minimize and
    toggle-maximize.
  • i18n strings for the button labels (en, pt-BR).

The page drops the frame rather than the shell, because the two ship apart: a
shell without the new grants refuses the call and keeps its native frame, and a
server running an older app never asks, so no combination leaves a window
without a way to close it.

Testing

  • tests/windowFrame.test.ts covers Windows / macOS / Linux, a shell that
    refuses the call, and maximize changes made outside the buttons.
  • bun run typecheck, bun run lint, Prettier and the desktop tests pass.
  • Tested manually on Windows 11 with tauri dev: drag, double-click to
    maximize, Win+↑, snapping, resizing from the edges, the caption buttons, and
    the signed-out screens.

Known limitations

  • The native frame shows briefly at launch, until the page has loaded and
    removed it.
  • Windows 11 Snap Layouts (the flyout when hovering Maximize) isn't available
    with HTML caption buttons.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@davidabou

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Nov 16, 2026
@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge.

Summary

The Windows desktop app draws its own title bar buttons while keeping the native frame as a fallback.

  • Windows desktop windows use page-drawn title bar controls.

No new actionable issues found. All three previous findings are addressed.

Reviews (3) · Last reviewed commit: "fix(desktop): keep the impersonation ban..." · Reviewed by Greptile

Comment thread src/lib/desktop.ts Resolved
Comment thread src/lib/windowFrame.ts Resolved
orges pushed a commit to orges/doop that referenced this pull request Nov 16, 2026
…esign#521)

doop-design#517 made RunState.seenVerified required and doop-design#518 added a fixture without
it; the two merged in parallel, so main fails typecheck and CI (and the
deploy that follows CI is skipped).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 2e5f8f8249e4dc091c5b57a1bb1ccd1d8b4a420f)
@kgoedecke

Copy link
Copy Markdown
Collaborator

@greptileai

Comment thread src/App.tsx Resolved
@kgoedecke

Copy link
Copy Markdown
Collaborator

@greptileai

@davidabou

Copy link
Copy Markdown
Contributor Author

I think that you can merge it @kgoedecke

@kgoedecke
kgoedecke merged commit 1687192 into doop-design:main Nov 21, 2026
2 checks passed
@davidabou
davidabou deleted the feat/windows-custom-titlebar branch November 21, 2026 07:42
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