This repository was archived by the owner on Sep 2, 2026. It is now read-only.
Repository navigation
[Spec #24] Feature board view - #63
Merged
Merged
Conversation
…mbly Implements the testable seams for #44 (feature board skeleton, part of spec #24): - buildFeatureBoardColumns: column membership from effective stage, persisted order stability, stale-id filtering, awaiting-input elevation, and the drag-freeze (#47) / search-filter (#50) extension seams. - getFeatureBoardScopedWorktrees: per-project, non-archived scoping. - buildFeatureBoardCards: assembles cards + lineage children (#5) from pre-resolved effective-stage/awaiting-input inputs. - feature-board-column-order: per-project, per-column persisted order model (spec 21), following the applyManualRepoOrder rank-map precedent.
…ard UI Implements the rest of #44 (feature board skeleton, spec #24): - New 'board' TopLevelView wired through ui-chrome-types, top-level-view, right-sidebar-visibility, client-ui-schemas (remote wire parity), and the UISlice's open/closeBoardPage + previousViewBeforeBoard round trip. - Sidebar 'Board' nav entry (SidebarNav.tsx) opens the board in one click. - FeatureBoardPage: TaskPage repo-selection-pattern project picker, seven always-visible columns in WORKFLOW_STAGE_IDS order. - FeatureBoardCard: builds on WorktreeCard (repo chip, branch, agent-state dot, PR chip), adds an amber awaiting-input marker and a folder-workspace marker; children render as nested read-only WorktreeCards (#5 lineage). - FeatureBoardColumn/-Header carry documented, unused extension points for #47 (onDropCard) and #48 (headerAction). - setFeatureBoardColumnOrder store action + featureBoardColumnOrder persisted-UI-state field (read/update normalization wired in main).
…actor sees literal keys translate() calls with variable args (a [key, fallback] tuple pulled from a Record) are invisible to the static localization scanner used by #44's lint gate; a switch/case over literal translate() calls fixes the catalog check and adds the new auto/manual keys to en.json.
… card-property setting
WorktreeCard's own branch row is gated behind the user's worktreeCardProperties
preference ('branch' is not in DEFAULT_WORKTREE_CARD_PROPERTIES), so a default
profile would render the board card anatomy without branch — one of #44's
explicit acceptance criteria. Adds a standalone branch row using the same
branchName()/TruncatedSidebarLabel building blocks the sidebar uses, so the
board is honest about branch identity independent of that setting.
…to-end store wiring Covers effective-stage-based column membership, persisted column order, and awaiting-input elevation together through a real store snapshot — the pure buildFeatureBoardColumns/buildFeatureBoardCards tests already cover the algorithms in isolation, but nothing exercised the hook that wires prCache/issueCache/agentStatusByPaneKey/featureBoardColumnOrder into them (#44).
…taleness Covers matchFeatureBoardCardIdsByQuery, combineFeatureBoardVisibleCardIds, matchFeatureBoardCardsByFilters (each dimension + AND combination), useFeatureBoardSearchFilters end-to-end through the store, and the exported knownPullRequestFor merged-staleness rule reused by the PR-state filter. Refs #50
… test The WIP checkpoint's merged-PR test set a partial settings object directly against useAppStore.setState, which requires the full GlobalSettings shape. Cast to AppState['settings'], matching existing test precedent (e.g. browser-remote-tab-creation.test.ts). Refs #50
- Add a per-column "+" that opens an adoption dialog: name a new feature or link an existing GitHub issue/PR, declaring the pressed column's stage. - Ride the existing launchWorkItemDirect() Use-issue flow via a new pure decision function (feature-board-adoption-plan.ts) and a thin, injectable action seam (feature-board-adoption-action.ts) so dialog outcomes are testable without exercising the whole launch pipeline. - Extend LaunchWorkItemDirectArgs with an optional onWorktreeCreated hook so callers can declare state right after creation without re-deriving the id. - No changes to stage derivation: any linked open issue (including a grabbed [Spec]) already promotes idea/exploring to spec via the existing engine.
…48) - buildFeatureBoardAdoptionPlan: declares the pressed column regardless of a link, plain-name vs linked-issue/PR item shapes, and composes with the unmodified deriveWorkflowStage to show a linked [Spec] issue lands at spec via the existing engine. - runFeatureBoardAdoption: stage declared once the worktree exists, issue/PR attachment, and the composer-modal fallback path with no stage write. - parseFeatureBoardAdoptionLinkQuery: bare number, #-number, issue/pull URL, and rejection cases.
vi.fn() without an explicit generic infers Constructable|Procedure, which tripped typecheck under strict mode. Type both mocks explicitly and use satisfies to keep FeatureBoardAdoptionActionDeps as the contract.
…ores decideFeatureBoardCardDrop wraps the shared stage-authority gate (decideStageWrite, callerKind: 'human' from the board) so a drop's outcome — allowed/refused, the guard's own explanation, and the resulting meta write including the de-ship consumed-merge bookkeeping — is pure and directly testable. computeFeatureBoardColumnOrderAfterDrop is the per-project column-order math for persisting card position on drop. Refs #47
getFeatureBoardCardDropTarget resolves which column/index a pointer point targets, reusing the classic drawer's rect-math (lane hit-test, card index/indicator placement) and its shared drop-indicator DOM singleton — the board has no virtualization/pin-drop to special-case. Refs #47
Wires the checkpointed drop-decision/DOM-resolution primitives into a real pointer drag: use-feature-board-card-pointer-drag (single-card, reuses the classic drawer's preview/indicator DOM + start/ignore heuristics), and use-feature-board-card-drop (authority-gated commit: resolves current governing facts, calls decideFeatureBoardCardDrop as callerKind:'human', persists workflowStage + column order on success, toasts the guard's explanation on refusal). Also: - Generalizes workspace-kanban-card-drag-preview-dom.ts with a CardDragIdentity param so the feature board can reuse the preview/dragging-state DOM without duplicating it (classic drawer callers keep their default identity). - Extracts resolveWorkflowStageDerivationInputs from effective-workflow-stage.ts so the drop handler can reuse the same fact lookup independent of a particular declared stage. - Threads frozenColumnOrder through use-feature-board-columns.ts, owned by FeatureBoardPage and snapshotted at drag start / cleared at drag end. - Adds feature board column resize (useWorkspaceKanbanColumnResize reused as-is) with its own persisted featureBoardColumnWidth setting.
…-drop test Follow-up to #47: the dragged card must appear in its source column for the hook to find it, and the expected persisted order must include the dropped card at its drop index.
Matches the classic drawer's WorkspaceKanbanLaneGrid width templating instead of relying on React's implicit unit for the width CSS property. Ref #47.
useFeatureBoardCardDrop persisted the target column's order from the rendered (search/filter-narrowed) card list only. Dropping a card while a filter hid same-project siblings silently dropped their ids from the persisted per-project order — buildFeatureBoardColumns then treated them as unranked and bumped them to the bottom next time the filter cleared. Thread the full unfiltered card list into the drop hook so it can tell 'hidden by the active filter' apart from 'no longer a member of this stage', and restore hidden-but-still-valid ids into the freshly computed order, anchored to the visible neighbor they followed before the drop.
Fixes the 'Ref mutated during render' React Doctor error (Bugs category) flagged on PR #63 for spec #24. Three sites wrote to ref.current unconditionally during render: - FeatureBoardPage.tsx: columnsRef - use-feature-board-card-drop.ts: columnsRef/allCardsRef/repoMapRef - use-feature-board-card-pointer-drag.ts: onDropCardRef/ onDragActiveChangeRef/onDragTargetChangeRef All three refs are read only from native pointer-event handlers (pointermove/pointerup/pointercancel/blur) registered in an effect, which run long after render+effect flush completes, so switching the writes to useEffect(() => { ref.current = value }, [value]) cannot change which render's value a handler observes. This preserves the documented drop-order contract: the drop commit still reads the *pre*-unfreeze columns because the unfreeze state update (setFrozenColumnOrder(null)) is asynchronous and does not re-render synchronously before the drop's onDropCardRef.current(...) call. Also applies a small, low-risk Performance fix already used elsewhere in the codebase: array.toSorted() instead of [...array].sort() in applyAwaitingInputElevation. Ref: #24
64ix
marked this pull request as ready for review
August 24, 2026 22:21
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
Implements the Feature board: a first-class delivery-tracking view with 7 fixed pipeline columns (
idea → exploring → spec → implementing → review → shipped+triage), full card anatomy, authority-gated drag & drop stage declaration, an adoption "+" on every column, and search & filters.Built on the merged foundation specs — stage storage (#21), derivation (#22), authority (#23). The board and the classic kanban drawer are mutually exclusive: staged workspaces appear only here, unstaged ones only there. Ghost cards (#25), the archived sink and fade timing (#26), the task detail panel (#27), and sidebar stage groups (#28) remain owned by their own specs and are out of scope.
Spec & Tickets
Closes #24
Closes #44
Closes #47
Closes #48
Closes #50
Acceptance criteria
store/slices/ui.tsopenBoardPage;shared/top-level-view.tsFeatureBoardPage.tsx:116;feature-board-project-scope.test.tsfeature-board-view-model.ts:69; test "always returns all seven fixed columns"FeatureBoardCard.tsx(reusesWorktreeCard);feature-board-card-model.test.tsshared/feature-board-column-order.ts; 11 cases in its testfeature-board-view-model.ts:58; "drag freeze" suiteuse-feature-board-columns.test.tsxuse-feature-board-card-drop.ts; test "declares the target stage…"use-feature-board-card-drop.ts:78;feature-board-drop-handler.test.tsshippedand de-ship without re-shippingfeature-board-drop-handler.ts:86; test "records the consumed merge…"use-feature-board-card-pointer-drag.tsimports the drawer's DOM modules; drawer suite unaffectedfeature-board-drop-handler.test.ts(8 cases)feature-board-adoption-action.test.ts); composer-fallback gap belowFeatureBoardAdoptionDialog.tsx;feature-board-adoption-link-query.test.ts[Spec]lands atspecvia derivationfeature-board-adoption-plan.test.ts; no derivation change neededfeature-board-adoption-action.tscallslaunchWorkItemDirectfeature-board-search.tsreusesmatchWorkspaceBoardWorktreesfeature-board-filters.test.ts(4 dimensions + AND combination)FeatureBoardColumn.tsx:53; all 7 columns persist when filtered emptysearchWorktreeswithevidencePolicy: 'board'; mirrorsuseDeferredValue+ Set stabilizationChanges
Board view & navigation — new
boardTopLevelView, sidebar entry, store actions, routing inAppWorkspaceShell.tsx.Pure view-model —
feature-board-view-model.ts(column membership, order, awaiting-input elevation), project scope, card model. Kept pure so DnD, adoption, and filtering compose without redesign.Per-project card order (new) —
shared/feature-board-column-order.ts+ persistence. Spec #21 specified this model but no prior ticket built it; follows theapplyManualRepoOrderprecedent so stale ids are structurally never consulted.Drag & drop — reuses the drawer's pointer machinery (no new dnd-kit). Every drop passes the authority guard as
callerKind: 'human'; de-ship records the consumed merge so the old merge cannot re-ship. Shared helpers were generalized, not duplicated:CardDragIdentityon the drag-preview DOM, an extractedkanban-lane-drop-target-rects.ts, and a sharedresolveWorkflowStageDerivationInputs.Adoption — per-column "+" opening
FeatureBoardAdoptionDialog, ridinglaunchWorkItemDirect. No stage logic duplicated: derivation already promotes any open linked issue tospec, so[Spec]needs no title sniffing.Search & filters — render-time only, never persisted. Reuses the drawer's fuzzy ranked matcher and its re-render discipline.
Decisions & arbitration
callerKind: 'human'travels the same channel CLI/MCP/mobile callers use, so any agent could set it and defeat the fail-closedshippedguard. Instead the refusal surfaces throughupdateWorktreeMeta's{ ok, error }contract and is toasted, with the optimistic write reconciled away. Traced end-to-end through the RPC/IPC error chain during final review.Cross-unit bug found and fixed in integration review
Dragging a card while a filter was active corrupted the persisted column order. The drop handler wrote the new order from the rendered (filter-narrowed) card list, so same-project cards hidden by the filter were silently dropped from the persisted per-column order and bumped to the bottom once the filter cleared. Fixed by threading the unfiltered card list through and restoring hidden-but-valid ids anchored to their prior visible neighbor (
restoreHiddenFeatureBoardColumnOrderIds), with unit and integration coverage.Known gaps for human attention
askrepo lands unstaged (medium). The "+" falls back toNewWorkspaceComposerModal, which has no create-time stage slot, so the worktree is created without the pressed column's stage. Deeper than it first appears:submitQuick→runBackgroundWorktreeCreation→executeWorktreeCreationis fire-and-forget with no completion hook, so the fix needs new completion-event plumbing rather than a callback reuse. Deliberately left as a follow-up rather than attempted inside this PR.useFeatureBoardCardsis computed twice per render (low, harmless). Pure and deterministic; left alone to avoid churning Feature board skeleton: view, columns, cards, order #44's tested hook signature.QA plan
shippedshows the guard's explanation and the card revertsshippedde-ships it without the old merge immediately re-shipping[Spec]issue lands the card inspec