Fix #838: distinguish internal builder-terminal commands#866
Merged
Conversation
The Feature Contributions tab on the extension's detail page lists every declared command regardless of commandPalette when:false. With codev.openBuilderTerminal and codev.openBuilderById sharing the same title and codev.openBuilderRow carrying a parenthetical debug-style title, the tab rendered two indistinguishable lines plus one that read like internal dev notes. Mark the two palette-hidden commands with a 'Codev (internal):' prefix so the contributions list cleanly separates user-callable from internal entries, and reword the row variant out of the parenthetical form. Adds a contributes-commands regression test that asserts no two commands share a title and no title carries the '(and ...)' debug pattern.
Collaborator
Author
Architect ReviewLow-risk change. Three palette-hidden command titles disambiguated with Verified:
Approved. Please merge. Architect review |
Codex's PR review caught that openBuilderById is bound in the view/item/context menu (right-click on a builder row), so labeling it 'Codev (internal): …' was a UX regression in that menu — worse than the original duplicate-title problem. Resolve by differentiating via the ellipsis convention on the palette command instead: - openBuilderTerminal (palette, prompts to pick a builder) -> 'Codev: Open Builder Terminal...' - openBuilderById (context menu on a known builder row) -> 'Codev: Open Builder Terminal' - openBuilderRow (truly internal, only a TreeItem click handler) -> 'Codev (internal): Open Builder Terminal and Expand Row' Strengthen the regression test with a third invariant: a command labeled '(internal)' must not appear in any view/item/context menu entry. Verified the new assertion fails against the previous title for openBuilderById.
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.
Summary
Three
contributes.commandsinpackages/vscode/package.jsonrenderedpoorly on the extension's Feature Contributions tab (it lists every
declared command regardless of
commandPalettewhen:false):codev.openBuilderTerminal(visible) andcodev.openBuilderById(palette-hidden) both used the title
"Codev: Open Builder Terminal",producing two indistinguishable lines.
codev.openBuilderRowcarried"Codev: Open Builder Terminal (and expand row)",which reads like an internal dev note.
Fixes #838
Root Cause
The three commands were declared with overlapping or parenthetical
titles.
commandPalettewhen:falsehides them from the palette butnot from the Feature Contributions / Marketplace listing.
Fix
Adopt a
Codev (internal): …prefix for the two palette-hidden commandsso anyone scanning the contributions list can tell which entries are
user-callable at a glance, and reword the row variant out of the
parenthetical form:
codev.openBuilderTerminal(unchanged)Codev: Open Builder Terminalcodev.openBuilderByIdCodev (internal): Open Builder Terminal by IDcodev.openBuilderRowCodev (internal): Open Builder Terminal and Expand RowTest Plan
packages/vscode/src/__tests__/contributes-commands.test.ts)contributes.commandsshare a title.(and ...)debug-note pattern.package.json(viagit stash) and pass after the fix.pnpm compileclean after building@cluesmith/codev-core+@cluesmith/codev-types).pnpm exec vitest run— 5 files / 36 tests).