fix(web): adapt caption buttons to Windows styling - #2829
Merged
Merged
Conversation
Use Windows-specific caption glyphs and 46px rectangular hit areas for minimize, maximize/restore, and close in the desktop shell. Extend the Windows controls through the scene gutter and apply the existing danger and contrast tokens to the close hover state. Gate the glyphs and layout behind the Windows desktop runtime check so other platforms retain their existing appearance and command callbacks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Give the Windows desktop shell native-style minimize, maximize/restore, and close buttons with 46px rectangular hit areas, Windows-specific glyphs, and a close button aligned with the right window edge. Keep the existing appearance on other platforms.
Type and Areas
Type: UI/UX bug fix
Areas: Web UI, Windows desktop window chrome
Motivation / Impact
Windows previously used the compact, rounded shared window controls, leaving the close button inset from the edge. The Windows-only variant fills the title bar height, removes gaps between caption buttons, and uses the existing danger and contrast tokens for the close hover state. Existing command callbacks, localized labels, disabled behavior, and keyboard focus support remain in place.
Verification
pnpm run check:web— passed, including Web UI type-check, Appearance, theme color, and theme visual contract checks.pnpm --dir src/web-ui exec vitest run src/app/components/SceneTopBar/SceneTopBar.test.tsx src/infrastructure/runtime/environment.test.ts— 7 tests passed.pnpm run motion:audit— reviewed the presentation inventory.build-dev.bat— Windows debug build passed. Launched the built desktop with its packaged frontend in an isolated preview profile and verified the new controls and actual maximize/restore behavior.git diff --check— passed.Reviewer Notes
The new class and glyphs are enabled only by
isWindowsDesktopRuntime(). The scene layout adjustment is scoped to that Windows class. This changes local window chrome and adds no Tauri commands, transport behavior, persisted shapes, or locale strings.Remote workspace, remote control, Peer Device Mode, and detached dispatch were not exercised. Native runtime checks were performed on Windows only.
AI-assisted. Testing level: lightly tested through focused automated checks and manual Windows verification; broader platform coverage is left to CI.
Checklist