refactor: rename overlay CommandPalette → ComboBox#2286
Draft
merchako wants to merge 1 commit into
Draft
Conversation
This was referenced May 16, 2026
The existing "command palette" overlay is a per-WebView generic
searchable picker (currently used by hello-rock3 to pick USFM
markers), not a global command-launcher. The CommandPalette name
was misleading from day one — the original type comment even
hinted at the conflation ("marker code like 'ft' or command
name") — and it conflicted with the broader Action Palette
concept proposed separately (see PR #2284 and
docs/plans/2026-05-15-action-palette-proposal.md).
This overlay is the cross-iframe analog of the in-tree `ComboBox`
component in `platform-bible-react` — both are built on shadcn's
`Command` (which wraps cmdk). cmdk explicitly positions its
`Command` primitive as serving both command palettes and
accessible comboboxes; aligning the overlay's name with `ComboBox`
puts the right breadcrumb for extension authors.
Renames:
- Types: CommandPaletteItem → ComboBoxItem,
CommandPaletteRequest → ComboBoxRequest
- Service method: showCommandPalette → showComboBox
- Component files: overlay-command-palette.* → overlay-combo-box.*
(matches pbr's combo-box.component.tsx kebab-case)
- Internal symbols: validateCommandPaletteRequest, OverlayCommandPalette*,
localizeCommandPaletteItems, etc.
- Overlay discriminator: 'commandPalette' → 'comboBox'
- Data attributes: data-overlay-command-palette* → data-overlay-combo-box*
- LocalizeKeys: %overlay_commandPalette_*% → %overlay_comboBox_*%,
%overlay_aria_commandPaletteOpened% → ...comboBoxOpened%
Public PAPI surface preserves CommandPaletteItem,
CommandPaletteRequest, and showCommandPalette as @deprecated
aliases so out-of-repo extensions keep working.
Capitalization note: cmdk's preferred spelling for non-command-palette
uses of `Command` is `Combobox` (lowercase b). pbr uses `ComboBox`
(capital B); this overlay matches pbr for consistency. Harmonizing
toward cmdk's spelling is out of scope here — a future refactor
could rename pbr's `ComboBox` → `Combobox`, pbr's
`MultiSelectComboBox` → `ComboboxMulti`, and the overlay
correspondingly. Flagged for a follow-up PR.
Localization values updated:
- en: 'Command palette opened' → 'Combo box opened'
- es: 'Paleta de comandos abierta' → 'Cuadro combinado abierto'
(flag for localizer review)
167 overlay tests pass; ESLint clean; papi.d.ts regenerated.
c1e032c to
0c328c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to #2284 (Action Palette / Command vs. Action vocabulary proposal). Please read that PR first — this one only makes sense in its context.
This PR supersedes #2285, which was a previous attempt named `QuickPick`. The branch was renamed and GitHub auto-closed that PR.
What this is
Renames the existing `overlay-command-palette` code to `overlay-combo-box`. The existing overlay is a per-WebView generic searchable picker (currently used by `hello-rock3` to pick USFM markers), not a global command-launcher. Naming it "Command Palette" was misleading from day one — the original type comment even hinted at it: `label: 'marker code like "ft" or command name'`.
Why `ComboBox` (and not `QuickPick`, `ActionPalette`, etc.)
This overlay is the cross-iframe analog of the in-tree `ComboBox` component in `platform-bible-react`. Both are built on shadcn's `Command` component, which wraps cmdk. cmdk's own docs explicitly position `Command` as serving both command palettes and accessible comboboxes — so naming the overlay `ComboBox` aligns with the actual foundation rather than borrowing a name (VS Code's "Command Palette", or the proposed "Action Palette") for something it isn't.
The Action Palette under discussion in #2284 is a separate, future, app-global surface. It would use the same cmdk primitive internally but is not a kind of combobox — different API (registry-driven, not caller-supplied items), different invocation pattern (global keybinding, not extension-triggered).
Why two PRs
These decisions are independent and reviewable independently:
Even if #2284 is rejected, this rename stands on its own merits: the current name doesn't describe what the code does.
What changed
On capitalization
cmdk's preferred spelling for non-command-palette uses of `Command` is `Combobox` (lowercase b). pbr currently uses `ComboBox` (capital B). This overlay matches the existing pbr capitalization for consistency — keeping two spellings of the same word in the same codebase would be a footgun.
Harmonizing toward cmdk's spelling (renaming pbr's `ComboBox` → `Combobox`, `MultiSelectComboBox` → `ComboboxMulti`, and the overlay correspondingly) is intentionally out of scope here. It's a public-API-breaking change for pbr consumers, and bundling it would expand the blast radius of this rename and risk derailing the broader Action Palette discussion. Flagged for a possible follow-up PR.
Backward compatibility
Public PAPI surface keeps `CommandPaletteItem`, `CommandPaletteRequest`, and `showCommandPalette` as `@deprecated` aliases so out-of-repo extensions don't break.
Verification
Status
Draft, pending @tjcouch-sil's read on the companion proposal #2284 and on this rename specifically. Happy to land this independently if the broader proposal is deferred, or hold it indefinitely if you'd rather not touch the public API right now.
This change is