From a622860a3e37ce0a4fb657a3273cfaa5fa08d710 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Thu, 16 Jul 2026 23:46:24 +0200 Subject: [PATCH] Keep workspace focus mode scoped and easy to exit (#2151) * fix(workspace): keep focus mode scoped and easy to exit Route focus mode through the active workspace so persisted state cannot hide chrome on settings or other screens. Add a visible exit control and keep desktop window chrome aligned and visually quiet. * fix(app): clarify muted chrome semantics --- docs/design.md | 2 + packages/app/e2e/workspace-focus-mode.spec.ts | 51 +++++++++++++++++++ packages/app/src/app/_layout.tsx | 28 +++++++--- .../src/components/headers/menu-header.tsx | 18 ++++++- .../app/src/components/split-container.tsx | 14 +++++ packages/app/src/desktop/host.ts | 1 + .../app/src/hooks/use-keyboard-shortcuts.ts | 4 -- packages/app/src/i18n/resources/ar.ts | 1 + packages/app/src/i18n/resources/en.ts | 1 + packages/app/src/i18n/resources/es.ts | 1 + packages/app/src/i18n/resources/fr.ts | 1 + packages/app/src/i18n/resources/ja.ts | 1 + packages/app/src/i18n/resources/pt-BR.ts | 1 + packages/app/src/i18n/resources/ru.ts | 1 + packages/app/src/i18n/resources/zh-CN.ts | 1 + .../keyboard/keyboard-action-dispatcher.ts | 2 + .../app/src/keyboard/route-shortcut.test.ts | 2 +- packages/app/src/keyboard/route-shortcut.ts | 8 +-- packages/app/src/screens/settings-screen.tsx | 7 ++- .../workspace/workspace-desktop-tabs-row.tsx | 49 +++++++++++++++++- .../screens/workspace/workspace-screen.tsx | 23 +++++++-- packages/app/src/styles/theme.ts | 8 +++ packages/desktop/src/preload.ts | 1 + .../desktop/src/window/window-manager.test.ts | 28 ++++++++++ packages/desktop/src/window/window-manager.ts | 37 +++++++++++++- 25 files changed, 261 insertions(+), 30 deletions(-) create mode 100644 packages/app/e2e/workspace-focus-mode.spec.ts diff --git a/docs/design.md b/docs/design.md index 588b53904..6cf7e4689 100644 --- a/docs/design.md +++ b/docs/design.md @@ -40,6 +40,8 @@ The rule, condensed: text that _names_ a surface or a group is `medium`. Text th Foreground is for the thing being acted on: row titles, section headings, the selected sidebar item. `foregroundMuted` is for context: hints, descriptions, secondary metadata, idle sidebar items, placeholders, status text. +`foregroundExtraMuted` is reserved for passive chrome that must sit behind muted text, such as an always-visible window control. Use the solid token instead of lowering SVG opacity; per-path opacity makes overlapping icon strokes render unevenly. Interactive hover and pressed states return to `foreground`. + Accent is the one CTA per surface. A `