Skip to content

feat: add resume handoff guidance to session export - #44

Merged
johnnyhuy merged 1 commit into
mainfrom
agent/issue-43-export-resume-handoff
Nov 10, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
agent/issue-43-export-resume-handoff

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

What changed

Exported session markdown now carries a Continue elsewhere handoff section. It says the file is portable context rather than a restorable Pi session archive, points same-folder readers to Sessions history Resume (Resume in new fork for an earlier entry), points new-folder readers to open the destination root and start a fresh session with the file as context, and warns that saved history stays with the original folder. Empty exports keep their current shape with no handoff section.

Part of #4
Closes #43

Verification

  • bun install --frozen-lockfile, passed (TMPDIR=/tmp in this sandbox)
  • bun run lint, passed with 0 warnings and 0 errors
  • bun run typecheck, passed across renderer, main, and preload configs
  • bun run test:unit, passed with 83 tests across 9 files, including 9 export-session tests (2 new handoff tests plus the updated exact-output test)
  • bun run test:integration, 40 passed and 6 failed in tests/integration/SettingsView.test.tsx. The same 6 failures reproduce on clean origin/main in this environment (jsdom localStorage undefined), so they are pre-existing here and unrelated to this change
  • Bundle steps run directly (bunx tsc for main and preload, then bunx vite build), passed. mise run build could not run because mise trust is blocked by the sandbox
  • bun run test:e2e, blocked in this sandbox with listen EPERM on 127.0.0.1. Noted here once per the run brief, with unit output and the rendered export below as the fallback proof

Proof

Capture method (d), terminal transcript with (c) unit output naming the new tests. A sample export generated from the real sessionExportMarkdown function is saved locally at .tmp/proof/sample-export.md (scratch, not committed) and its head is reproduced here.

# Move context to new folder

Exported from pidex at 2026-11-09T00:00:00.000Z.

It ran in `/repo/app`.

It used `anthropic/claude-test`.

## Continue elsewhere

This file is portable context, not a restorable Pi session archive.

- Same folder (`/repo/app`): open that root in Pidex, go to Sessions, select this session, and choose Resume. Choose Resume in new fork when continuing from an earlier entry.
- New folder: open the destination folder as a root in Pidex, start a new session there, and share this file as context for the first message. Attach it or paste its contents.
- Saved history stays with the original folder, so Resume will not find this session under a new folder.

Gaps

This slice only documents the handoff inside the exported file. It does not add an in-app migration wizard, move native Pi archives between folders, or fix the pre-existing SettingsView integration failures noted above.

@johnnyhuy
johnnyhuy merged commit b92ab4b into main Nov 10, 2026
15 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-43-export-resume-handoff branch November 10, 2026 14:15
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.

Add resume handoff guidance to session history export

1 participant