fix(webui): promote provisional router cards - #1502
Open
mikemikimike 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.
Fixes #1477
Summary
When ensemble progress or handoff arrives before the real router decision, the Web UI creates a provisional router card. The later decision was appended under a new sequence-backed message ID, so one route attempt could render duplicate cards.
This change promotes only a runtime-created provisional card when the session, exact turn, and router replay generation match. Promotion updates the decision and message identity in place while retaining ensemble members and existing message metadata, including physical execution state supplied by compatible runtime changes. Router-control replay boundaries, distinct turns, and already-real decisions remain separate.
Tests
npm run test:unit -- src/composables/chat/useChatRouterDecisionRuntime.test.ts(24 passed)npm run typecheck(passed)npm run build(passed, including artifact and bundle validation)uv run --frozen ruff check src tests(passed)uv build --wheel(passed)npm run test:unit(401 files / 5086 tests passed; the suite emitted existing localhost:3000 connection-refused activity and required process cleanup after the passing summary)uv run --frozen pytest -q(1437 passed, 66 skipped, 6 failed in migration tests because Windows default GBK could not decode migration source files; the changed Web UI files are outside those paths)Third-party origin
None.