Skip to content

Hide /q from dialogs and sort all commands by label#2200

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/docker-agent-github-issue-2194-discussio-88ef4b10
Mar 20, 2026
Merged

Hide /q from dialogs and sort all commands by label#2200
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/docker-agent-github-issue-2194-discussio-88ef4b10

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Mar 20, 2026

  • Add Hidden field to commands.Item for slash-only aliases
  • Mark /q as hidden so only /exit and /quit appear in UI
  • Filter hidden commands centrally in BuildCommandCategories
  • Sort all command categories by label uniformly
  • Sort completion items across categories into a single flat list

Fixes #2194

- Add Hidden field to commands.Item for slash-only aliases
- Mark /q as hidden so only /exit and /quit appear in UI
- Filter hidden commands centrally in BuildCommandCategories
- Sort all command categories by label uniformly
- Sort completion items across categories into a single flat list

Fixes docker#2194

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner March 20, 2026 18:03
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

This PR cleanly implements the hidden command feature and sorting improvements:

Correctly adds Hidden field to filter /q from UI while keeping it functional
Centralized filtering in BuildCommandCategories with visibleOnly helper
Uniform sorting applied to all command categories by label
Flat sorted completion list across all categories
No bugs found - closure variable capture is correctly implemented

The code follows Go best practices and the changes are well-structured.

@dgageot dgageot merged commit d53b643 into docker:main Mar 20, 2026
8 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.

Exit, Quit or Quit (short)?

2 participants