fix(web): report queued prompt position - #399
Open
testikun wants to merge 2 commits into
Open
Conversation
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.
Problem
Related to #363. Existing Web prompt admission reports only that a prompt was accepted. During a long active turn, a follow-up can be queued, but the browser has no canonical queue-position evidence and must guess from local state. This complements PR #364's running-state fix, PR #377's request timeout, and PR #370's connection recovery.
Value
Makes queued follow-up admission observable from Pi-owned runtime state, so clients can distinguish immediate admission from queued work without adding a second browser state machine.
Approach
WebPromptAdmissionReceiptwithqueuedandqueuePosition.prompt_acceptedSSE event.Validation
biome format/biome lint --error-on-warnings: passed.tsc --noEmit: passed.queuePositioncaused three admission/host regression tests to fail and removed the required queue evidence; the field was restored.bunis not installed in this environment, so equivalent repository scripts were run with the bundled Node 24 executable and local Biome/Vitest binaries.Impact