Skip to content

feat(desktop): add live tasks sidebar view - #57004

Open
tomscherrer wants to merge 1 commit into
NousResearch:mainfrom
tomscherrer:feat/live-tasks-sidebar
Open

feat(desktop): add live tasks sidebar view#57004
tomscherrer wants to merge 1 commit into
NousResearch:mainfrom
tomscherrer:feat/live-tasks-sidebar

Conversation

@tomscherrer

Copy link
Copy Markdown

Summary

  • add a new Live tasks entry to the Hermes Desktop left sidebar
  • wire a /tasks route into the desktop router and lazy-load the new page
  • surface live todo, session, and subagent state in a dedicated dashboard

Testing

  • npm run typecheck
  • npx eslint src/app/tasks/index.tsx src/app/routes.ts src/app/types.ts src/app/chat/sidebar/index.tsx src/app/desktop-controller.tsx src/i18n/en.ts
  • npm run build

@alt-glitch alt-glitch added type/feature New feature or request comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have labels Jul 2, 2026
@tomscherrer

Copy link
Copy Markdown
Author

Follow-up fix pushed for the review findings.

What changed:

  • normalized Live Tasks aggregation onto stored session IDs when runtime→stored mapping is known
  • kept runtime IDs only for live todo/subagent lookups
  • stopped routing "Open session" through raw runtime IDs
  • fixed recency sorting to use consistent millisecond timestamps instead of mixing last_active seconds with Date.now()

Re-verified:

  • npm run typecheck
  • npx eslint src/app/tasks/index.tsx src/store/session.ts src/app/session/hooks/use-session-state-cache.ts
  • npm run build

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the Live Tasks view and for the follow-up identity normalization. The feature is not already present on current main: apps/desktop/src/app/routes.ts:10-53 provides /agents but no /tasks route.

Problems

  • apps/desktop/src/app/tasks/index.tsx:205-209 aggregates every key in the runtime todo/subagent stores. Current apps/desktop/src/store/gateway-switch.ts:39-55 clears session lists and foreground state on a soft gateway switch, but does not clear those runtime stores or the new mapping introduced in apps/desktop/src/store/session.ts:231. A previous gateway's live rows can therefore be rendered after re-home.
  • The PR adds the aggregation and mapping without tests; no changed PR file is a test/spec file. Please cover identity normalization and gateway-switch isolation.

Suggested changes

  • Reset or scope the mapping plus todo/subagent live state at the same gateway/profile boundary used by wipeSessionListsForGatewaySwitch().
  • Add focused aggregation tests for mapped and unmapped runtime ids, plus the reset path.

Automated hermes-sweeper review.

Comment thread apps/desktop/src/app/tasks/index.tsx Outdated

const storedIdByRuntimeSessionId = new Map(Object.entries(runtimeIdByStoredSessionId).map(([storedId, runtimeId]) => [runtimeId, storedId]))

const sessionIds = new Set<string>([

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This aggregates every runtime todo/subagent entry, but the soft gateway reset in store/gateway-switch.ts currently clears neither those stores nor the new stored→runtime mapping. Please scope or clear all three at the re-home boundary so a task from the prior gateway/profile cannot appear here.

@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state 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 15, 2026
@tomscherrer
tomscherrer force-pushed the feat/live-tasks-sidebar branch from 989d808 to 56c3957 Compare July 18, 2026 20:58
@tomscherrer

Copy link
Copy Markdown
Author

Implemented the requested follow-up and force-updated this PR onto current main.

Key changes:

  • Live Tasks now uses the current $sessionStates stored/runtime identity source, preserving mapped runtime IDs and unmapped-runtime fallback behavior.
  • Gateway/profile switches clear session projections, hook-owned runtime mappings, todos and their timers, subagents, watchdogs, and settle state.
  • A generation guard prevents in-flight resume/create/branch/hydration work from repopulating state after a gateway reset.
  • Multi-runtime snapshots are merged by durable session identity, deduplicating todos/subagents and canonicalizing compressed lineage continuations.
  • /tasks is registered for both the main surface and split-pane route rendering.

Regression coverage now includes mapped and unmapped runtime IDs, runtime-only busy/attention state, overlapping runtimes, lineage continuations, stale async completion after reset, cache cleanup, gateway-switch cleanup, and split-pane routing.

Fresh verification on the updated branch:

  • 220 test files passed
  • 1,849 tests passed, 1 skipped
  • TypeScript typecheck passed
  • Desktop packaging tests passed
  • Production build and macOS DMG passed
  • ESLint: 0 errors (10 unrelated existing warnings)
  • git diff --check passed

Ready for re-review.

@tomscherrer
tomscherrer force-pushed the feat/live-tasks-sidebar branch from 56c3957 to 1768be7 Compare July 18, 2026 21:47
@tomscherrer

Copy link
Copy Markdown
Author

Resolved the two reported conflicts by rebasing onto current upstream main and preserving both sides of the newer resume-session changes:

  • use-session-actions/index.ts: retained upstream's selected-session transcript reconciliation/activation behavior and integrated the gateway-generation invalidation guards, including the warm-cache activation update.
  • use-session-actions.test.tsx: retained upstream's selected-session/on-state-update harness additions and integrated the stale-generation test override.

Fresh post-rebase verification:

  • 231 test files passed
  • 1,965 tests passed, 2 skipped
  • TypeScript typecheck passed
  • Desktop packaging tests passed
  • Production build and macOS DMG passed
  • ESLint: 0 errors
  • git diff --check passed

GitHub now reports the PR as mergeable (mergeable: true); the remaining blocked state is not a merge conflict.

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/*) 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