Skip to content
This repository was archived by the owner on Sep 2, 2026. It is now read-only.

[Spec #27] Task detail panel - #65

Merged
64ix merged 25 commits into
mainfrom
spec/27-task-detail-panel
Aug 25, 2026
Merged

64ix merged 25 commits into
mainfrom
spec/27-task-detail-panel

Conversation

@64ix

@64ix 64ix commented Aug 25, 2026 •

Copy link
Copy Markdown
Owner
Files Added Deleted Net
Test 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1179 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1177
Prod 19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1630 $\color{#cf222e}{\Huge{\mathbf{−}}}$​38 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1592

Summary

Implements the task detail panel: a board-attached inspector that opens when a card is clicked and closes when the card disappears. It gathers, in one place, everything a card used to hide — vitals (branch, agent state, diff stats), the conversations that touched the worktree (live agent panes and AI Vault transcripts, united), the stage selector with the authority guard's explanations, and a PR link/unlink row.

Built on the merged foundation specs — board skeleton (#24, #44) and stage authority guard (#23, #39). The right sidebar stays terminal-bound; this panel is ephemeral and board-scoped, so it never points at a ghost.

Spec & Tickets

Closes #27
Closes #52
Closes #54
Closes #55

Acceptance criteria

#52 — skeleton, vitals, lifecycle

Criterion Verdict Evidence
Clicking a card opens the panel; switching selection updates it Pass ui-board-card-detail.test.ts; use-task-detail-panel-selection.test.tsx
The panel closes when its card disappears from the board Pass task-detail-panel-selection.test.ts (pure resolver), use-task-detail-panel-selection.test.tsx (hook)
Vitals render branch, agent state, and diff stats Pass task-detail-panel-view-model.test.ts — buildTaskDetailVitals, incl. folder-workspace (no branch) and every diff-stats status
The right sidebar remains terminal-bound (no regression) Pass No change to right-sidebar code in the diff; panel state lives in its own boardCardDetailId

#54 — conversations

Criterion Verdict Evidence
Rows union live agent entries and vault transcripts matched by worktree path Pass task-detail-conversation-rows.test.ts — union, worktree-path matching, and the dedupe rule (a transcript whose original pane is live is that row's history, so the live row wins)
Each row shows provider icon, editable title, and live state Pass task-detail-conversation-row.test.tsx; icon via the shared AgentIcon, state via AgentStateDot
Focus jumps to the live session's tab Pass task-detail-conversation-row.test.tsx — delegates to activateTabAndFocusPane
Resume continues a vault transcript into the worktree Pass task-detail-conversation-row.test.tsx — reuses the existing AI Vault resume flow; disabled when the transcript is not resumable
Rename, dismiss, and delete work per row Pass task-detail-conversation-row.test.tsx; live rename → updateTabTitle, vault rename → ephemeral override (see Decisions), dismiss → dropAgentStatus/dismissRetainedAgent, delete → existing vault delete action

#55 — stage selector & PR row

Criterion Verdict Evidence
The selector renders the governing fact's explanation for the current stage Pass task-detail-panel-stage-selector-model.test.ts; TaskDetailPanelStageSelector.test.tsx
Locked options explain themselves Pass task-detail-panel-stage-selector-model.test.ts — open PR, closed PR, and open issue each produce their own lock reason; component test asserts the disabled item renders it
shipped reads as human-or-fact in the selector Pass model tests (fact-driven with the merged PR number vs. human-set); TaskDetailPanelStageSelector.test.tsx asserts both rendered strings
PR link/unlink works from the panel via existing flows Pass TaskDetailPanelPrRow.test.tsx — link by number and by URL, invalid input, and unlink across provider slots; writes through updateWorktreeMeta
Selector gating delegates to the authority guard (no duplicated rules) Pass Every candidate's allowed/effectiveStage comes from decideFeatureBoardCardDrop → decideStageWrite → deriveWorkflowStage; the write path uses the same delegate with callerKind: 'human', preserving the de-ship bookkeeping from #47

Changes

Panel shell, selection, lifecycle

  • TaskDetailPanel.tsx — fixed-width board-attached inspector; FeatureBoardCard/FeatureBoardPage select on click (capture-phase stopPropagation keeps the board open).
  • task-detail-panel-selection.ts + use-task-detail-panel-selection.ts — pure presence resolver plus its hook: when the selected card leaves the board, the panel closes.
  • store/slices/ui.ts — ephemeral boardCardDetailId, cleared when the board closes.

Vitals

  • task-detail-panel-view-model.ts — pure buildTaskDetailVitals: branch (null for folder workspaces), agent states in a deterministic display order, and diff stats projected from the existing branch-compare summary.

Conversations

  • task-detail-conversation-rows.ts — pure union of live panes and vault transcripts, matched by worktree path, deduped so a live pane's own transcript doesn't double-render.
  • use-task-detail-conversations.ts — wiring: scoped vault listing, live rows, and the five row actions.
  • task-detail-conversation-row.tsx / task-detail-conversations-section.tsx — the row UI, reusing the existing agent-row and vault-row patterns.

Stage selector & PR row

  • task-detail-panel-stage-selector-model.ts — pure projection: current stage, why it's held, per-option lock reasons, and the shipped human-or-fact split. Gating comes from the guard; the copy is localized from the structured derivation reason.
  • use-worktree-stage-derivation.ts + use-task-detail-panel-stage-change.ts — shared derivation hook and the write path through the board-drop delegate.
  • TaskDetailPanelStageSelector.tsx — built on the shadcn DropdownMenu primitive.
  • TaskDetailPanelPrRow.tsx + linked-review-slot-input.ts — link/unlink only, routed by provider slot. No assign/unassign: Orca's model has no Assigned PR (most-recent-activity-wins, spec 2).

Localization

  • 45 new components.featureBoard.panel.* entries, including one key per governing-fact reason.

Decisions

  • Problem: the authority guard's explanation field is hardcoded English prose intended for logs and toasts, never localized. Rendering it in the panel would ship untranslated copy and trip the localization gates. → Resolution: the view-model reads the structured DerivedWorkflowStage.reason/factId and translates per case, mirroring feature-board-stage-labels.ts. Gating still comes exclusively from decideFeatureBoardCardDrop, so no rule is duplicated.
  • Problem: AiVaultSession has no rename surface — no title-override field, no IPC; transcript titles come from parsing. The ticket asks for an editable title on every row. → Resolution: live rows rename through the existing tab-level updateTabTitle; vault rows use an ephemeral renderer-side override keyed by session id, documented at its declaration as such rather than inventing new persistence.
  • Problem: the only manual PR-link parser in the app is GitHub-only, though the meta model has five provider slots. → Resolution: linking accepts what the existing flow accepts, while display and unlink are provider-agnostic across all five slots.
  • Problem: the row menu's Rename item was a silent no-op — it reached for the title element with document.querySelector(...).click(), but that selector matched the wrapping <span> rather than the inner <button> holding the handler, and a DOM click bubbles up from its target, never down into descendants. → Resolution: the editing state was lifted into the row item and EditableTitle made a controlled component, so no DOM querying is involved.
  • Problem: live-row renames had no visible effect — the title map was declared but never populated, so titles always fell back to the generated primary text. → Resolution: it is now derived from each row's tab via the shared getAgentRowConversationName, following the same precedence the sidebar and dashboard rows use. Simplification recorded: this panel lists whole sessions, so it does not carry the split-pane per-leaf title handling of the full hook.
  • Known limitation: vaultConversationTitleOverrides has no teardown purge, because it is keyed by vault session id rather than by pane or worktree — a renamed transcript's title should survive a worktree being removed and re-added, just as the transcript itself does. The map can therefore grow unbounded over very long app lifetimes. Non-blocking, recorded rather than papered over.
  • Problem: vault rows initially rendered a fabricated done state for transcripts with no live pane. → Resolution: absent liveness now renders as absent rather than as a completed agent.

QA plan

  • Click a card on the feature board → the panel opens on the right, headed by the workspace name. Click a different card → the panel switches to it without closing.
  • With the panel open, archive or remove the selected card → the panel closes rather than showing a stale card.
  • Open the panel on a git worktree → Branch shows the branch name (hovering reveals the full ref), Agent shows live states or "No active agent", Diff shows "N files changed vs ".
  • Open the panel on a folder workspace → Branch reads "Folder workspace — no branch" instead of an empty value.
  • Open the panel on a worktree that has both a running agent pane and older AI Vault transcripts → one row per session, each with its provider icon; the running one shows a live state dot, and the running pane's own transcript does not appear twice.
  • Click Focus on a live row → the app switches to that session's tab with the pane focused.
  • Open the row menu on a vault row → Resume in worktree starts that transcript in this worktree; Resume is disabled for a transcript that isn't resumable.
  • Rename a live row → the tab title changes too. Rename a vault row → the new title shows in the panel.
  • Dismiss a live row → it leaves the list. Delete a vault row → confirmation appears, then it leaves the list.
  • Open the panel on a card whose worktree has an open PR → the stage section explains that the open pull request holds the stage at review, and stages the declaration cannot reach are disabled with their own explanation.
  • Open the panel on a card shipped by a merged PR → the stage section reads "set by merged PR #N". Set shipped by hand on a card with no merged PR → it reads "set by you".
  • Pick an unlocked stage from the selector → the card moves on the board. De-ship a merge-governed card → it stays where you put it and does not snap back to shipped.
  • Type a PR number, then a PR URL, into the PR row → both link. Type nonsense → an inline error, no write. Click Unlink → the link clears.
  • The right sidebar still follows the terminal's active worktree, unaffected by which card is selected on the board.

64ix added 22 commits August 25, 2026 08:23
…presence lifecycle (#52)

- Store: ephemeral boardCardDetailId selection (open/close, cleared on board close)
- Panel: fixed-width TaskDetailPanel with branch/agent-state/diff-stats vitals
- Lifecycle: pure resolver + hook close the panel when the card leaves the board
- Cards select on click (capture-phase stopPropagation keeps board open)
Fixes a type error where the sort comparator on the vault-only row list
was typed as the full TaskDetailConversationRow union, hiding the
.session field behind the live-row branch.
…vation (#54)

Live rows previously always showed getAgentRowPrimaryText(entry), so a
rename via setTabCustomTitle had no visible effect: titleByPaneKey was
declared as a param but never populated. Build it from each row's tab
via the same getAgentRowConversationName precedence sidebar/dashboard
rows use (manual rename > quick-command label > generated title >
live title), so a rename reliably changes what the row displays.
…ename (#54)

startRename clicked the wrapping <span data-conversation-title>, not the
inner title <button> that owns the click handler — a DOM .click() only
bubbles up from the target, never down into a descendant, so the menu's
Rename item was a silent no-op. Lift editing state into the row item and
drive EditableTitle as a controlled component instead.

Adds task-detail-conversation-row.test.tsx covering focus/rename/dismiss
(live rows) and resume/delete/resume-disabled (vault rows), mirroring
AiVaultSessionRow.test.tsx's menu-interaction pattern.
…red reason, not guard's raw English (#55)

The authority guard's decideStageWrite/decideFeatureBoardCardDrop builds its
explanation string as hardcoded English sentences meant for logs/toasts, not
UI copy. The stage-selector view-model rendered that string directly, which
would fail localization gates and never translate. Build the selector's
current-stage and per-option explanations from the structured
DerivedWorkflowStage.reason/factId instead (the same data the guard derives
from), translated per case like feature-board-stage-labels.ts. Gating
(allowed/effectiveStage) still comes exclusively from
decideFeatureBoardCardDrop, so no rule is duplicated.
# Conflicts:
#	src/renderer/src/components/feature-board/task-detail-panel/TaskDetailPanel.tsx
#	src/renderer/src/i18n/locales/en.json
…tage selector (#55)

Recovers the two ticket #55 commits that landed after the branch was merged:
the component-level human-or-fact assertions, and the docstring correction the
localization fix left stale (explanations now come from the structured
derivation reason, not the guard's raw English).
@64ix
64ix marked this pull request as ready for review August 25, 2026 10:32
64ix added 3 commits August 25, 2026 16:17
… shared truncate-tooltip, click-time stage guard facts
…anel

# Conflicts:
#	src/renderer/src/components/feature-board/FeatureBoardCard.tsx
#	src/renderer/src/components/feature-board/FeatureBoardPage.tsx
@64ix
64ix merged commit 1a0a653 into main Aug 25, 2026
47 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

1 participant