Read known sessions as paged active-branch streams #6
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
lab/pilcrow#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Introduce the deliberate SessionHistorySource seam for listing metadata and reading normalized active-branch history. Its initial local Pi adapter uses Pi's public settings and SessionManager behavior with exact known paths. Hub callers and browser history routes depend on this narrow interface rather than reimplementing Pi's filesystem layout.
Open a known stopped or idle workspace session as one chronological stream containing persisted ordinary user entries and finalized assistant entries from Pi's current active branch. Do not show abandoned branches or expose session-tree navigation. Older history loads upward in bounded cancellable pages, preserves the visible entry and pixel offset, and remains rendered for the current page visit.
This is the first replacement slice for the current assistant-response chooser. Retain canonical finalized-response rendering so later annotation work can build on the stream rather than introducing a second document model.
Acceptance criteria
Blocked by
Implemented in jj revision
5bc35897(feat(history): add bounded persisted active-branch response browsing).What changed:
SessionHistorySourceinto the narrow Pi-facing interface for settings/session-directory metadata, exact-path validation, and bounded normalized active-branch reads. The adapter uses Pi public settings/SessionManager behavior and never opens sessions through a write-capable migration path.stop/lengthassistant entries from Pi’s current active branch only. Stable Pi entry IDs and canonical immutable assistant text are retained; abandoned branches, unfinished assistants, thinking, tools, summaries, and custom state are excluded.PI_CODING_AGENT_SESSION_DIR, then settings; exact producer/catalog paths remain authoritative for known sessions.Audit and regression coverage:
Validation:
git diff --checkpassed.vp checkremains blocked only by the unchanged pre-existing formatting issue in.dev/agents/triage-labels.md.No Pi process was launched, no Pi JSONL was written or migrated, and no cold History/search/import, branch UI, live settlement, or placement behavior was added. No dev server was managed.