Skip to content

fix(tui): improve resume ordering and input responsiveness - #48095

Open
mongoAI wants to merge 3 commits into
NousResearch:mainfrom
mongoAI:fix/resume-recent-close-order
Open

fix(tui): improve resume ordering and input responsiveness#48095
mongoAI wants to merge 3 commits into
NousResearch:mainfrom
mongoAI:fix/resume-recent-close-order

Conversation

@mongoAI

@mongoAI mongoAI commented Jun 17, 2026

Copy link
Copy Markdown

Summary

  • Sort resumable sessions by recent close/last-active time so /resume shows the right recent chat first.
  • Default busy input to queued messages and add explicit double-Escape interruption plus /queue clear/rm controls.
  • Disable tmux fast-echo by default unless explicitly opted in, reducing stale composer letters.
  • Improve TUI rendering cleanup, status/input layout, skin input colors, code block/syntax colors.
  • Fail open when compression lock storage errors so sessions do not become permanently uncompressible.

Test Plan

  • uv run pytest tests/test_hermes_state_compression_locks.py tests/test_hermes_state.py tests/gateway/test_session_list_allowed_sources.py -q
  • npm test -- --run src/tests/createSlashHandler.test.ts src/tests/syntax.test.ts src/tests/textInputFastEcho.test.ts src/tests/activeSessionSwitcher.test.ts
  • npm test
  • npm run typecheck
  • npm run build

@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists labels Jun 17, 2026

@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 the broad TUI usability pass. Current main has independently landed several parts of this work, but one storage change is unsafe and the remaining pieces need selective salvage.

Problems

  • hermes_state.py:1438 changes a failed SQLite lock acquisition into success. The compressor’s current invariant is that competing compression can fork session lineage (agent/conversation_compression.py:518-539). Current main now distinguishes an absent compatibility API from an implemented-but-broken lock API and fails closed for the latter (commit 2627933f337b8dfb4913caf9b596d72c6de22b93).
  • The PR's global queue default conflicts with the current intentional surface split: TUI defaults to queue, while classic CLI retains interrupt (ui-tui/src/app/useConfigSync.ts:32-39; cli.py:463).

Suggested changes

  • Keep lock failures fail-closed; only the explicit stale-runtime API-absence compatibility case may proceed unlocked.
  • Salvage remaining queue controls/recent-close display onto current TUI code. Current main already has compression-tip-aware last-active ordering (hermes_state.py:3347-3452) and tmux fast-echo protection (ab8f06381).

Automated hermes-sweeper review.

Comment thread hermes_state.py
# still otherwise usable), proceed without the lock. This risks a
# rare concurrent-compression fork, but a permanently uncompressible
# session is worse.
return True

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.

Returning success here claims the caller owns a lock that the failed SQLite transaction never created. That permits concurrent compression—the lineage-fork case the lock is meant to prevent—and starts lease refresh/release work for a nonexistent row. Keep implemented lock-storage failures fail-closed; only a structurally absent compatibility API should proceed unlocked.

@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state 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 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard 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 sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants