Skip to content

fix(web): re-read open decisions when a run parks on an approval - #99

Merged
brianjfox merged 1 commit into
mainfrom
fix/poll-open-decisions-main
Nov 2, 2026
Merged

brianjfox merged 1 commit into
mainfrom
fix/poll-open-decisions-main

Conversation

@brianjfox

Copy link
Copy Markdown
Contributor

Closes #62

What

Reads the open decisions again when a run parks on an approval, so a coder's package request shows without a reload.

Why

A coordinator decision arrives with a room event, which already refreshes the open decisions. A coder's package request raises no room event, so the card appeared only when something else moved the room, or on reload. Details in #62.

Changes

  • apps/web/src/pages/workspace/agent-activity.tsx: useProjectRunStates polls each live run's state (every 5 s while any run is live, else every 10 s); heldOnApproval reduces the states to the runs held on an approval, as one string an effect can depend on.
  • apps/web/src/pages/workspace/index.tsx: the effect that invalidates the activity and open-decision queries on a room move now also runs when that string changes, so the decisions query refetches the moment a run parks on an approval.

Replaces #64, which was written before main read open decisions through TanStack Query.

A coder's package request raises no room event, so the workspace page
read the open decisions only on a room reload and the person saw no card
until they reloaded the page, while the coder waited on them.

Poll the project's run states while any run is live and read the open
decisions again whenever the set of runs held on an approval changes.

Closes #62
@corbits-triage

corbits-triage Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Triage will approve, request review.

@brianjfox
brianjfox added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit c38623a Nov 2, 2026
9 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.

Coder package approvals never appear until the page is reloaded

1 participant