Repository navigation
feat: preserve history selection in portable context - #77
Merged
Merged
Conversation
Include saved archive and entry identifiers in copied context, Markdown downloads and cross-root handoff drafts. Explain which selection needs a fork and when readable history cannot safely resume. Co-authored-by: OpenAI Codex <noreply@openai.com>
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.
Copied context, Markdown exports and cross-root handoff drafts now retain the Pi session, source archive, selected entry and archive tip. The handoff explains when to Resume, when to Resume in new fork, and when readable history can only be used as context.
Part of #4.
Closes #76.
Verification
bun install --frozen-lockfilepassed.mise exec -- bun run lintpassed.bun run typecheckpassed withinmise run build.mise exec -- bun run test:unitpassed, 103 tests across 10 files.mise exec -- bun run test:integrationpassed, 102 tests across 13 files.mise run buildpassed, including all gates and the production bundle.git diff --checkpassed.Proof
Local app launch and screenshot capture are blocked by the incomplete Electron runtime installation. Hosted macOS Playwright capture and native Markdown download succeeded on commit
45d647b. All 63 Electron tests passed.The screenshot shows the new saved-selection section in the actual destination composer at native window dimensions. It was downloaded, visually reviewed, copied to
.tmp/proof/and uploaded directly to this PR. No scratch captures are committed.The artefact contains
history-handoff/history-context-identifiers.png,history-handoff/prepared-history-context.md,history-summary/selected-history.mdandhistory-summary/legacy-history-context.mdunderUsers/runner/work/pidex/pidex/test-results/.The real downloaded Markdown records the selected ancestor separately from the archive tip.
Its continuation guidance says to select
old-answerand choose Resume in new fork. The test also compares the complete downloaded file with the native clipboard text, allowing only their export timestamps to differ.New unit cases
identifies the exact saved archive tip and explains that the snapshot can advance.distinguishes a selected ancestor or alternate branch from the archive tip.preserves readable history identifiers without promising unsafe continuation.records an empty archive without inventing an entry or offering continuation.keeps backticks and line breaks in archive identifiers inside readable inline code.Component coverage checks clipboard content, reads the actual download Blob, and checks the prepared draft while preserving both roots' drafts. Electron coverage checks native clipboard text for the archive tip, an alternate branch and an ancestor; saves the real Markdown download; compares it with copied context; and checks legacy recovery guidance. Source archives must remain unchanged and export must not launch Pi. The cross-root test captures the prepared draft in the native window and verifies that only a later reviewed Send starts a new session.
The identifiers describe the saved selection at export time. They do not relocate an archive, add an importer or guarantee that the source remains present or unchanged. The parent remains open for further recovery slices.