Skip to content

Match LangGraph session totals and show pending interrupts - #606

Open
jamby77 wants to merge 2 commits into
masterfrom
session-explorer/langgraph-totals-and-interrupts
Open

jamby77 wants to merge 2 commits into
masterfrom
session-explorer/langgraph-totals-and-interrupts

Conversation

@jamby77

@jamby77 jamby77 commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #595

Changes

  • SessionDetail gains totalKeys and totalMemoryBytes. When a preset reads only some keys (agent-cache reads the newest checkpoint and its writes), the service runs MEMORY USAGE on the skipped keys so the totals match the list row.
  • Detail header shows the session totals, plus showing latest checkpoint (N keys · X) when keys were skipped.
  • agent-cache parses __interrupt__ writes of the newest checkpoint into interrupt entries that end the timeline. The web shows them as a "Waiting for input" card.
  • Seed script and captured fixture expectations include the interrupt.

Test plan

  • API jest src/session-explorer (365 pass): measureKeys routing/unmeasured/empty, service totals with and without skipped keys, interrupt ordering and non-string values, fixture pending-write
  • Web vitest session-explorer + page (62 pass): totals header, no checkpoint label when nothing skipped, interrupt entry
  • tsc api + web; eslint on changed sources
  • Not checked in the browser against the agent-cache seed

Note

Medium Risk
Adds cluster MEMORY USAGE calls on session load when keys are skipped, and extends agent-cache merge/parse behavior; scope is session-explorer only but touches shared SessionDetail types.

Overview
Session detail now reports whole-session key count and memory even when a preset only loads a subset (e.g. agent-cache’s latest checkpoint). Skipped keys are sized via a new measureKeys helper (MEMORY USAGE on cluster primaries); the UI header uses totalMemoryBytes / totalKeys and adds a “showing latest checkpoint …” line when skippedKeys is non-zero.

The agent-cache preset treats __interrupt__ pending writes like messages: they are parsed into interrupt timeline entries (after pending messages on the newest checkpoint). The timeline renders those as “Waiting for input” cards. Seeds and fixture expectations include a sample interrupt.

Reviewed by Cursor Bugbot for commit daffc0f. Bugbot is set up for automated code reviews on this repo. Configure here.

- Report totalKeys and totalMemoryBytes on session detail, measuring
  the keys the preset skips so the header matches the list
- Label the read part as the latest checkpoint when keys were skipped
- Parse __interrupt__ writes of the newest checkpoint and end the
  timeline with a "Waiting for input" entry

Closes #595
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: be4e86e2-2298-4167-9ec3-c540ff992d16
Commits

Reviewing files that changed from the base of the PR and between 60d4ddf and daffc0f.

Files selected for processing: 13
  • apps/api/src/session-explorer/__tests__/presets.spec.ts
  • apps/api/src/session-explorer/__tests__/session-explorer.service.spec.ts
  • apps/api/src/session-explorer/__tests__/session-scanner.spec.ts
  • apps/api/src/session-explorer/presets/agent-cache.ts
  • apps/api/src/session-explorer/session-explorer.service.ts
  • apps/api/src/session-explorer/session-scanner.ts
  • apps/api/test/fixtures/session-explorer/agent-cache@0.12.0.json
  • apps/web/src/components/pages/session-explorer/MessageTimeline.tsx
  • apps/web/src/components/pages/session-explorer/SessionDetailPanel.tsx
  • apps/web/src/components/pages/session-explorer/__tests__/SessionDetailPanel.test.tsx
  • apps/web/src/components/pages/session-explorer/__tests__/fixtures.ts
  • packages/shared/src/types/session-explorer.types.ts
  • scripts/session-fixtures/seed-agent-cache.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 808a772. Configure here.

- Add skippedKeys to SessionDetail, set from the preset's unselected keys
- Show the checkpoint note only when skippedKeys > 0, so missing,
  truncated or failed-node reads no longer trigger it
@jamby77
jamby77 requested a review from KIvanow October 28, 2026 20:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session Explorer: LangGraph sessions disagree between list and detail, and pending interrupts aren't shown

1 participant