Skip to content

feat: show recovery summary for selected history branch - #50

Merged
johnnyhuy merged 1 commit into
mainfrom
agent/issue-49-history-recovery-summary
Nov 10, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
agent/issue-49-history-recovery-summary

Conversation

@johnnyhuy

@johnnyhuy johnnyhuy commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Saved history now offers a collapsible summary of the selected branch, with message and tool outcomes and the latest request and reply. Unfinished tools carry guidance to review the workspace before retrying, and selecting another branch or an ancestor updates the summary.

Part of #4.
Closes #49.

The summary starts collapsed to preserve transcript space. Excerpts contain up to 240 characters of saved message text and do not infer task completion or current file state. Markdown export shares the same outcome counting logic.

Verified on macOS with the pinned mise toolchain

  • mise exec -- bun install --frozen-lockfile passed.
  • mise exec -- bun run lint passed.
  • mise exec -- bun run typecheck passed.
  • mise exec -- bun run test:unit passed, 90 tests.
  • mise exec -- bun run test:integration passed, 51 tests.
  • mise run build passed.
  • mise exec -- bun run test:e2e --reporter verbose --testTimeout 30000 passed, 45 tests across five suites.

The delayed background-open check now allows ten seconds for asynchronous startup on a loaded machine. The history check scopes repeated reply text to the transcript. Both retain their existing behaviour assertions.

Electron output from the final local run

Test Files  5 passed (5)
     Tests  45 passed (45)
✓ summarises unfinished history without launching Pi and follows branch selection
✓ preserves selection, expansion and measured layout while browsing history

New coverage includes

  • counts each outcome using the same precedence as tool cards
  • excerpts the latest text without including thinking or tool output
  • handles empty and tool-only selections without inventing message text
  • updates the excerpts and counts when the selected path changes
  • warns about unknown tool effects without declaring the work complete
  • shows an empty selection and escapes message markup
  • summarises unfinished history without launching Pi and follows branch selection

Electron proof run passed all 45 tests using mise run test:e2e. Download the screenshot proof from its uploaded pidex-e2e artefact.

The Electron fixture captures test-results/history-summary/unfinished-tools.png and test-results/history-summary/selected-branch.png. Local copies are retained under .tmp/proof/ and are not committed. The uploaded artefact contains both images, plus long-session/history-narrow.png showing the collapsed summary at 900 by 600. Captures were visually inspected locally.

Direct inline image upload was blocked because browser automation was unavailable. Electron screenshots and test transcripts provide the proof through the linked CI artefact.

The Electron suite uses deterministic Pi RPC fixtures, so live providers are not covered. Folder-to-folder context transfer remains a follow-up under #4.

GitHub lint, typecheck, unit, integration, build, release adapter, Electron E2E, CodeQL and Socket checks all passed on 7198feb.

Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy
johnnyhuy merged commit 4cc4d2d into main Nov 10, 2026
15 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-49-history-recovery-summary branch November 10, 2026 19:48
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.

Show a recovery summary for the selected history branch

1 participant