Skip to content

fix(shift-manager): Shift Coordinator lists active tasks, folds done and errored (FIX-1962) - #3283

Merged
jhoffner merged 3 commits into
mainfrom
claude/project-thread-d6sot5
Oct 13, 2026
Merged

jhoffner merged 3 commits into
mainfrom
claude/project-thread-d6sot5

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Jake · project thread

Linear: FIX-1962 · epic FIX-1958 (Shift Manager release candidate, polish only)

Before: the Shift Coordinator's TASKS panel listed every task its conversation ever filed. The conversation lasts the whole shift, so the list only grew.

After: it lists the active tasks only. Done tasks (completed and cancelled) fold into a closed N done group and errored tasks into their own closed N errored group; each opens to its tasks on click. When nothing is active it says "No task is active." A workstream's Board (Project → Board) still lists all of its tasks, since they are the parts of the one piece of work that workstream is about.

How: TasksPanel takes an activeOnly prop, set only at the Shift Coordinator call site (ChiefOfStaff.tsx). Grouping uses the existing isDone / readStatus helpers from lib/columns. Polling is unchanged. README's TASKS paragraph is updated.

Calls I made (flag if you disagree)

  • Done stays reachable, collapsed. The issue left open whether completed tasks are kept beyond a summary. They show only as a closed count by default, which is "active only" at a glance; dropping the expander later is a one-line change.
  • "Task-focused session" = a workstream's board. That is the other place this panel draws, and the only one whose tasks are subtasks of one piece of work, so it keeps the full list.
  • Route: the issue has no category label; I took it as a polish bug and went straight to the PR (no spec), since it is one component and a prop.

Verification

  • test/conversation-tasks-panel.test.tsx: new tests for active only with done and errored groups opening to their tasks, the none-active state with no empty group, and the workstream board staying whole. The active-only tests fail with the component change reverted, and pass with it.
  • pnpm --filter @flow-state-dev/shift-manager typecheck clean.
  • Full shift-manager suite: 446 passed, 6 failed. The same 6 (checkout, command, project-workstreams) fail identically on main in this sandbox (credentials/built assets), so they're environmental, not this change.

Changeset: .changeset/coordinator-tasks-active-only.md (patch).

🤖 Generated with Claude Code

https://claude.ai/code/session_01CRPL9QknXDpXpC7rgXcMtB


Note

Low Risk
UI-only filtering in TasksPanel with a single new call-site prop; polling and task reads are unchanged.

Overview
Shift Coordinator TASKS no longer grows with every task filed over a long-lived conversation: it surfaces active tasks only (pending / in_progress), with ended work tucked into collapsible N done (completed + cancelled via isDone) and N errored groups that expand on click. When nothing is in flight it shows "No task is active."

TasksPanel gains optional activeOnly (default off); ChiefOfStaff enables it for the coordinator right panel only. Workstream boards keep the full list unchanged. README and a changeset document FIX-1962; tests cover grouping, empty-active state, and non-activeOnly behavior.

Reviewed by Cursor Bugbot for commit a6fe11a. Configure here.

…and errored (FIX-1962)

The coordinator's conversation lasts the whole shift, so its TASKS panel
grew with every task it ever handled. It now lists only active tasks and
folds the done ones and the errored ones into two closed groups, each a
count that opens to its tasks. A workstream's Board keeps the full list.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRPL9QknXDpXpC7rgXcMtB
@jhoffner jhoffner self-assigned this Oct 13, 2026
@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

FIX-1962

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 13, 2026 11:39pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 13, 2026 11:39pm UTC
flow-state-dev-ui Ignored Ignored Preview Oct 13, 2026 11:39pm UTC

Request Review

@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 8d66e9ec-562f-48bb-b4a8-d6bf138062c9)

Copy link
Copy Markdown
Collaborator Author

Second look + architecture pass

Verdict: the approach is right-sized. No better shape, and no refactor worth riding on this PR. A one-component, one-prop change at a single call site is the leanest way to do this. The alternatives I weighed (filtering in readConversationTasks, or a separate ActiveTasksPanel) either leak a UI concern into the read layer or duplicate the poll loop. Polling, the open-state persistence across polls (the Collapsible stays mounted across setRead), and parked staying visible as "needs you" all check out.

Small items for the implementing agent to take or leave:

  1. Partition once, don't keep three predicates in sync (TasksPanel.tsx ~L125-127). active is defined as !isDone && !isErrored, a negation of the other two filters. If columnFor ever gains a status, the three can drift apart. A single pass, or deriving active from what is left after done/errored, removes that. Optional, local.
  2. isErrored belongs beside isDone in lib/columns.ts. That file is where status predicates live, and TaskFrame.tsx and derive.ts already import isDone and readStatus from there. Moving it keeps one home for "what a status means". Only worth doing if you touch the file anyway; don't widen the PR for it.
  3. Missing test on the path most likely to regress (BP-003 / BP-035 legacy-state path). None of the four tests asserts that a parked task, or a legacy stored awaiting_review, stays in the active list. That is the whole reason readStatus is used in isErrored. Add one row of each to mixed (or a short separate test). Without it, someone could fold "needs you" work into a closed group and every test would still pass.
  4. Unrelated to this PR, noted only: isDone's doc comment ("Tasks leaves these out (BR-15)") is the only place that explains the done/active split. It could mention that the Shift Coordinator panel now applies it too. Skip it if you'd rather not touch the file.

No security, transport, or persistence concerns. The "Calls I made" in the description are reasonable (done stays reachable but collapsed; workstream board stays whole).


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Snob. A smaller shape is on #3287 (poc/shorter-active-task-groups @ 02f47f153). Fold that subtraction into this PR, then close the POC unmerged after this lands. The POC does not merge.

Drop the new file-header paragraph in TasksPanel.tsx. The activeOnly line and the README already say it. Drop the comments on isErrored, TaskGroup, and TaskList; they restate the next line. TaskGroup takes one name. label and group were the same word. The closed-list check is the first assertion of the fold test, so the separate "lists only the active tasks" test goes.

Net −15 against ebdd375. test/conversation-tasks-panel.test.tsx passed, 11 tests.

Left as recorded: activeOnly at the Shift Coordinator call site, done collapsed and still openable, the workstream board listing every task, isErrored file-local, the three filters (a single pass is more lines), the README paragraph, the none-active test, and the flag-off test. No changeset.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Code Snob

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplify pass (FIX-1962)

Problem: The Shift Coordinator conversation never ends, so the TASKS sidebar kept growing with every completed task. Fix: activeOnly on TasksPanel, wired only from ChiefOfStaff; workstream boards in Project.tsx stay on the default full list. That split matches the README and the tests.

Is this the right shape?

I considered a few alternatives; none clearly beats what you shipped for this scope:

Alternative Trade-off
Separate CoordinatorTasksPanel vs workstream panel Avoids a mode flag but duplicates the fetch/poll/standing/refresh effect unless you extract a shared hook first — more files for the same behavior.
Fold at listTasks / readConversationTasks Would shrink payloads and poll work on huge boards, but there is no server filter today and folding is purely presentational; bigger API/product change.
Reuse derive.openRows / Tasks screen helpers Same isDone rule, but no errored bucket and different “active” semantics than isOpen (polling). Partitioning here is appropriate.
Extract shared collapsible from ToolLine.QuietLine Would DRY the chevron + Radix pattern; optional follow-up, not worth blocking — only two call sites today.

The activeOnly boolean on one component is a reasonable local minimum: one implementation of polling, two render paths, explicit call-site intent (ChiefOfStaff vs Project).

Complexity check

  • Not over-built: TaskList / TaskGroup extraction is justified (active block + two folds + default path). Radix Collapsible + existing lucide chevron matches established shift-manager UI imports (@/components/ui/*).
  • Pre-existing limit (optional follow-up, not a blocker): folding hides DOM but each poll still loads and diffs the full listTasks list and runs standing() over all rows. For very long coordinator histories, narrowing fetch or diff scope in activeOnly mode would be the next lever — out of scope for this UI fix.

Verification

pnpm exec vitest run test/conversation-tasks-panel.test.tsx — 12/12 passed on claude/project-thread-d6sot5.

Verdict: Approve. Optional nits inline; none require rework before merge.

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRPL9QknXDpXpC7rgXcMtB
@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 4343aca3-bdb6-4bab-9402-46ece33901a3)

@jhoffner

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T23:36:12.628682Z 114b287 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 114b287c82

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRPL9QknXDpXpC7rgXcMtB
@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 5fa73572-c7c0-42d3-a181-00224c071bab)

@jhoffner
jhoffner merged commit ced18fa into main Oct 13, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants