Skip to content

Planboard task completion can show another project's cards and start the wrong issue #1131

Closed

Description

@currentbits

Starting a task in project A and switching to project B before it completes can replace B's board with A's cards. Clicking a stale card then dispatches its issue number against B. This can start an unrelated issue when the same number exists there.

Reproduced

Mounted the real PlanboardView with deferred callbacks:

  1. Project A shows issue Sidebar: attach orchestration worker threads under their source thread #11. Click Start task and leave its promise pending.
  2. Select project B; its issue Render AskUserQuestion prompts as an option picker with keyboard shortcuts #22 appears.
  3. Resolve A's start successfully.
  4. Project selector still says B, but the board shows A/Sidebar: attach orchestration worker threads under their source thread #11.
  5. Clicking Sidebar: attach orchestration worker threads under their source thread #11 passes {projectId:"b",projectPath:"/tmp/audit-b",ref:"11"} to onStartTask.

No real agent was launched. Runnable assertion: node --import=./test/support/disable-grok-mcp.mjs --import=./test/support/render.mjs --experimental-strip-types docs/issue-drafts/2026-09-08-view-actions-evidence.mjs.

Cause and bounded fix

PlanboardView.tsx guards loads by invocation generation, but startTask retains A's load closure. Its post-await void load() runs after B's load and becomes the newest generation. Rendered cards then use the currently selected project's action context. App.tsx fetches the issue using that passed project path/ref.

Bind request results and task completion to the owning project/selection lifetime. An A completion must not refresh or overwrite B. Ensure a card's action project always matches the card's data. Reuse the existing generation guard; no new global state layer.

Acceptance

  • Deferred A start followed by A→B leaves B's cards, notes and pending state intact when A settles.
  • The same holds for failure, A→B→A, and removed projects.
  • Every Start task call uses the project that owns the displayed issue.
  • A successful A task is still recorded; switching does not cancel real work.
  • Add the deferred-promise regression covering the reproduced wrong-project call.

Duplicate check

#942 concerns returning from a thread with navigation state; #945 is Planboard search. Neither addresses a stale task completion overwriting another project's data or dispatching mismatched project/issue pairs. Separate from the rejected-promise recovery finding in this audit.

Audited at 6c7a6fb; PlanboardView's blob also matched the current default branch during verification. Parent audit #1130.

Activity

  1. added
    plan:todo
    plan:doing
    plan:done
    and removed
    plan:todo
    plan:doing
    on Sep 8, 2026
  2. currentbits commented on Sep 8, 2026

    @currentbits
    OwnerAuthor

    Bound start-task completion and card actions to the owning project. A deferred A start no longer overwrites B's cards/notes/pending state, and Start task always dispatches the project that owns the displayed issue. Regression in test/planboardView.test.tsx. Switching does not cancel the real start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions