Repository navigation
feat: group workspace roots and switch safely - #34
Conversation
johnnyhuy
left a comment
There was a problem hiding this comment.
Changes requested: one blocking new-session regression.
Standards
No high-confidence documented standards violations found. Filesystem and process operations remain behind IPC and follow the root-scoped model.
Spec
New sessions cannot start against real Pi 1.5.0 because the ownership check requires an archive that Pi intentionally has not persisted yet. The required fix and regression coverage are in the inline comment.
Reviewed the main-based diff at 7c656ca, including the prerequisite #33 changes. Verified lazy persistence by reading the installed Homebrew Pi 1.5.0 session-manager and RPC sources. No project programs, tests, or builds were run.
Standards: 0 findings. Spec/correctness: 1 P1 finding.
johnnyhuy
left a comment
There was a problem hiding this comment.
Approved / ready. The prior P1 new-session blocker is addressed at 4795882.
Standards
No required findings. The fresh-archive exception is limited to newly launched, non-ephemeral runtimes and permanently ends after messages, an archive-path change, or observing a file.
Spec
No required findings. Read-only inspection of installed Homebrew Pi 1.5.0 confirms that ordinary fresh runtimes report zero messages and an allocated archive path before persistence. The updated fixture models this behavior, and regression cases cover first model setup/prompt plus deleted, switched, malformed, and foreign archives.
Reviewed the main-based diff and the follow-up commit. No project programs, tests, or builds were executed; validation is static code and test inspection. The documented dependency on PR #33 remains.
Standards: 0 findings. Spec/correctness: 0 outstanding required findings.
johnnyhuy
left a comment
There was a problem hiding this comment.
Approved / ready. No outstanding required findings.
This run requests the same head (4795882) and base (a7e9f44) as the completed follow-up review. Reverified both refs and the clean checkout; the reviewed diff is unchanged.
Standards: no required findings. Spec/correctness: the previous new-session persistence blocker is fixed. The fresh-runtime allowance matches Pi 1.5.0 lazy persistence and preserves strict checks after messages, path changes, or observing an archive. Regression coverage includes first model setup/prompt and missing, switched, malformed, and foreign archives.
Validation is read-only code and test inspection, including installed Pi source inspection from the preceding review of this exact head. No project programs, tests, or builds were executed. The documented dependency on PR #33 remains.
johnnyhuy
left a comment
There was a problem hiding this comment.
Approved / ready. No outstanding required findings.
Reverified that PR #34 still has head 4795882 and base a7e9f44, with a clean checkout. The main-based diff is identical to the completed review of this head.
Standards: no required findings. Spec/correctness: the prior fresh-session persistence blocker is resolved, with narrowly scoped handling of an initial unpersisted archive and regression coverage for first setup/prompt and ownership refusal cases. The documented dependency on PR #33 remains.
Validation is read-only inspection from the completed review of this exact diff, plus current ref/checkout verification. No project programs, tests, or builds were run.
Add persisted workspace groups, root-scoped recovery and safe background switching. Preserve Pi single-cwd ownership and branch-aware continuation while covering migration and switching regressions. Co-authored-by: OpenAI Codex <noreply@openai.com>
Reserve usable space for session rows and scroll the sidebar when root navigation fills a short window. Exercise background-session switching at 900×600. Co-authored-by: OpenAI Codex <noreply@openai.com>
Track the initial archive allocated to a zero-message runtime and allow it to remain absent until Pi persists the first conversation. Revoke the exception on messages, archive changes, or observed files; resumed archives retain strict header ownership. Match Pi lazy persistence in the RPC fixture and cover first prompts, removed resumed/persisted archives, switched paths, and malformed or foreign headers. Co-authored-by: OpenAI Codex <noreply@openai.com>
4795882 to
ad50190
Compare
Related repositories and package folders currently appear as unrelated cwd-based workspaces. This adds named groups of existing roots so users can switch while Pi sessions continue in the background, with the execution destination kept explicit.
This PR targets
mainand depends on the still-open #33 at3bce2eab. Its main-based diff includes #33's unchanged prerequisite commits; the workspace milestone is the commits after that head. It preserves #33's continuation engine and archive-owner safeguards. Review and land #33 first; this PR does not modify or replace it.Refs #5, milestone 1 only. This does not close #5.
Changes
Validation
mise run build: lint, all typechecks, 69 unit tests, 39 component tests, and production bundle passed.mise run test:e2e: all 43 deterministic Electron tests passed, including feat: add session-tree navigation and branch-aware continuation #33 branch-aware resume/fork and source preservation, delayed switching, concurrent opens, alias ownership, restored-root new/resume/fork, and long-session/narrow-window regressions.7c656careserves usable session-pane space and adds a normal-click 900×600 regression. The compact-window fix passed CI and Electron checks.git diff --checkpassed. No live-provider inference was used.Remaining scope
Automatic repository/worktree hierarchy, group-wide history, durable archive handles, and cross-folder context transfer remain deferred. Group membership does not combine Pi instructions or provide simultaneous multi-cwd execution. Live processes, drafts, and view state remain in memory; groups, root selection, and defaults persist.
Requested AO review focus
Review the latest head for runtime ownership (including fresh unpersisted archives, single-cwd ownership, live archive reuse, and #33 continuation), migration safety (legacy records, stable IDs, missing/moved roots, and alias handling), and switching races (late opens, stale responses, previews, and per-root drafts/settings). Report actionable correctness findings. Do not merge.