feat(desktop): add Work Board Phase 3 start-task spike #4598
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4598"
general
weight: 0.35
liugddx
Summary
Implements the thin Work Board Phase 3 validation spike for #2560.
Start taskpath for project-scoped Work Board items whose target resolves to one available, non-archived Host/project target.linkedSessionsreference only after a projected first-send outcome.The experiment is enabled only in a development renderer with:
This is intentionally not a persisted user setting. The goal is maintainer/contributor dogfooding before deciding whether to productize the entry and continue later Work Board phases.
Verification
npm test: 1580 passed, 12 skipped; runtime-host and other relevant suites passed.npm --workspace @maka/desktop run build:main: passed.git diff --check: passed.The storage workspace test run remains affected by the existing sandbox
EPERM chmodrestriction under~/Library/Application Support/Maka/~/Library/Caches/Maka; this is environmental and unrelated to the changed Work Board behavior.Generated-by: Codex
AI use
Codex assisted with implementation, review, and test execution. The contributor reviewed the resulting changes and owns the final PR.
Review follow-up
Addressed the review comments (3 P1 + 2 P2):
linkSessionsucceeds. On failure the Session id is retained, so pressing Start on the same item retries the same Session instead of creating a duplicate.workBoard:linkSessionnow resolves the board item's project and passes it to the Host validator, which requires the Session's workspace target to be a project matching that id. Cross-project links on the same Host are rejected.linkedSessionsis now a single-link contract (WORK_BOARD_MAX_LINKED_SESSIONS = 1): a freshly started Session replaces any previous link, so the array stays bounded. Read paths remain tolerant of legacy multi-entry arrays.Start taskexperiment now requiresimport.meta.env.DEV === truein addition toVITE_MAKA_WORK_BOARD_START_TASK=1, so it is unreachable in production builds.Tests added: 4 wiring scenarios in
workbar-controller.test.ts(surface-bound claim, same-surface link, failed-link retry reusing the Session, opening a linked Session), 2 project-ownership cases inwork-board-ipc-main.test.ts, and a single-link contract case inwork-board-store.test.ts. Desktop main-process suite: 2074 passed / 0 failed; typecheck, biome, and both architecture checks pass.Second review follow-up
Addressed the second review round (2 P1 + 1 P2):
draftKeyis a target-scoped draft bucket, not a surface identity.openNewTaskSurface()now returns the existing Session selection revision it creates; the Work Board claim stores that token immediately, and Composer carries the same captured token through first-send projection. A New Task reopened on the same Host/project gets a different revision and cannot consume the claim. This removes module-global state, render-time mutation, and the tests' manual backfill renders.workBoard:linkSessionnow passes theitem.revisionread before Host validation asexpectedRevisiontostore.linkSession, which enforces the CAS inside its write transaction (operation_conflicton mismatch). A concurrent mutation duringlistSessions()can no longer write a Session validated for one project into an item that has moved to another. Added a revision-CAS fail-closed test; the cross-project test now uses a production-shaped Session workspace projection.docs/work-board-contract.md.Desktop main-process suite: 2076 passed / 0 failed; typecheck, biome, and architecture checks pass.
Third review follow-up
Addressed review 5110159288:
Focused first-send and Workbar tests: 35 passed / 0 failed; desktop typecheck, Biome lint, renderer architecture checks, and
git diff --checkpass.