Skip to content

feat(web): browse archived and terminal Session history - #547

Open
testikun wants to merge 1 commit into
openpi-dev:mainfrom
testikun:codex/issue-347-history-ui
Open

testikun wants to merge 1 commit into
openpi-dev:mainfrom
testikun:codex/issue-347-history-ui

Conversation

@testikun

Copy link
Copy Markdown
Contributor

Problem

The archived sidebar only filtered the bounded snapshot (500 Sessions), so older archives could not be found or restored there. The existing read-only terminal Pi history endpoint had no Web entry point. Refs #347; deletion/fork and full transcript recovery remain separate work.

Value

Users can page through older archives and inspect compatible terminal Pi Sessions without transferring control or copying their history into Web storage. Empty, failed, partial-scan, and end-of-history states are explicit.

Approach

  • Use the existing authenticated archived cursor/query and terminal read-only list/detail APIs; keep current Web Sessions snapshot-backed and terminal history scoped to the selected workspace.
  • Project bounded text-only terminal previews in a read-only dialog with source/origin and truncation cues. Abort stale requests on view/query/workspace changes; never expose select, prompt, edit, fork, or delete for terminal records.
  • Retain restore through the existing action, guard concurrent clicks, and remove restored rows without activating them. No backend or Pi Session authority changes.
  • Update README with Web-vs-terminal storage and preview boundaries. Ablation removed the old snapshot-only archive grouping, unused translations, and unnecessary type assertions; the focused tests remained green.

Validation

  • bun run check passed (Node 24 toolchain, base f6b49ae59605b1276b8267f2886d22c03f01533c).
  • bun run test passed: Node 1658 passed/1 skipped; Vitest 223 passed.
  • Real Chrome: playwright test --config tests/web/playwright.config.ts tests/web/openpi-web.e2e.ts passed 35/35, including multi-page archive discovery, restore/failure, read-only terminal preview and 390/1280px layout.
  • Isolated pi list reported a single OpenPI source at this checkout; the package was not installed into the user Pi agent dir.

Terminal history desktop
Terminal history mobile

Impact

  • User-visible: paginated archived view and read-only terminal history; current Web Session controls remain unchanged.
  • Model-visible context/tools: none.
  • Runtime/lifecycle: no new owner, activation, or write path; read-only requests are cancellable in the UI.
  • Persisted config/data: none; archive restoration uses the existing mutation.
  • Compatibility/risk: archived view now queries the canonical bounded endpoint instead of the latest snapshot. Partial scans remain explicitly partial, not a claim of exhaustive history. Refs feat(web): complete archive, history, recovery, and fork session lifecycle #347 rather than closing its remaining requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:github GitHub workflows, templates, ownership, or tests documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant