Skip to content

fix(tui): resolve /compact alias collision between compress alias and TUI display toggle (#57070) - #57131

Closed
AlexFucuson9 wants to merge 1 commit into
NousResearch:mainfrom
AlexFucuson9:fix-compact-alias-collision-57070
Closed

fix(tui): resolve /compact alias collision between compress alias and TUI display toggle (#57070)#57131
AlexFucuson9 wants to merge 1 commit into
NousResearch:mainfrom
AlexFucuson9:fix-compact-alias-collision-57070

Conversation

@AlexFucuson9

Copy link
Copy Markdown
Contributor

Problem

PR #57029 added "compact" as an alias for the compress command (CommandDef("compress", ..., aliases=("compact",))). This collided with the pre-existing /compact TUI display toggle in _TUI_EXTRA, causing commands.catalog RPC to return /compact twice with two different meanings:

  • As an alias for /compress ("Compress conversation context")
  • As a standalone TUI command ("Toggle compact display mode")

Impact: Clients that treat pairs entries and canon aliases as mutually exclusive crash on startup (e.g. fathah/hermes-desktop#802).

Changes

  1. Rename /compact TUI display toggle to /compact-ui in _TUI_EXTRA
  2. Dedup guard in commands.catalog handler: skip _TUI_EXTRA entries whose name already appears as a registered command or alias in canon
  3. Backward compat: settings.toggle and settings.get handlers accept both "compact" and "compact-ui" keys
  4. Autocomplete: update extras to use /compact-ui

Fixes #57070

… TUI display toggle

PR NousResearch#57029 added 'compact' as an alias for the 'compress' command, which
collided with the pre-existing /compact TUI display toggle in _TUI_EXTRA.
This caused the commands.catalog RPC to return /compact twice with two
different meanings, crashing clients like hermes-desktop.

- Rename /compact TUI display toggle to /compact-ui in _TUI_EXTRA
- Add dedup guard in catalog handler: skip _TUI_EXTRA entries whose name
  already appears as a registered command or alias in canon
- Update settings.toggle and settings.get handlers to accept both
  'compact' and 'compact-ui' for backward compatibility
- Update autocomplete extras to use /compact-ui

Fixes NousResearch#57070
@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists labels Jul 2, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Competing fix cluster for #57070 (all open, all fixing the /compact catalog collision introduced by merged #57029 via different edits): this PR (#57131) renames the legacy TUI toggle to /compact-ui and adds a commands.catalog dedup guard; #57073 keeps /compact in canon and omits the toggle from the catalog; #57078 lets command aliases override TUI extras. Related to #57029 (the merged alias that introduced the regression). Flagging for a maintainer to pick the canonical approach; not marking any as duplicate.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for tracing the catalog collision; it is still present on current main.

Problems

  • tui_gateway/server.py changes the catalog-only name to /compact-ui, but the local TUI registry still implements only compact at ui-tui/src/app/slash/commands/core.ts:279-290. The new catalog command therefore has no local TUI handler.
  • Please add coverage for the collision contract. Current catalog tests at tests/test_tui_gateway_server.py:4511-4582 cover quick commands, /mouse, and hidden gateway commands, but not /compact alias/catalog behavior.

Suggested changes

  • Rename or alias the local TUI toggle to compact-ui, retaining the proposed config-key compatibility bridge.
  • Assert that catalog pairs excludes /compact, includes /compact-ui once, and that canon['/compact'] resolves to /compress.

Automated hermes-sweeper review.

Comment thread tui_gateway/server.py
@@ -11122,7 +11122,7 @@ def _(rid, params: dict) -> dict:
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/compact-ui is only introduced in this backend catalog. The local TUI registry still recognizes compact at ui-tui/src/app/slash/commands/core.ts:279-290, so this advertised command has no local toggle handler. Rename or alias that frontend command and add an execution regression test.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
@teknium1 teknium1 added the area/compression Context compression and continuation sessions label Jul 19, 2026
@teknium1

Copy link
Copy Markdown
Contributor

The /compact collision is fixed via #69303 (merged) — salvage of #57162 (broadest of the three competing fixes, covering ACP + TUI + catalog dedup). Your fix is credited in the merged PR body as an independent solution. Thanks!

@teknium1 teknium1 closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/compression Context compression and continuation sessions comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New /compact alias for /compress (#57029) collides with legacy /compact TUI entry in commands.catalog

3 participants