fix: dashboard session lifecycle — filter exited, distinguish agents, fix ordering - #112
Merged
Conversation
… fix ordering - Filter exited sessions from AGENTS sidebar (fetchSessions rejects status=exited so broken terminals with reconnect loops are never created) - Enrich project sessions with autonomOS metadata (isAutonomosAgent, autonomosStatus, template) via GET /api/projects cross-referencing persisted sessions - Visual distinction in Projects sidebar: gray dot + "exited" label for exited autonomOS agents, template name in metadata row - Resume exited autonomOS agents via POST /api/sessions/:id/resume (re-resolves template and restores full config) instead of bare resume - Surface server error details in resume failure status instead of generic "failed to resume session" - Fix paneOrder remap in remapSessionIds — keys are raw claudeSessionId (no "session:" prefix), so the old prefix-stripping was dead code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
PR #110 shipped "persist exited sessions" —
GET /api/sessionsnow returns exited sessions alongside live ones. The dashboard didn't handle this properly, causing three bugs:POST /api/sessionswithout template/configremapSessionIdsused a"session:"prefix that paneOrder keys never hadChanges
Bug 1: Filter exited sessions from AGENTS sidebar
fetchSessions()now filtersstatus === "exited"so they never enterstate.sessionsBug 2: Distinguish autonomOS agents in Projects section
projects.ts): Cross-referencesGET /api/projectssessions withgetPersistedSessions()to enrich withisAutonomosAgent,autonomosStatus,template,manager,projectSidebar.tsx): Exited agents show gray dot + "exited" label; template name in metadata rowstore.ts): Exited autonomOS agents resume viaPOST /api/sessions/:id/resume(re-resolves template, restores full config) instead of bare session creationBug 3: Fix agent ordering after restart
remapSessionIdspaneOrder remap was dead code — looked for"session:"prefix butsessionOrderKey()returns rawclaudeSessionId. Fixed to match actual key format.Test plan
~/.autonomos/sessions.json/resumeendpoint🤖 Generated with Claude Code