Repository navigation
fix(web): re-read open decisions when a run parks on an approval - #99
Merged
Merged
Conversation
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
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Triage will approve, request review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:useProjectRunStatespolls each live run's state (every 5 s while any run is live, else every 10 s);heldOnApprovalreduces 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.