Repository navigation
feat(dashboard): Mock composer and Quick question sends - #2829
Merged
Merged
Conversation
In mock reporting, a send from the composer or a Quick question now gets a fixed reply instead of falling through to the real API, which ran an agent and then could not show the Conversation. A send shows a working Turn for 2 seconds, then the reply, so the transcript states can be checked without an agent run. Co-Authored-By: bete <28983162+betegon@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c6ade52. Configure here.
Copy the end of each Turn that the fork history includes, like a real fork, so a fork at a reply has no open Turn.
Contributor
|
12 screenshot changes — 12 changed · 0 added · 0 removed Review screenshots in Frameshift Show 6 more changed screenshots |
betegon
approved these changes
Nov 6, 2026
This branch was successfully deployed
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.

With
JUNIOR_DASHBOARD_MOCK_CONVERSATIONS=true, sending a message from the composer or a Quick question broke:POST /api/conversationswent to the real API. That ran a real agent ("Hi! I'm Junior Example…"). Then the mock detail route returnedConversation not found., because it only knows the fixtures.400).403 You do not have access to this conversation.Now mock reporting handles these sends itself (
mock-reporting/sends.ts), and no agent runs:POST /conversations,POST /conversations/:id/messages,POST /conversations/:id/forks, andPOST /conversations/:id/quick-question/keepsave the send in process memory, like the mock archive and pin state.status: active, "is thinking…") for 2 seconds. Then it shows a fixed reply that quotes the message, so you can check both transcript states. The client already polls active conversations every 2 s.webMessageId, the same as the real API, so the composer outbox matches the transcript. Retries with the same key returnduplicate.forks.resetMockDashboardStateclears the sends.Out of scope: Stop during the 2 s working state still goes to the real API. Image attachments are accepted, but the mock reply shows only the text.
Local QA
HOST=0.0.0.0 JUNIOR_DASHBOARD_MOCK_CONVERSATIONS=true pnpm dev, checked in the browser at 1280×800:Validation
vitest run tests/dashboard-mock-routes.test.ts tests/dashboard-routes.test.ts tests/client-api.test.ts: the new cases cover the working → replied states, a send to a fixture conversation, idempotent retries, and the unlisted → kept Quick questiontsc --noEmit, dashboardoxlint,file-length:checkvia @betegon.
--
View Session in Sentry