Skip to content

fix(dashboard): show "Needs You" when an agent parks on a frontend tool#552

Closed
adrienlacombe wants to merge 2 commits into
Th0rgal:masterfrom
adrienlacombe:fix/question-mission-needs-you
Closed

fix(dashboard): show "Needs You" when an agent parks on a frontend tool#552
adrienlacombe wants to merge 2 commits into
Th0rgal:masterfrom
adrienlacombe:fix/question-mission-needs-you

Conversation

@adrienlacombe

Copy link
Copy Markdown
Contributor

Summary

When an agent calls a frontend tool (AskUserQuestion / question / ui_*), the runner pauses the turn and sets the control run state to waiting_for_tool, but the mission's stored status stays active and the backend still lists it among running missions. The board flattened the running list into a single id set, and categorizeMission returns Running for any mission in that set (before the needs-you check) — so a mission blocked on a user question was shown as Running instead of Needs You.

Fix

The backend already exposes the distinction via RunningMissionInfo.state. The board now:

  • tracks waiting_for_tool missions in a separate set,
  • keeps them out of the genuinely-running set, and
  • categorizes them as Needs You.

The shared categorizeMission(s) helpers gain an optional waiting-for-tool input that takes priority over Running. mission-switcher / control-client already read the live run state and distinguish waiting_for_tool, so only the board needed the change.

Test plan

  • tsc --noEmit clean on touched files; eslint clean.
  • Unit tests pass (27), including 2 new cases: categorizeMission(..., isWaitingForTool=true)needs-you, and categorizeMissions placing a waiting-for-tool mission in needs-you while a genuinely-running one stays in running.
  • Verified live on an AWS test box. Triggered AskUserQuestion in a real mission; /api/control/running reported the mission with state: "waiting_for_tool" while its stored status stayed active. Applying the categorization to that live data: before the fix → running, afterneeds-you.
  • Eyeball the board in a browser to confirm the parked mission renders under the Needs You column.

UI change — please give the board a quick visual review before merging.

🤖 Generated with Claude Code

adrienlacombe and others added 2 commits June 12, 2026 17:50
- AGP 8.9.1 → 9.2.1 (built-in Kotlin: drop the standalone
  org.jetbrains.kotlin.android plugin; migrate kotlinOptions →
  kotlin.compilerOptions), Gradle 8.11.1 → 9.5.1, compileSdk 36 → 37
  (targetSdk stays 36 — no runtime behavior change)
- Kotlin 2.0.21 → 2.4.0, which unpins kotlinx-coroutines 1.9.0 → 1.11.0
  and multiplatform-markdown-renderer-m3 0.26.0 → 0.41.0
- Compose BOM 2024.12.01 → 2026.05.01, core-ktx 1.19.0,
  kotlinx-serialization 1.7.3 → 1.11.0, OkHttp 4.12.0 → 5.4.0
- markdown-renderer ≥0.27 moved code/inline-code/link text colors out of
  markdownColor into typography; restyle via markdownTypography in
  ControlScreen and AskSheet with identical palette values

Verified: assembleRelease, lintDebug, and testDebugUnitTest all pass on
JDK 17 (matches CI's temurin 17).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When an agent calls a frontend tool (AskUserQuestion / question / ui_*),
the runner pauses the turn and sets the control run state to
`waiting_for_tool`, but the mission's stored status stays `active` and the
backend still lists it among running missions. The board flattened the
running list into a single id set and `categorizeMission` returns
"Running" for any mission in that set — so a mission blocked on a user
question was shown as Running instead of Needs You.

Track `waiting_for_tool` missions separately on the board, keep them out
of the genuinely-running set, and categorize them as Needs You (the
backend already exposes the distinction via `RunningMissionInfo.state`).
The shared `categorizeMission(s)` helpers gain an optional
waiting-for-tool input that takes priority over Running.

mission-switcher / control-client read the live run state directly and
already distinguish `waiting_for_tool`, so only the board needed the fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

@adrienlacombe is attempting to deploy a commit to the LFG Labs Team on Vercel.

A member of the Team first needs to authorize it.

@Th0rgal

Th0rgal commented Jun 17, 2026

Copy link
Copy Markdown
Owner

bugbot run

@Th0rgal

Th0rgal commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Superseded by #556, which keeps your dashboard commit (@adrienlacombe) and (1) drops the bundled Android toolchain/dependency upgrade so it can land on its own, and (2) fixes a Cancel→Delete regression — excluding waiting_for_tool from the running set also flipped a parked (live) mission's card action to Delete, so it could be deleted instead of cancelled. #556 offers Cancel whenever the harness is alive. If you'd rather keep this PR and split the Android upgrade out, say so and I'll close #556 instead.

@Th0rgal Th0rgal closed this Jun 17, 2026
Th0rgal added a commit that referenced this pull request Jun 17, 2026
…ol (supersedes #552) (#556)

* fix(dashboard): show "Needs You" when an agent parks on a frontend tool

When an agent calls a frontend tool (AskUserQuestion / question / ui_*),
the runner pauses the turn and sets the control run state to
`waiting_for_tool`, but the mission's stored status stays `active` and the
backend still lists it among running missions. The board flattened the
running list into a single id set and `categorizeMission` returns
"Running" for any mission in that set — so a mission blocked on a user
question was shown as Running instead of Needs You.

Track `waiting_for_tool` missions separately on the board, keep them out
of the genuinely-running set, and categorize them as Needs You (the
backend already exposes the distinction via `RunningMissionInfo.state`).
The shared `categorizeMission(s)` helpers gain an optional
waiting-for-tool input that takes priority over Running.

mission-switcher / control-client read the live run state directly and
already distinguish `waiting_for_tool`, so only the board needed the fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(dashboard): keep Cancel (not Delete) for missions parked on a frontend tool

Follow-up to the cherry-picked "Needs You" fix (superseding #552). Excluding
waiting_for_tool missions from runningMissionIds correctly recategorizes them as
"Needs You", but it also flipped their card action from Cancel to Delete — a
live, mid-turn (parked) mission could be deleted outright instead of cancelled.
Offer Cancel whenever the harness is alive (running OR waiting_for_tool).

---------

Co-authored-by: adrienlacombe <6303520+adrienlacombe@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants