Skip to content

fix(commands): make /custom-commands an alias of /commands - #2132

Merged
will-lamerton merged 2 commits into
mainfrom
fix/custom-commands-alias
Nov 11, 2026
Merged

will-lamerton merged 2 commits into
mainfrom
fix/custom-commands-alias

Conversation

@will-lamerton

Copy link
Copy Markdown
Member

A small user-visible fix that has to land before PR 5 of the command-dispatcher sequence (#2098 … #2128). It is kept separate from the refactor, as the phase 2 rules ask.

What was wrong

/custom-commands is the old name of /commands. Only /custom-commands create <name> still worked, because the create handler in app/utils/handlers/create-handler.ts matched both names. Any other use, such as plain /custom-commands or /custom-commands show x, reported Unknown command.

PR 5 moves the create subcommands into the /commands module itself. Without this alias, /custom-commands create would stop working.

Fix

Add {name: 'custom-commands', target: 'commands'} to COMMAND_ALIASES. /custom-commands … is now rewritten to /commands … like the other old names:

  • /custom-commands lists your commands.
  • /help custom-commands opens the /commands page.
  • A fully typed /custom-commands completes to itself in the slash menu.

Tests

  • command-dispatcher.spec.ts: /custom-commands renders the same view as /commands, and /custom-commands create review-code still scaffolds .nanocoder/commands/review-code.md and starts the design prompt. It runs in a temp cwd.
  • aliases.spec.ts: custom-commands is in the list of old names that must still resolve.
  • Ran tsc --noEmit and biome. The dispatcher and aliases specs pass.

🤖 Generated with Claude Code

/custom-commands was renamed to /commands long ago, but only
"/custom-commands create <name>" kept working, because the create
handler matched both names; anything else reported "Unknown command".
Register it in the alias table like the other old names.

This also lets the create subcommands move into /commands without
losing the old spelling.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added the area:tui Terminal UI label Nov 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

nc-review could not produce a verdict this run (agent exit 1). This is a problem with the review agent, not with your pull request. A maintainer can retry with /re-review.

@will-lamerton

Copy link
Copy Markdown
Member Author

Pushed a fix for the one CI failure: help-utils.spec asserted that the /commands help page lists no old names. It now lists custom-commands, which is the point of this PR, so the assertion is updated to expect it.

🤖 Generated with Claude Code

@will-lamerton
will-lamerton merged commit 440255f into main Nov 11, 2026
18 checks passed
@will-lamerton
will-lamerton deleted the fix/custom-commands-alias branch November 11, 2026 20:07
jay23606 added a commit to jay23606/nanocoder that referenced this pull request Nov 12, 2026
…ective#2132)

* fix(commands): make /custom-commands an alias of /commands

/custom-commands was renamed to /commands long ago, but only
"/custom-commands create <name>" kept working, because the create
handler matched both names; anything else reported "Unknown command".
Register it in the alias table like the other old names.

This also lets the create subcommands move into /commands without
losing the old spelling.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* test(help): the /commands help page now lists its old name

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tui Terminal UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant