Skip to content

feat(desktop): keep Current Plan visible after turns - #75665

Open
TheDuggieB wants to merge 2 commits into
NousResearch:mainfrom
TheDuggieB:feat/desktop-current-plan
Open

feat(desktop): keep Current Plan visible after turns#75665
TheDuggieB wants to merge 2 commits into
NousResearch:mainfrom
TheDuggieB:feat/desktop-current-plan

Conversation

@TheDuggieB

Copy link
Copy Markdown

Problem

Hermes Desktop's live todo checklist disappears after a turn settles. The transcript still contains the todo tool result, but the Desktop does not project that durable history back into the chat. Users can therefore lose the reviewed plan, confuse a stale in_progress item with live execution, or miss that a newer turn superseded the last plan.

Architecture

  • Add a read-only CurrentPlanSurface above the settled transcript.
  • Derive the latest plan from hydrated chat history, not from the transient todo nanostore.
  • Gate the routed surface on route, selected-session, and runtime identity agreement.
  • Suppress the persisted surface while a live turn or transient todo panel owns checklist presentation.
  • Keep the source commit intact and integrate current upstream main with a signed merge commit.

Persistence and lifecycle behavior

  • Persist exact todo provenance by carrying the stored tool-result timestamp onto matched hydrated todo parts.
  • Require an authoritative persisted result and timestamp before history can become a Current Plan.
  • Match local and persisted todo results by toolCallId; compacted, interrupted, and terminal-error turns refresh persisted todo provenance while preserving local scrollback.
  • Reject malformed persisted snapshots and scalar fields, then continue to the most recent valid snapshot.
  • Treat a newer strictly valid result awaiting persisted provenance as a barrier, so delayed or failed hydration cannot reveal an older plan.
  • Classify plans as active, paused, completed, superseded, or historical from explicit runtime and transcript state. A stale in_progress item never implies liveness by itself.
  • Mark a plan superseded when a newer visible user turn has no later persisted todo result.
  • Clear transient todo state at terminal lifecycle boundaries without restoring the persisted projection into the live todo store; an explicit empty live result suppresses stale persisted history.

Accessibility and localization

  • Use a native button with aria-expanded and aria-controls for disclosure.
  • Preserve a visible keyboard-focus cue with the established active-control background and foreground tokens even though global CSS suppresses focus rings.
  • Expose the section and checklist with localized accessible labels.
  • Keep status text visible rather than encoding state by color or icon alone.
  • Bound expanded content to the viewport and give the checklist its own vertical scroll region.
  • Add typed Current Plan copy for English, Arabic, Japanese, Simplified Chinese, and Traditional Chinese.

Tests

Validated on Node v22.23.2 after integrating current upstream main:

  • Direct Current Plan, persisted parsing/provenance, cancellation, standalone-error, accessibility, and streaming regression suite: 107 passed.
  • Full Desktop UI suite: 361 files, 3,217 tests passed.
  • Desktop TypeScript type-check: passed.
  • Desktop ESLint: passed with zero errors; 75 pre-existing/upstream warnings remain.
  • Desktop production build: passed.
  • Exact-current independent review: passed.

Upstream and concurrent-work assessment

Rollback and scope boundaries

Rollback is a normal revert of the integration commit and feature commit. The change is renderer/history projection and hydration metadata only. It does not install or deploy Desktop, restart Hermes services, modify a live Kanban/SalesOS board, change production configuration, write to Salesforce, or add external delivery behavior. This PR must not be merged as part of this handoff.

Preserve the reviewed Current Plan surface while integrating current
upstream Desktop changes. Harden route identity and persisted todo
hydration for malformed snapshots, cancellation, explicit clears,
terminal-error completion, and visible keyboard focus.
@TheDuggieB TheDuggieB changed the title Feat/desktop current plan feat(desktop): keep Current Plan visible after turns Jul 31, 2026
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state needs-decision Awaiting maintainer decision before any implementation labels Jul 31, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Desktop contribution. The premise is confirmed on current main: apps/desktop/src/store/todos.ts:45-59 removes settled live todos after the four-second linger, while apps/desktop/src/app/contrib/wiring.tsx:337-342 only restores that transient composer state. Current ChatView has no persisted plan projection.

The reviewed diff keeps the new surface renderer-local, derives it from hydrated transcript history, attaches persisted todo provenance by exact tool-call identity, and gates the primary routed surface on durable/runtime identity. I found no specific correctness defect in the reviewed changes. Current GitHub main e444d165807f489b5c1ab8e4a612c8d09c2e67a2 has no intervening edits in the modified production paths relative to the PR base, so salvage should be mostly mechanical.

Automated hermes-sweeper review.

@teknium1 teknium1 added 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 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have 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/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants