Skip to content

fix(desktop): refresh sidebar after auto-title - #48136

Closed
tt-a1i wants to merge 1 commit into
NousResearch:mainfrom
tt-a1i:codex/desktop-auto-title-refresh
Closed

fix(desktop): refresh sidebar after auto-title#48136
tt-a1i wants to merge 1 commit into
NousResearch:mainfrom
tt-a1i:codex/desktop-auto-title-refresh

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • emit a title-specific TUI gateway event after async auto-title generation persists a title
  • patch Desktop sidebar session rows by runtime id, stored id, or compression lineage, then refresh/broadcast the session list
  • only fire auto-title callbacks after set_session_title() confirms the title was stored

Fixes #47926. Related to #44810, but that backend-only PR emits session.info; the current Desktop sidebar does not patch title rows from that event, and _session_info() does not carry the title.

Testing

  • $HOME/.hermes/hermes-agent/venv/bin/python -m pytest tests/agent/test_title_generator.py
  • $HOME/.hermes/hermes-agent/venv/bin/python -m pytest tests/agent/test_title_generator.py tests/test_tui_gateway_server.py -k "title_callback or auto_title or session_title"
  • npm --workspace apps/desktop run typecheck
  • npm --workspace apps/desktop run test:ui -- src/store/session.test.ts -t applySessionTitleUpdate
  • npm --workspace apps/desktop exec eslint -- --quiet src/store/session.ts src/store/session.test.ts src/app/session/hooks/use-message-stream.ts src/lib/chat-messages.ts
  • git diff --check

Note: running the full src/store/session.test.ts file in this local jsdom setup still fails in pre-existing workspaceCwdForNewSession tests because window.localStorage is unavailable; the new applySessionTitleUpdate focused tests pass.

@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/gateway Gateway runner, session dispatch, delivery comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have labels Jun 18, 2026
@alt-glitch alt-glitch added comp/desktop Electron desktop app (apps/desktop/*) and removed comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 26, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Desktop/TUI investigation. An automated hermes-sweeper review found the reported sidebar-refresh behavior is already implemented on current main.

  • tui_gateway/server.py:9259-9271 supplies maybe_auto_title() a callback that emits session.title with the stored session id and generated title; this path was introduced in 4e023f5bc990ac430d38a220c74162bbe92293f9.
  • apps/desktop/src/app/session/hooks/use-message-stream/gateway-event.ts:358-367 consumes session.title and updates the matching sidebar row by durable id or compression lineage.
  • This implementation is on main and is contained in release v2026.7.1.
  • The linked issue Desktop sidebar does not refresh after async auto-title generation #47926 was already closed with the same current-main evidence.

Thank you for identifying the event-and-row-reconciliation path.

@teknium1 teknium1 closed this Jul 14, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/desktop Electron desktop app (apps/desktop/*) comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop sidebar does not refresh after async auto-title generation

3 participants