fix(session): auto-resume persisted sessions on /session/:id deep links #3
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!3
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/t-58"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After a server restart, opening
/session/<id>directly showed "Session not found" because WSsubscribeonly attached to live sessions.subscribenow resumes a persisted, non-live session via a newensureSessionLiveon the bridge. Resume is single-flight per id. Archived non-live sessions are refused rather than reopened, and error frames carry acode(session_not_found/resume_failed/session_archived).SessionViewuses it to show a loading state, "Session not found", "Failed to resume" with Retry, or "This session is archived" with "Unarchive & open". Sidebar and SessionPicker persisted rows now only navigate, and theresumeFromPathcreate-session path is removed from protocol, route and store.Decisions
selectSession(id)(which now clears the stored error) instead of adding a separateretrySubscribe; theerrorhandler already drops the id fromsubscribed, soselectSessionre-sends the subscribe.unarchiveSessionnow rethrows on failure instead of logging and returning. "Unarchive & open" shows the failure inline, and the Sidebar's existing unarchivealertnow actually fires.subscribefor the same id from one connection while a resume is in flight is ignored; the first one answers. If the client unsubscribes or the socket closes mid-resume, the subscribe is dropped, but the resume itself still completes and the session stays live.errorframe'scodeis only set onsubscribefailures; the othergetSession-gated handlers keep replyingsession not activewith no code.docs/architecture.mddoesn't describe the subscribe contract or resume, so it is unchanged.Verification
bun run typecheck(protocol, server, web): pass.bun test apps/server/src/bridge/ensure-live.test.ts apps/web/src/lib/subscribe-state.test.ts: 11 pass, 0 fail.subscribedwith the transcript, and the server logged exactly oneresumed session ….errorwithcode: session_not_found.session_archived; afterPOST /unarchive, re-subscribing →subscribed.unsubscribed, nosubscribed.subscribed.resume_failed: the SDK falls back to the launch cwd for a missing or non-directory cwd, so no natural input made resume fail. This path is covered by the unit test only.@ -57,6 +57,7 @@ All notable changes to omp-deck. The format is loosely based on- Processed inbox items open correctly via direct URL even when "Show processed" is off.- Direct-linking to an inbox item or task that doesn't exist shows an inline "not found" message instead of a blank or silently empty pane.- Opening a task in chat now navigates to the newly created session instead of the root chat page.- Opening `/session/<id>` directly (bookmark, shared link, reload) after a server restart now resumes the persisted session instead of showing "Session not found". The page shows a loading state while it resumes, "Failed to resume" with a Retry button when resuming errors, and for archived sessions an "Unarchive & open" button — archived sessions are never reopened implicitly. Opening the same link in several tabs at once resumes it only once. Clicking a persisted session in the sidebar or session picker now simply navigates to its URL.This is quite verbose. Are you sure it adheres to the
conventions/KB?You're right, it didn't:
conventions/changelog.mdasks for entries proportional to the change, with a fix stated in one concise line, and it also listed the sidebar/picker navigation change, which isn't user-relevant. Shortened inef6356fto:a1ed256668to0066b5fa48