Skip to content

Fix #838: distinguish internal builder-terminal commands#866

Merged
amrmelsayed merged 5 commits into
mainfrom
builder/bugfix-838
May 26, 2026
Merged

Fix #838: distinguish internal builder-terminal commands#866
amrmelsayed merged 5 commits into
mainfrom
builder/bugfix-838

Conversation

@amrmelsayed
Copy link
Copy Markdown
Collaborator

Summary

Three contributes.commands in packages/vscode/package.json rendered
poorly on the extension's Feature Contributions tab (it lists every
declared command regardless of commandPalette when:false):

  • codev.openBuilderTerminal (visible) and codev.openBuilderById
    (palette-hidden) both used the title "Codev: Open Builder Terminal",
    producing two indistinguishable lines.
  • codev.openBuilderRow carried "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. commandPalette when:false hides them from the palette but
not from the Feature Contributions / Marketplace listing.

Fix

Adopt a Codev (internal): … prefix for the two palette-hidden commands
so 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:

Command Title
codev.openBuilderTerminal (unchanged) Codev: Open Builder Terminal
codev.openBuilderById Codev (internal): Open Builder Terminal by ID
codev.openBuilderRow Codev (internal): Open Builder Terminal and Expand Row

Test Plan

  • Regression test added (packages/vscode/src/__tests__/contributes-commands.test.ts)
    • Asserts no two contributes.commands share a title.
    • Asserts no title carries the (and ...) debug-note pattern.
    • Verified the tests fail against pre-fix package.json (via git stash) and pass after the fix.
  • Build passes (pnpm compile clean after building @cluesmith/codev-core + @cluesmith/codev-types).
  • All tests pass (pnpm exec vitest run — 5 files / 36 tests).

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.
@amrmelsayed
Copy link
Copy Markdown
Collaborator Author

Architect Review

Low-risk change. Three palette-hidden command titles disambiguated with Codev (internal): prefix; visible codev.openBuilderTerminal retained unchanged. Includes a regression test asserting no two contributed commands share a title.

Verified:

  • Diff matches issue body exactly — no scope creep
  • Convention picked (Codev (internal):) matches the suggested option in the issue
  • Regression test at packages/vscode/src/__tests__/contributes-commands.test.ts covers both the no-duplicate-titles and no-debug-parenthetical invariants
  • No other code references the changed titles (commands wired by id)

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.
@amrmelsayed amrmelsayed merged commit bebe033 into main May 26, 2026
6 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.

Duplicate / debug-looking command titles in VS Code Feature Contributions tab

1 participant