Skip to content

feat: preview saved work before starting a new session - #79

Merged
johnnyhuy merged 3 commits into
mainfrom
agent/issue-78-session-start-choice
Nov 14, 2026
Merged

johnnyhuy merged 3 commits into
mainfrom
agent/issue-78-session-start-choice

Conversation

@johnnyhuy

@johnnyhuy johnnyhuy commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The new-session view now puts the current root's recent saved conversations above the task composer. Each choice opens a read-only preview before continuation, while the composer explains that Send starts a separate session and keeps its own unsent draft.

Part of #4.
Closes #78.

Verification

  • bun install --frozen-lockfile passed.
  • bun run lint passed.
  • bun run typecheck passed.
  • mise exec -- bun run test:unit passed, 103 tests across 10 files.
  • mise exec -- bun run test:integration passed, 106 tests across 14 files.
  • mise run build passed, including all gates and the production bundle.
  • git diff --check passed.

Proof

$ mise exec -- bun run test:unit
 Test Files  10 passed (10)
      Tests  103 passed (103)

$ mise exec -- bun run test:integration
 Test Files  14 passed (14)
      Tests  106 passed (106)

$ mise exec -- bun run test:e2e
 Error: Library not loaded: @rpath/Electron Framework.framework/Electron Framework
 Error: Electron failed to install correctly
 Test Files  8 failed (8)
      Tests  66 skipped (66)

Local app launch and screenshot capture are blocked by the incomplete Electron runtime installation. Hosted macOS Playwright verification and capture succeeded on commit 1b736b4. All 66 Electron tests passed.

$ mise run test:e2e  # hosted macOS
 previews a chosen saved conversation before opening a runtime session and preserves the separate task draft passed
 keeps both choices reachable by scrolling at the native minimum window size passed
 scopes choices to the selected root and starts a fresh conversation only after Send passed
 Test Files  8 passed (8)
      Tests  66 passed (66)

Saved-work preview choices above the separate new-task composer

Saved-work choices in the native 900 by 600 window

Both screenshots came from the running Electron app at native window dimensions. They were downloaded, visually reviewed, copied to .tmp/proof/ and uploaded directly to this PR. The minimum-size test scrolls to each preview action and then to the task composer and Send button.

The artefact contains the choices, saved-conversation preview, minimum-size choices and composer, and an empty root under Users/runner/work/pidex/pidex/test-results/session-start/. No scratch captures are committed.

New component and hook cases

  • previews the chosen archive and browses history only on explicit actions.
  • replaces choices with the selected root’s history and retains archives recorded under a root alias.
  • has no continuation action for an empty history and disables choices during an open.
  • previews a chosen saved conversation without launching Pi or consuming the new-session draft.

New Electron cases cover keyboard preview of the second archive, browsing older work, independent new-task and continuation drafts, aliased archive paths, empty-root switching, native minimum-window scrolling and an intentional fresh-session Send. Previewing must leave the source archive unchanged and issue no session-execution or prompt RPCs. Read-only model discovery can still query Pi. A later Send must use a new archive with only the separate task.

The sidebar's recent-session shortcuts retain their existing immediate-open behaviour. This slice changes the choice in the new-session view. The parent stays open for further recovery work.

johnnyhuy and others added 3 commits November 15, 2026 06:35
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy
johnnyhuy marked this pull request as ready for review November 14, 2026 23:43
@johnnyhuy
johnnyhuy merged commit 46c7ab9 into main Nov 14, 2026
15 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-78-session-start-choice branch November 14, 2026 23:44
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 saved-session preview choices before starting a new conversation

1 participant