feat(sessions): session activity trail — objects a run opened, with live status (v0.221.0)#368
Merged
Merged
Conversation
…ith live status (v0.221.0)
The per-session activity panel now answers "what is this session doing/done?",
not just "which primitives did it touch".
- Coverage: the classifier (src/state/session-activity.ts) gains secrets/skills/
policy categories, so secret.put/get/requested, skill.proposed/requested and
policy.proposed surface as first-class entries instead of falling to 'other'.
- Live status: each object-bearing entry carries an ActivityTarget {kind,id};
the /api/sessions/:id/activity route resolves that target's CURRENT state from
its live store (task todo→doing→done, KB rev N, secret stored, proposal card
pending→approved/rejected) and returns status/statusTone.
- UI: SessionActivity is now a right-docked side panel with an Objects | Timeline
toggle; Objects collapses to one row per live object (outstanding first) with a
status chip; polls while the run is alive so status updates in place.
Audit stays the single spine — no new tables, no migration; adding a plane is one
classifier case + one resolver. Verified end-to-end via scripts/session-trail-test.cjs
(13/13, real in-process HTTP server) and governance suite (68/68).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fS9mHadnGxa2VKhEKn7a7
This was referenced Jul 16, 2026
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.
What
Turns the per-session activity panel into a clear trail of everything a session opened, with each object's live status — so you can track what a run is doing/done at a glance. Phase 1 of the design discussed with @vikasprogrammer.
The insight: every agent side effect already flows through the gateway into
audit_eventstagged with the session id, so the trail is a projection over data we already have — no new tables, no migration. The only thing audit alone can't give is current status (task.created≠ "task is now done"), so the route joins each entry back to its live object.Changes
src/state/session-activity.tsgainssecrets/skills/policycategories.secret.put/secret.get/secret.requested,skill.proposed/skill.requested, andpolicy.proposednow surface as first-class trail entries instead of falling intoother.ActivityTarget {kind,id}.GET /api/sessions/:id/activityresolves that target's current state from its live store and returnsstatus+statusTone:todo/doing/done/blocked· KB page →rev N· secret →stored· approval/proposal card →pending→approved/rejectedmessagesonce.SessionActivitybecomes a right-docked side panel with an Objects | Timeline toggle. Objects collapses the trail to one row per live object (outstanding — open/blocked — first) with a status chip; Timeline is the full chronological feed. Polls while the run is alive, so a task'sdoing→doneupdates in place.Adding a new plane later = one classifier case + one resolver branch. (Phase 2 — optional
created_by_sessioncolumns on KB/secrets/goals for cross-session queries — is deferred.)Verification
scripts/session-trail-test.cjs— boots a real in-process HTTP server + registry, seeds one session's audit stream + the live objects, hits the endpoint and asserts both coverage and resolved statuses: 13/13 pass.npm run typecheckclean ·cd web && npm run buildclean ·npm run test:governance68/68.🤖 Generated with Claude Code
https://claude.ai/code/session_014fS9mHadnGxa2VKhEKn7a7