Repository navigation
feat: prepare history context in another workspace root - #56
Merged
Merged
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.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.
History can now prepare the selected branch or ancestor as a Markdown draft in another registered root. Preparing keeps existing destination text and the source history selection; Pi starts only after the user reviews and sends the draft.
Part of #4
Closes #55
Verification
mise exec -- bun install --frozen-lockfilepassed.mise exec -- bun run lintpassed.mise exec -- bun run typecheckpassed.mise exec -- bun run test:unitpassed, 90 tests.mise exec -- bun run test:integrationpassed, 65 tests.mise run buildpassed, including all checks and production bundling.mise exec -- bun run test:e2epassed, 48 tests across five Electron suites.git diff --checkpassed.Proof
The new Electron test,
prepares ancestor context in another root without starting Pi and sends only after review, checks the native disabled destination option, ancestor-only context, preservation of both drafts and the source archive, absence of runtime opens/prompts before Send, and the exact edited prompt sent to a fresh destination session. Playwright captures the selected destination and prepared composer. Both local PNGs were visually inspected.New component coverage includes the following cases.
requires an available destination and prepares only on explicit submitrejects a destination that becomes unavailable while the form is openexplains how to add a destination when no other roots are registeredprepares selected history across groups, keeps both drafts and restores the source selectiondoes not prepare missing, same-root, empty or loading history handoffsCaptures are in
.tmp/proof/select-destination.pngand.tmp/proof/prepared-destination-draft.png. The Electron suite also writes them undertest-results/history-handoff/for the existingpidex-e2eCI artefact upload. Download the hosted Electron screenshot artefact. Both images were checked in the downloaded CI artefact, underUsers/runner/work/pidex/pidex/test-results/history-handoff/.Direct inline attachment is blocked here. The browser automation host timed out, and the native Firefox file chooser did not confirm the selected file. Screenshot capture in Electron succeeded. Scratch captures and logs are excluded from the commit.
Drafts remain in memory and do not survive app quit. Handoff carries the same full selected history, including thinking and tool input/output, as Copy context and Export. It does not move files or session archives. Further recovery work stays under #4.