fix(acp): resolve /compact alias collision across ACP, TUI, and command catalog - #69303
Merged
Conversation
…mmand collision - acp_adapter/server.py: rename compact -> compress for context compression command - tui_gateway/server.py: rename /compact -> /density for display density toggle - ui-tui/core.ts: rename compact -> density for display density toggle - Internal config keys (tui_compact) and UI state (ctx.ui.compact) unchanged
… to /compress, update README - tui_gateway commands.catalog: skip _TUI_EXTRA entries that collide with a registry command or alias (the /compact class of bug, #57133; also removes the pre-existing /sessions duplicate) — registry entry is canonical. - apps/desktop: /compact now dispatches as an alias of /compress (matching the registry's canonical alias) instead of dead-ending; /density (the renamed TUI display toggle) is marked terminal-only so the desktop palette doesn't advertise a command its dispatcher can't run. - ui-tui/README.md: document /density instead of the old /compact toggle. - tests: commands.catalog regression test asserting no duplicate advertised names and no command shadowing another command's alias; desktop routing test.
Contributor
૮ >ﻌ< ა ci reviewrunning on 8b0bb9d CI timingsCI timings · View jobWall time 7m45s vs 7m46s (-0.2%). 6 job(s) slower, 12 faster, 2 unchanged.
|
This was referenced Jul 22, 2026
Closed
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
/compactno longer means two different things at once: ACP/registry surfaces now advertise/compressfor context compression and the TUI display toggle is/density, so the palette, completions, and dispatch all agree. Root cause: the command registry aliasedcompact → compresswhile ACP and the TUI's_TUI_EXTRAeach independently registered their owncompact, producing duplicate catalog entries and alias shadowing.Changes
acp_adapter/server.py: ACP commandcompact→compress(advertisement, dispatch table,_cmd_compress,/contexttips).tui_gateway/server.py: TUI display toggle/compact→/density(config.set/config.getkey,_TUI_EXTRA, completions);commands.catalognow skips_TUI_EXTRAentries that collide with a registry command or alias (also removes a pre-existing/sessionsduplicate).ui-tui/src/app/slash/commands/core.ts+ui-tui/README.md: client-side toggle renamed to/density, docs updated.apps/desktop/src/lib/desktop-slash-commands.ts:/compactroutes as an alias of/compress(context compression) instead of dead-ending as "terminal-only";/densitymarked terminal-only so the desktop never advertises a command its dispatcher can't run.commands.catalogregression test (no duplicate advertised names, no command shadowing another command's alias); desktop/compact → /compressrouting test; ACP assertion updates.Validation
commands.catalog/compactadvertised while registry aliasescompact→compress;/sessionslisted twice/compact/densitytoggles display,/compress(alias/compact) compresses/compact/compressTargeted tests:
tests/test_tui_gateway_server.py+tests/acp/→ 707 passed, 0 failed.ui-tuiandapps/desktoptypechecks clean; desktop vitest suite 17/17.Credit
Salvaged from #57162 by @liuhao1024 (broadest of the competing fixes). Same collision independently addressed in #57073 and #57131 (TUI-only). Fixes #57133, #57070, #57532.
Infographic