Skip to content

feat: copy selected history context for workspace handoff - #52

Merged
johnnyhuy merged 1 commit into
mainfrom
ao/pidex-development-3/agent/issue-51-copy-history-context
Nov 12, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
ao/pidex-development-3/agent/issue-51-copy-history-context

Conversation

@johnnyhuy

@johnnyhuy johnnyhuy commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Adds Copy context beside Export in session history. It copies the selected parent chain through the existing Markdown formatter, including the root, model, messages, thinking, tool input/output and handoff guidance. Users can paste it into a new session in another root.

Both actions wait for readable history. Clipboard success explains the next step; failures stay retryable and offer Export. Selecting another branch or entry clears the feedback. Saved archives stay in their original root.

Part of #4
Closes #51

Verification

  • bun install --frozen-lockfile passed.
  • bun run lint and bun run typecheck passed.
  • bun run test:unit passed, 90 tests.
  • bun run test:integration passed, 56 tests, including five new HistoryExport cases covering exact Markdown, empty/unavailable history, pending-copy suppression, retry after failure, unavailable clipboard and file download.
  • mise run build passed.
  • mise exec -- bun run test:e2e passed, 46 tests across five Electron suites.

Proof

The new Electron test, copies only the selected history path as portable context without launching Pi, reads the native Electron clipboard after copying the archive tip, another branch and an ancestor. It verifies excluded branch/descendant text is absent, the source archive is unchanged and no Pi process was opened.

Captured locally, outside the commit:

  • .tmp/proof/e2e.txt contains the full Electron run output.
  • .tmp/proof/copied-history-context.png shows the actual selected ancestor, Copy context control and paste guidance. Visually inspected.
  • .tmp/proof/history-export-tests.txt names the five passing component tests.
  • .tmp/proof/build.txt contains the production build and gate output.

The local Electron installation needed repair with the pinned Node 22 runtime before E2E could launch. The successful run uses deterministic Pi RPC fixtures; live-provider behaviour and archive relocation are outside this slice.

Hosted proof

Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy johnnyhuy added the agent claimed by the Pidex work loop label Nov 12, 2026
@johnnyhuy
johnnyhuy merged commit 3c46aa1 into main Nov 12, 2026
15 checks passed
@johnnyhuy
johnnyhuy deleted the ao/pidex-development-3/agent/issue-51-copy-history-context branch November 12, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent claimed by the Pidex work loop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy selected history context for a workspace handoff

1 participant