Skip to content

feat: prepare exited session context in another root - #95

Closed
johnnyhuy wants to merge 1 commit into
mainfrom
ao/continue-building-pidex-3/agent/issue-94-exited-handoff
Closed

johnnyhuy wants to merge 1 commit into
mainfrom
ao/continue-building-pidex-3/agent/issue-94-exited-handoff

Conversation

@johnnyhuy

@johnnyhuy johnnyhuy commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Exited tabs now offer Continue in another root for their retained transcript, including when the saved archive is missing or Pi never supplied one. Preparing the handoff appends the existing snapshot Markdown to the destination's new-session draft, preserves existing destination text and the source's unsent draft, and waits for an explicit Send before opening Pi.

The destination form identifies the snapshot as potentially incomplete. Live and empty tabs, unavailable destinations and the source root cannot prepare a handoff. Short windows keep the transcript readable with a scrollable recovery panel and compact disabled composer.

Part of #4.
Closes #94.

Verification

  • bun install --frozen-lockfile passed through the pinned mise environment.
  • mise run build passed lint, all three TypeScript projects, 115 unit tests, 134 integration tests and production bundling.
  • Focused mise exec -- bun run test:e2e tests/e2e/session-activity.test.ts passed all 6 tests.
  • Full Electron CI suite passed all 78 tests across 9 suites (168.10 seconds). All 15 PR checks passed on c1c95c7, including the full CI gate.
  • The local full Electron attempt was stopped after missing rpc.jsonl fixture logs and a transcript timing failure in session-tree.test.ts, plus slow cleanup. The focused changed-surface suite passed locally; the complete suite passed in CI on this commit.
  • git diff --check passed.

Proof

The new Electron case removes the source archive, prepares a draft in a different workspace group using the keyboard, checks that existing destination text is preserved, excludes the source's unsent draft and saved-selection claims, and verifies that preparation issues no runtime requests. Returning to the source tab preserves its disabled unsent draft. Hook tests also cover unavailable and invalid destinations, live/empty tabs, and a runtime with no archive path. The app integration test exercises the visible snapshot wording and preparation action.

Captured and visually inspected .tmp/proof/exited-session-handoff.png at 1280 x 840, .tmp/proof/exited-session-handoff-minimum.png at 900 x 600 and .tmp/proof/exited-session-prepared-draft.png. Electron also writes these captures under test-results/session-activity/ in the uploaded CI pidex-e2e artefact. Local output is .tmp/proof/session-activity.log, .tmp/proof/e2e.log and .tmp/proof/build.log.

Limits

A retained transcript may be incomplete and disappears after closing the app unless saved. Preparing the draft transfers context and does not restore files or create a resumable archive. Validation uses deterministic Pi RPC fixtures; no live provider was used.

Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy
johnnyhuy marked this pull request as ready for review November 29, 2026 23:44
@johnnyhuy

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate. This slice shipped as #96, which merged into main as 30177c7. The branch also conflicts with main now that the feature has landed. The merged pull request adds the exit recovery layout bound and the short window media query that keep the transcript readable while the handoff form is open, and exposes openSession on the workbench hook so the empty transcript guard is testable.

The branch is deleted with this pull request.

@johnnyhuy johnnyhuy closed this Nov 30, 2026
@johnnyhuy
johnnyhuy deleted the ao/continue-building-pidex-3/agent/issue-94-exited-handoff branch November 30, 2026 00:47
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.

Prepare retained exited-session context in another workspace root

1 participant