Repository navigation
fix(web): show a run held on an approval as paused, not at work - #100
Merged
Merged
Conversation
A coder waiting on a package-install approval is still mid-turn, so the hub reported it as working and the page kept its last activity line, "Running a quick check", with the clock counting, for as long as the person left the approval unanswered. The hub now reports an in-flight run with a pending approval in a third state, approval, beside working and waiting. The hand-off's line reads "Paused for your approval" with no shimmer and no clock, its step shows "Waiting for you", and its work still counts as current so a document it builds from is protected from edits. Closes #63
|
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 #63
What changed
packages/schemas/src/artifact.ts:InFlightRun.stategainsapprovalbesideworkingandwaiting, for a run that is mid-turn but held on an approval only the person can give.apps/hub/src/artifacts/service.ts: the project room reports a live run asapprovalwhen it has a pending approval record, instead of reading its activity as work.apps/web/src/pages/workspace/dispatch-card.tsx:DispatchStatusgainsapproval;dispatchStatusmaps the run state to it, anddispatchLivecounts it as current work so a document the run builds from stays protected.apps/web/src/pages/workspace/work-unit.tsandwork-unit-view.tsx: the hand-off's own step shows "Waiting for you" (approval-requested), the live line reads "Paused for your approval" with no shimmer and no elapsed clock, and the message no longer streams.apps/web/src/config.ts: the new wording.apps/web/src/pages/workspace/dispatch-status.test.ts: covers the status mapping, liveness, and the step status.Why
A coder waiting on a package-install approval is still mid-turn, so the hub reported it as working and the page kept its last activity line, "Running a quick check", with the clock counting for as long as the person left the approval unanswered. Nothing on the page said the run was waiting on them.
How it was verified
./node_modules/.bin/tsc --noEmit -p .and-p apps/webpass.bun --conditions=intx-src test apps/web/src/pages/workspacepasses (22 tests, including the new file) andapps/hub/src/artifactstests pass.oxlint --deny-warningsand Prettier pass on the changed files.