Skip to content

fix(desktop): register /compress in TUI gateway command.dispatch (salvage #60644) - #60921

Merged
teknium1 merged 2 commits into
mainfrom
salvage-60644
Jul 8, 2026
Merged

teknium1 merged 2 commits into
mainfrom
salvage-60644

Conversation

@teknium1

@teknium1 teknium1 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Salvage of #60644 by @kyssta-exe — the Desktop app can now invoke /compress: the TUI gateway's command.dispatch gains a compress/compact handler. Fixes #60603 ("/compress · error").

Root cause: Desktop routes /compress via slash.exec → fallback command.dispatch, which had no handler and fell to error 4018; no desktop-side path called the existing session.compress RPC.

Changes

  • tui_gateway/server.py: compress/compact handler in command.dispatch mirroring the session.compress RPC — delegates to the shared _compress_session_history pipeline with busy guard, session.info emit, and _sync_session_key_after_compress (compression rotates the SessionDB session id)
  • Follow-up (ours): compress/compact added to _PENDING_INPUT_COMMANDS so clients that fail the slash.exec→dispatch fallback still route correctly — ported from the author's own fix(tui): route /compress through command.dispatch with server-side compression #60834 before closing it

Validation

Result
scripts/run_tests.sh tests/tui_gateway/ pass
Premise verified on main dispatch fell to _err(4018, ...), exactly the #60603 error

Contributor commit cherry-picked (re-attributed from the generic "Hermes Agent" committer identity to @kyssta-exe); rebase-merge to preserve authorship.

Infographic

desktop-compress

kyssta-exe and others added 2 commits July 8, 2026 06:31
…nd.dispatch

Ported from #60834 (same author) — pending-input routing so clients that
fail the slash.exec->dispatch fallback still reach the new compress handler.
@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/desktop Electron desktop app (apps/desktop/*) sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state P2 Medium — degraded but workaround exists labels Jul 8, 2026
@teknium1
teknium1 merged commit 7e3986a into main Jul 8, 2026
31 checks passed
@teknium1
teknium1 deleted the salvage-60644 branch July 8, 2026 14:46

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review Summary

Verdict: Comment (68 additions — register /compress in TUI gateway command.dispatch)

Scope

Registers the /compress command in the TUI gateway command dispatcher. Salvage of #60644.

Observations

  • Small feature addition.
  • Salvage PR referencing #60644.
  • No obvious concerns.

Recommendation

Small scope. Human reviewer should confirm the salvage relationship and that the dispatch registration is correct.


Reviewed by Hermes Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

4 participants