Skip to content

Commit 9bd0dc6

Browse files
chr1syyclaude
andcommitted
fix(web-hotkeys): address PR #882 review feedback
- Add `/` special-case to mobile shortcut matcher to stay in sync with the desktop helper at src/renderer/hooks/keyboard/useKeyboardShortcutHelpers.ts - Replace inline `import()` type casts in web-server-factory.ts with a top-level `Shortcut` import for readability - Route `goToAutoRun` shortcut to the right-drawer Auto Run tab so it's consistent with `goToFiles` and `goToHistory` (not the full-screen panel) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6c68044 commit 9bd0dc6

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎src/main/web-server/web-server-factory.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { isWebContentsAvailable } from '../utils/safe-send';
1313
import type { ProcessManager } from '../process-manager';
1414
import type { StoredSession, SettingsStoreInterface as SettingsStore } from '../stores/types';
1515
import type { Group } from '../../shared/types';
16+
import type { Shortcut } from '../../shared/shortcut-types';
1617
import { getDefaultShell } from '../stores/defaults';
1718

1819
/** UUID v4 format regex for validating stored security tokens.
@@ -960,10 +961,7 @@ export function createWebServerFactory(deps: WebServerFactoryDependencies) {
960961
audioFeedbackEnabled: settingsStore.get('audioFeedbackEnabled', false) as boolean,
961962
colorBlindMode: settingsStore.get('colorBlindMode', 'false') as string,
962963
conductorProfile: settingsStore.get('conductorProfile', '') as string,
963-
shortcuts: settingsStore.get('shortcuts', {}) as Record<
964-
string,
965-
import('../../shared/shortcut-types').Shortcut
966-
>,
964+
shortcuts: settingsStore.get('shortcuts', {}) as Record<string, Shortcut>,
967965
};
968966
});
969967

‎src/web/hooks/useMobileKeyboardHandler.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ function matchesShortcut(e: KeyboardEvent, sc: Shortcut | undefined): boolean {
8383

8484
const mainKey = keys[keys.length - 1];
8585

86+
if (mainKey === '/' && key === '/') return true;
8687
if (mainKey === 'arrowleft' && key === 'arrowleft') return true;
8788
if (mainKey === 'arrowright' && key === 'arrowright') return true;
8889
if (mainKey === 'arrowup' && key === 'arrowup') return true;

‎src/web/mobile/App.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ export default function MobileApp() {
21702170
settings: () => setShowSettingsPanel(true),
21712171
goToFiles: () => handleOpenRightDrawer('files'),
21722172
goToHistory: () => handleOpenRightDrawer('history'),
2173-
goToAutoRun: () => handleOpenAutoRunPanel(),
2173+
goToAutoRun: () => handleOpenRightDrawer('autorun'),
21742174
agentSessions: () => setShowAllSessions(true),
21752175
usageDashboard: () => setShowUsageDashboard(true),
21762176
openCue: () => setShowCuePanel(true),

0 commit comments

Comments
 (0)