Skip to content

Add a quick palette command to open the data directory - #4256

Merged
andrewkchan merged 2 commits into
get-bb:mainfrom
andrewkchan:bb/add-command-to-open-quick-palette-item-thr_tq7d3t35tg
Sep 24, 2026
Merged

andrewkchan merged 2 commits into
get-bb:mainfrom
andrewkchan:bb/add-command-to-open-quick-palette-item-thr_tq7d3t35tg

Conversation

@andrewkchan

@andrewkchan andrewkchan commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

This adds a new Open data directory command to the quick palette, it will be useful for debugging user issues.

What was wrong

The bb data directory (BB_DATA_DIR, else ~/.bb) holds logs, the SQLite databases, plugins, and secrets, but nothing in the app reveals it. Users had to know the path and open it from a terminal or file manager themselves; bb status prints Data dir: …, but the desktop app offered no way to act on it.

What changed

Adds a desktop-only dataDirectory.open app command, surfaced in the quick palette as Open data directory under "Window and layout", which reveals the data directory in the system file manager (Finder, Explorer, or the Linux desktop handler).

  • packages/domain/src/app-keybindings.ts — new dataDirectory.open app command id.
  • apps/server/src/services/system/app-keybindings.ts — unassigned desktopOnly default binding (mainSurface, not while a modal is open), so it is assignable in Settings → Keybindings.
  • apps/app/src/lib/app-command-metadata.ts — palette metadata.
  • packages/desktop-contract/src/info.ts — optional openDataDirectory?() on BbDesktopApi, with preload and IPC plumbing in apps/desktop/src/preload.ts and apps/desktop/src/desktop-window-command-ipc.ts.
  • apps/desktop/src/main.ts — main-process handler resolves the data directory the same way the log viewer does and calls shell.openPath, logging a failure instead of rejecting into the renderer.
  • apps/app/src/hooks/useDataDirectoryCommand.ts — registers the handler only when the desktop bridge exposes openDataDirectory; wired up in AppLayout.
  • docs/configuration.md — keybindings table row.

On the web the command is hidden rather than a no-op: availability requires both a registered handler (absent without the desktop bridge) and a client-applicable binding (desktopOnly). Desktop builds predating the new IPC method also hide it, since the optional contract member is absent there.

No HOST_DAEMON_PROTOCOL_VERSION bump: this touches only the desktop shell's preload IPC, not the server/daemon wire. No new CLI command — bb status already reports the data directory path, and opening an OS file manager is a desktop-shell capability.

How you verified

  • pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/desktop --filter=@bb/server --filter=@bb/domain --filter=@bb/desktop-contract passes.
  • Existing suites pass: app command palette, keybindings, and command provider tests; apps/desktop/test/preload-browser-api.test.ts; server src/services/system.
  • pnpm exec turbo run lint --filter=@bb/app --filter=@bb/desktop — no new findings.

AGENT GENERATED

🤖 Generated with Claude Code

Add a desktop-only "Open data directory" quick palette command that reveals
the bb data directory (BB_DATA_DIR, else ~/.bb) in the system file manager.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@andrewkchan
andrewkchan force-pushed the bb/add-command-to-open-quick-palette-item-thr_tq7d3t35tg branch from 6440010 to 3ead5f9 Compare September 24, 2026 05:41
@andrewkchan
andrewkchan merged commit 8258680 into get-bb:main Sep 24, 2026
4 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.

1 participant