This repository was archived by the owner on Sep 2, 2026. It is now read-only.
Repository navigation
[Spec #21] Board state storage & two-board model - #56
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
workflowStagepipeline field (fixed set: idea, exploring, spec, implementing, review, shipped, triage; null = unstaged) to worktrees and folder workspaces, persisted as a plain per-key value that survives restarts and folder renames, with validation at every write boundary (IPC, RPC, store) and safe degradation to unstaged on corrupt persisted data. The classic kanban drawer now hides staged workspaces — exclusivity is purely a display rule, so manualworkspaceStatusstays intact in data and unstaging restores the previous organization. No data migration: fields begin empty and clean.Spec
Tickets Included
Closing References
Closes #21
Closes #32
Closes #40
Acceptance / Success Criteria
Modifications Par Intention
src/shared/workflow-stages.tssrc/shared/workflow-stages.test.tssrc/shared/workflow-stage-schema.tsReview: Single source of truth for stage vocabulary; check the normalizer is total (never throws).
src/shared/worktree/meta-types.tssrc/shared/worktree/types.tssrc/shared/folder-workspace-types.tssrc/shared/runtime-types.tsReview: Field independence from workspaceStatus; no migration code.
src/main/persistence/loading-store/store.tssrc/main/persistence/restoring-sessions/folder-workspace-operations.tssrc/shared/folder-workspaces.tsReview: workspaceStatus untouched in every path; invalid values never persist.
src/main/ipc/worktree-metadata-merge.tssrc/shared/folder-workspace-worktree.tssrc/main/runtime/runtime-folder-workspace.tssrc/main/runtime/orca-runtime.tsReview: Corrupt values degrade to absent/unstaged at every site.
src/main/ipc/repos.tssrc/main/ipc/worktrees.tssrc/main/runtime/rpc/methods/worktree.tssrc/main/runtime/rpc/methods/folder-workspace.tssrc/main/runtime/rpc/methods/worktree-schemas.tssrc/preload/api/worktree-api.tsReview: Optional-field-only wire changes; mixed client/host versions safe; methods execute on the owning runtime regardless of host.
src/renderer/src/components/sidebar/workspace-stage-exclusivity.tssrc/renderer/src/components/sidebar/use-visible-workspace-kanban-worktree-ids.tsReview: Display rule only — no field mutation; sidebar keeps staged rows visible.
src/main/workflow-stage-persistence.test.tssrc/main/runtime/rpc/methods/worktree-stage-rpc.test.tssrc/main/runtime/rpc/methods/folder-workspace.test.tssrc/main/ipc/worktrees-create-metadata-persistence.test.tssrc/main/runtime/orca-runtime.test.tssrc/renderer/src/components/sidebar/classic-drawer-stage-exclusivity.test.tsReview: Each acceptance criterion has an asserting test at the external-behavior level.
Review Guardrails
Per-unit reviews
Final integration review
Fixed after review
Points to double-check
QA Plan
Automated
pnpm run typecheck — expected: node + cli + web tsconfigs clean (Type gate across all targets)
pnpm test — expected: Only known-unrelated failures (codex-fetcher-pty-settle reproduces on pristine main; wsl-exec-mode-separator fails only under full-suite artifact interference and passes standalone; transcript-watch load flake passes standalone) (Full regression suite incl. new stage/exclusivity tests)
pnpm testTargeted suites twice — expected: 38/38 stable across repeat runs (Flake check on the new suites)
pnpm exec vitest run --config config/vitest.config.ts src/shared/workflow-stages.test.ts src/main/workflow-stage-persistence.test.ts src/renderer/src/components/sidebar/classic-drawer-stage-exclusivity.test.ts src/main/ipc/worktrees-create-metadata-persistence.test.ts src/shared/folder-workspace-worktree.test.tsManual scenarios
orca worktree setpath or RPC worktree.set), restart Orca — expected: Stage still present; classic drawer hides the workspace (Restart persistence + display exclusivity)Regression checks
Arbitrations / Decisions
Problem: the fork-triggered
Track Community PRscheck failed becauseBUFO_BOT_PRIVATE_KEYonly exists upstream -> Resolution: workflow now skips cleanly when the secret is absent (bae2734, also on 64ix/orca main so pull_request_target picks it up); re-triggered green via reopen.Problem: origin/main advanced 505 commits mid-run, splitting src/shared/types.ts into per-domain modules and persistence.ts into src/main/persistence/** -> Resolution: merged origin/main into the integration branch and ported workflowStage into the new layout (type modules, loading-store/store.ts, restoring-sessions/folder-workspace-operations.ts); took main's barrel/deletions wholesale rather than resurrecting old files
Problem: computeVisibleWorktreeIds sat at its max-lines lint budget so the exclusivity rule could not live inside it -> Resolution: pure computeClassicDrawerWorktreeIds wraps the renamed computeVisibleWorktrees pipeline at the drawer's visibility seam; every drawer consumer inherits the rule with zero sidebar churn
Problem: implementer committed Two-board exclusivity filter #40 with failing typecheck and an unhardened staged predicate -> Resolution: independent reviewer fixed all three errors and normalized corrupt values inside isStagedWorkspace with a regression test
Problem: full E2E gate exits non-zero on this machine (~30 failures) -> Resolution: reviewers cross-ran failing specs on a pristine origin/main worktree; all reproduce there (caffeinate, tab-rename, settings-agent-awake, smart-sort flake, worker-crash cascades) — environmental/pre-existing, recorded as not-run rather than passed
Risks / Follow-ups