fix(desktop): open active bot sessions from Active now - #90772
okazakijiso-creator wants to merge 1 commit into
Conversation
Review of "fix(desktop): open active bot sessions from Active now". Right fix for a real routing bug: chips now open the human-facing session that produced the activity signal (resolved lineage tip honored), fall back to the canonical chat when there is no live human session or it is definitively gone, and deliberately surface transient hydration failures instead of dumping the user in Home. Error triage in
No blocking issues found. |
|
Closing as wrong-direction after the Bot Mode identity change in #92129 — with credit: the inconsistency you observed (chip advertises one session, click opens another) was real on the code you built against. Two things changed underneath this PR:
The remaining divergence — activity in a visible scratch session steering the chip away from the forever-chat — is the exact preference the project explicitly rejected (#91791 → #92042, now codified in AGENTS.md: recency and "where the user left off" are never the bot target's authority). Scratch sessions stay reachable in the Sessions sidebar by design; every bot entry point lands in the forever-chat. Appreciate the careful test coverage and the honest writeup of #90167's history — the observation was right, the architecture just moved out from under the fix. |
What does this PR do?
The Desktop Bots pane marks a bot as Active now from recent human-session, busy-turn, or worker activity, but the chip's click handler still routes through
openBotCanonicalChat. When recent human activity belongs to a different session, clicking the chip can open or create the canonical Bot Chat/Home draft instead of the session that caused the activity indicator.This change opens the exact recent human-facing activity session first, using its resolved lineage tip when available. Worker-only and busy-only activity do not reuse stale human history; they keep the canonical-chat path. The canonical path is also retained when the stored activity ID is definitively gone. Hydration/time-out failures still surface instead of silently navigating to the wrong chat. Ordinary roster-row clicks remain unchanged and continue to open the canonical Bot Chat.
Related Issue
No linked issue. Related prior PR: #90167. That PR was withdrawn after assuming the canonical opener was equivalent, but current
mainat645f85c2fdaeacf0bcd6c91648320a8040e2a1d7still sends the Active now chip through the canonical path.Type of Change
Changes Made
apps/desktop/src/plugins/hermes-bots/plugin.jsresolved_idover the durable root ID after lineage rotation.Session not found.apps/desktop/src/plugins/hermes-bots/tests/active-now-session.test.mjsapps/desktop/src/plugins/hermes-bots/tests/active-now-strip.test.mjsHow to Test
apps/desktop:Verified results:
git diff --check: passedChecklist
Code
fix(scope):,feat(scope):, etc.)pytestis N/A for this Desktop JavaScript plugin-only change; applicable Desktop checks are listed aboveDocumentation & Housekeeping
cli-config.yaml.example: N/A — no configuration keys changedCONTRIBUTING.md/AGENTS.md: N/A — no architecture or contributor workflow changedScreenshots / Logs
Not applicable; this changes navigation behavior rather than visual styling, and the behavior is covered by focused plugin tests.