Skip to content

fix(web): adapt caption buttons to Windows styling - #2829

Merged
GCWing merged 1 commit into
GCWing:mainfrom
guantw:fix/windows-caption-buttons
Sep 6, 2026
Merged

GCWing merged 1 commit into
GCWing:mainfrom
guantw:fix/windows-caption-buttons

Conversation

@guantw

@guantw guantw commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • Browser fixture — checked light/dark rendering, 46px button widths, edge alignment, command callbacks, disabled controls, keyboard focus, and maximize/restore glyphs and labels.
  • 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

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable (no string or documentation changes needed).
image

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.
@GCWing
GCWing merged commit 2bb891c into GCWing:main Sep 6, 2026
9 checks passed
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