Repository navigation
feat(hermes): choose which Telegram thread a Hermes pane follows - #1521
Merged
Juliusolsson05 merged 6 commits intoOct 15, 2026
Merged
Conversation
Refs #1501 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change Telegram Thread… lists every messaging thread on the pane's server (plain DM, DM topics, groups) plus a separate chat, and reopens the pane on the choice. replaceSession gains a three-state hermesLaneKey because its carry re-applied the old pane's key after the caller's options, and now spawns the kind it records instead of defaulting a kind-less call to Claude. Refs #1501 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #1521: the picker closes before the swap runs, so a rejected or uncommitted replaceSession was an unhandled rejection or silence and the pane quietly stayed on the old thread. It now toasts a fixed sentence on the pane. Also: the current-thread row no longer claims the thread is gone while the listing is loading or failed, and the picker closes if its pane disappears. Refs #1501 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #1501 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Final disposition (merging via batch/hermes-gaps-2026-10-15, owner-approved 2026-10-15). Head |
Juliusolsson05
changed the base branch from
main
to
batch/hermes-gaps-2026-10-15
October 15, 2026 00:35
…to feat/hermes-thread-picker # Conflicts: # src/main/hermes/service.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A new Hermes pane follows the connection's plain Telegram DM (the default lane, #1496). DM topics and groups are separate lanes with their own routing keys. The recorded T8 has
agent:main:telegram:dm:111and…:111:7. Until now there was no way to point a pane at a different thread, or to turn a thread pane into a desktop-only chat.What it does
SessionMeta.hermesLaneKeyand survives Reload Agent.HermesConnectionService.listLanes(id)→HermesLaneListing(it never throws; a failure comes back as a value). IPChermes:list-lanes, preloadhermesListLanes. Routing keys and display names reach the renderer; stored conversation ids (headId) stay in main.Design notes
replaceSessiontakeshermesLaneKey?: string | null. A string follows that thread,nullmakes a separate chat, and omitting it keeps the pane's current thread. A plain pass-through did not work: the carry re-applied the OLD pane's key after the caller's options, so the picker reopened the thread the user was leaving.replaceSessionnow spawnsnextKind, the kind it records the successor as. Before, a caller that omittedkindlaunched the default provider (Claude) into a pane whose metadata still said Hermes. Every caller happened to passkind, so the bug was latent.Direct chat topic 7 · Tester). In T8 both lanes carry the same display name.Tests
All tests use real recorded data: the hermes-headless corpus T8, v0.22.0.
hermesLaneReplacement.renderer.test.tsx: without a choice, the pane keeps its thread; a chosen thread wins over the carry;nullgives a separate chat and never looks the default thread up. Fail-first verified: reverting the override turns 2 tests red, and reverting thenextKindspawn turns all 3 red.hermesThreadChoices.test.ts: the two "Tester" lanes get distinct labels, the current row is marked, Separate chat is current when the pane follows no thread, and a followed thread missing from the listing is kept. The missing-thread case uses a mechanical mutation of T8, labelled as such.hermesCredentials.test.ts:listLaneson the recorded REST body has noheadId; a 502 comes back as{ok:false}and does not raise the "new pane opened as a separate chat" flag.npm run typecheckis clean.Verification boundary
The app was not launched (standing rule). The picker's rendering and a live thread swap against a real Hermes are not exercised here.
Fixes #1501
🤖 Generated with Claude Code