Skip to content

Desktop: mini-chat hotkey Ctrl+Shift+Space warned 3x per launch and silent in UI; app-state backups written in stale schema #1175

Backlog

Description

@xtalia

Summary

Two smaller desktop-side issues found while auditing main.log and %APPDATA%\Command Code:

  1. The global mini-chat hotkey CommandOrControl+Shift+Space is unavailable on every single launch, and the app logs the fact three times per start but degrades silently in the UI.
  2. app-state-backups/*.json are written in a stale schema (threads at the root) while the live app-state.json uses appState.threads, so a restore from backup would not match the current format.

Expected Behavior

  1. When the configured global hotkey is already taken, the app should tell the user once (and offer to rebind / pick another shortcut), not emit the same warning three times per launch and leave the feature silently in-app-only.
  2. Backups should be written in the same schema as the live file, so app-state-backups/*.json is a usable restore source.

Actual Behavior

1. Hotkey conflict, logged 3× per launch, silent in UI

This appears on every launch in the sampled range (2026-11-19 → 2026-11-25), always three identical lines:

[2026-11-23 16:31:25.909] [warn]  [menu] CommandOrControl+Shift+Space is held by another app; mini chat key is in-app only
[2026-11-23 16:31:26.265] [warn]  [menu] CommandOrControl+Shift+Space is held by another app; mini chat key is in-app only
[2026-11-23 16:31:26.268] [warn]  [menu] CommandOrControl+Shift+Space is held by another app; mini chat key is in-app only

Same triple at 2026-11-19 01:43:29/30, 2026-11-20 02:30:32, 2026-11-22 …, 2026-11-23 11:16:44/45. The triple suggests the accelerators are registered more than once per launch (e.g. once for the app menu and again per window). There is no user-facing indication at all, so the hotkey just silently does nothing.

2. Backup schema drift

app-state-backups/app-state.1795459238246.json (5,320 bytes, 2026-11-23 22:40) top-level keys:

threads, activeThreadId, permissionMode, projectPath, projectName, projects, projectNames,
pinnedProjects, expandedProjectPaths, cliPath, openWorkbenchByDefault, steerQueuedMessages,
deletedThreads, removedProjects

Live app-state.json (226 KB) top-level keys:

window, appState, accountCache, skillsCatalogCache, permissionGrants, trustedProjectRoots,
updaterReady, updaterInstallFailures, updaterInstallAttempt, steerDeliveries, runRecords, interruptedRuns

In the backup, threads live at the root (j.threads, 12 entries, messages inlined); in the live file they live at j.appState.threads (19 entries). The backup also lacks runRecords, steerDeliveries, interruptedRuns, window, and permissionGrants entirely — so it is not a snapshot of the same shape, and 7 current threads are absent from it.

Steps to reproduce the issue

Hotkey:

  1. Have another app that owns Ctrl+Shift+Space running.
  2. Launch Command Code desktop.
  3. Check main.log: three identical [menu] CommandOrControl+Shift+Space is held by another app warnings per launch. Press the shortcut: nothing happens, and the app gives no hint that the global hotkey is inactive.

Backup schema:

  1. Launch Command Code desktop, open a few chats, let it save state (a backup lands in app-state-backups/).
  2. Compare top-level keys of the newest app-state-backups/app-state.<ts>.json against app-state.json.
  3. The backup has threads at the root; the live file has appState.threads.

Command Code Version

0.1.63 (desktop, packaged: true; ProductVersion 0.1.63.0)

Operating System

Windows

Terminal/IDE

Command Code desktop app (Electron), launched from the Start Menu shortcut — not a terminal session.

Shell

N/A (desktop app)

Session file (optional)

Log excerpts included above. Windows event/registry details or the full backup JSON available on request.

Fix prompt (optional)

Hotkey: in the desktop main process the menu/accelerator registration logs [menu] CommandOrControl+Shift+Space is held by another app; mini chat key is in-app only on each globalShortcut.register failure. Three warnings per launch means registration is attempted three times; register once at app startup (guarded by the single-instance owner), and on failure show a one-time user-visible notice with an option to pick a different shortcut. Store the conflict state so the UI can indicate that the global hotkey is inactive.

Backup schema: the backup writer emits { threads, activeThreadId, projectPath, … } while the live store shape is { window, appState: { threads, … }, permissionGrants, runRecords, … }. Make the backup serializer use the same schema version as the live store (and include runRecords / permissionGrants / window), or migrate old backups on read so a restore cannot silently drop data.

Verify by: launching with a conflicting hotkey owner and asserting exactly one warning line plus a visible notice; and by diffing the top-level key sets of the newest backup against app-state.json (appState.threads must exist in both).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions