hermes-agent/tui_gateway
alelpoan 820a8083d4
fix(desktop): Branch in new chat drops the question and loses the branched session on restart (#71960)
* fix: Branch in new chat loses the question and the branched session (#issue)

- session.branch on the backend now accepts a count param to truncate
  the parent history to the clicked message, instead of always forking
  the entire transcript. Also returns stored_session_id/messages/info
  so the frontend has parity with session.create's response shape.
- branchCurrentSession (open live chat) now slices history from 0
  instead of from the clicked message index, so the question preceding
  an assistant reply is no longer dropped when branching.
- forkBranch now calls session.branch (not session.create) when
  branching an open live chat, since session.create only persists a DB
  row lazily on first prompt - a branched chat that nobody types into
  never got saved, and vanished as 'session not found' on the next
  app restart. branchStoredSession (branching from the sidebar, no
  live runtime) keeps using session.create as before.

* test: cover session.branch count truncation and open-chat branching

- backend: assert session.branch with a count param only persists the
  first N messages of the live history to the new session.
- frontend: BranchHarness now exposes branchCurrentSession; assert
  branching an open chat from a middle message calls session.branch
  with the parent session id and the correct trimmed count, instead of
  session.create.
2026-07-27 10:45:00 -04:00
..
__init__.py feat: new tui based on ink 2026-04-02 19:07:53 -05:00
_stdin_recovery.py fix: Windows guard, dedup recovery, profile-safe paths, clear SO_RCVTIMEO 2026-07-20 12:48:50 +05:30
compute_host.py fix(tui_gateway): scope secrets and MCP discovery to the active profile (#67605) 2026-07-26 16:19:52 -07:00
entry.py fix(mcp): propagate profile HERMES_HOME override into shared discovery owner; restore stdio startup + WSTransport tests 2026-07-26 14:14:03 -07:00
event_publisher.py chore: address copilot comments 2026-04-24 12:51:04 -04:00
git_probe.py fix(windows): share one bounded, tree-killing git probe across both call sites (#68997) 2026-07-21 20:18:43 -05:00
host_supervisor.py fix(windows): widen utf-8 subprocess decode guard to sibling desktop-backend sites 2026-07-24 09:48:28 -07:00
loop_noise.py fix(tui_gateway): suppress WS peer-hangup teardown error flood (#50005) (#54126) 2026-06-28 02:35:01 -07:00
project_tree.py fix(projects): don't promote a deleted workspace to a project 2026-07-26 00:57:17 -05:00
render.py tui: inherit Python-side rendering via gateway bridge 2026-04-05 18:50:41 -05:00
server.py fix(desktop): Branch in new chat drops the question and loses the branched session on restart (#71960) 2026-07-27 10:45:00 -04:00
slash_worker.py fix: Windows guard, dedup recovery, profile-safe paths, clear SO_RCVTIMEO 2026-07-20 12:48:50 +05:30
synthetic_turn.py feat(dashboard): isolate turns in compute host (#65895) 2026-07-16 15:24:03 -04:00
transport.py fix(tui-gateway): harden stdio transport against half-closed pipes + SIGTERM races (#17118) 2026-04-28 17:54:06 -05:00
turn_marker.py feat(desktop): crash-survivable in-flight turn journal 2026-07-24 23:31:55 -05:00
ws.py fix(tui-gateway): scope MCP discovery to active profile 2026-07-26 14:14:03 -07:00