fix(chat): show promoted queue messages as persisted user turns - #3220
Merged
Merged
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.
Summary
Promoting a queued message during execution now starts a normal persisted user turn at the next safe round boundary. Mobile history and the desktop turn rail receive the same canonical user message, including after reconnect. Already-started tool output stays on the preceding turn.
Make the mobile Stop control circular, keep it in the rightmost action slot, and align it with queue Info and Remove controls.
Type and Areas
Bug fix / UI/UX; shared runtime scheduler and execution, mobile web.
Motivation / Impact
Previously queue steering became an inline reminder, missing from mobile history and desktop turn navigation. The scheduler now preserves the original queued payload/turn ID, transfers accepted promotions in order, and starts them without requiring a connected controller. Stop/failure retains unconsumed messages for explicit recovery. Goal usage is accounted without inserting automatic continuation ahead of accepted user input; a successful handoff is not recorded as failed merely because it has no final answer.
Keep the existing turn-scoped SDK steering contract used by CLI/Dispatch inline. A receipt-locked drain separates those inputs from host queue promotions, including concurrent admission. No wire or persisted schema changes; legacy controllers/hosts retain their existing paths.
Verification
cargo test --locked -p openbitfun-core --no-default-features --features remote-connect,git --lib agentic::coordination:: -- --skip remote_session_metadata_never_falls_back_to_a_local_workspace_binding.pnpm --dir src/mobile-web run test:host-queue(16),test:host-stream(17),test:session-stream-browser(2) passed. Transcript replay preserves message ownership and deduplicates reverse-order delivery.pnpm run check:web, mobile type-check/build, andpnpm run theme:color-audit:allpassed.The skipped remote-workspace test also fails on unmodified upstream main
0b7770b4cwith the same minimal feature set; it is not hidden or disabled in source/CI.Reviewer Notes
Remote-control coverage uses simulated host streams plus real Chrome/IndexedDB close/reopen and reconnect. No live phone/server, SSH-workspace, Peer Device, or Detached Dispatch end-to-end run is claimed. SDK compatibility is covered at the shared boundary rather than changing those consumers. Pending host queue entries retain the existing host-process-lifetime guarantee; this does not add restart durability.
Checklist