wip(app): keep keyboard shortcuts alive on /settings

Chrome gating currently disables shortcuts on non-workspace routes. Temporary
pathname check until chromeEnabled is split into separate workspace/global
concerns.
This commit is contained in:
Mohamed Boudra
2026-04-18 16:08:43 +07:00
parent 4d6a154f6e
commit f483e62231

View File

@@ -403,6 +403,12 @@ function AppContainer({
const isCompactLayout = useIsCompactFormFactor();
const chromeEnabled = chromeEnabledOverride ?? daemons.length > 0;
const pathname = usePathname();
// TODO: stop matching pathname here as a branch. `chromeEnabled` should not
// conflate workspace/project-specific chrome (sidebar, mobile gesture) with
// global concerns like keyboard shortcuts. Split those out so settings (and
// other non-workspace routes) don't need a special-case to keep shortcuts alive.
const keyboardShortcutsEnabled = chromeEnabled || pathname.startsWith("/settings");
useEffect(() => {
const bp = UnistylesRuntime.breakpoint;
@@ -434,7 +440,7 @@ function AppContainer({
}, [isCompactLayout, chromeEnabled, isFocusModeEnabled, agentListOpen, sidebarWidth]);
useKeyboardShortcuts({
enabled: chromeEnabled,
enabled: keyboardShortcutsEnabled,
isMobile: isCompactLayout,
toggleAgentList,
toggleFileExplorer,