Skip to content

feat(dashboard): Mock composer and Quick question sends - #2829

Merged
betegon merged 2 commits into
mainfrom
feat/dashboard-mock-sends
Nov 6, 2026
Merged

betegon merged 2 commits into
mainfrom
feat/dashboard-mock-sends

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

With JUNIOR_DASHBOARD_MOCK_CONVERSATIONS=true, sending a message from the composer or a Quick question broke:

  • New conversation: POST /api/conversations went to the real API. That ran a real agent ("Hi! I'm Junior Example…"). Then the mock detail route returned Conversation not found., because it only knows the fixtures.
  • Message in a fixture conversation: went to the real API and failed (400).
  • Quick question / fork: went to the real API and returned 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, and POST /conversations/:id/quick-question/keep save the send in process memory, like the mock archive and pin state.
  • Each send shows a working Turn (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.
  • Message ids come from webMessageId, the same as the real API, so the composer outbox matches the transcript. Retries with the same key return duplicate.
  • A Quick question fork copies the source events through the selected reply. It stays out of lists until you choose Keep as fork. After that, it shows in the feed and in the source's forks.
  • resetMockDashboardState clears 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:

  • New conversation → "Sketch the release checklist for Friday": showed the "junior-example is thinking…" Turn with Stop, then the mock reply. The conversation is listed under Today.
  • Selected the reply → Quick question → Ask: the question and the mock reply show in the side panel. Keep as fork opened the fork with "Forked from …", and the fork is listed.

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 question
  • tsc --noEmit, dashboard oxlint, file-length:check

via @betegon.

--

View Session in Sentry

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>
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 6, 2026 4:06pm UTC

Request Review

@blacksmith-sh

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

12 screenshot changes — 12 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Page · Desktop
Automation Page · Desktop
Changed
Conversation Attachment Zoom · Desktop
Conversation Attachment Zoom · Desktop
Changed
Conversation Captured Memories Popover · Desktop
Conversation Captured Memories Popover · Desktop
Changed
Conversation Captured Memories Popover · Mobile
Conversation Captured Memories Popover · Mobile
Changed
Conversation Catch Up · Mobile
Conversation Catch Up · Mobile
Changed
Conversation Child Agents · Mobile
Conversation Child Agents · Mobile
Changed
Show 6 more changed screenshots
Conversation Details Watched Linked Work · Desktop
Conversation Details Watched Linked Work · Desktop
Changed
Conversation Details Watched Linked Work · Mobile
Conversation Details Watched Linked Work · Mobile
Changed
Conversation Event Log Virtual · Desktop
Conversation Event Log Virtual · Desktop
Changed
Conversation Long Transcript Touch · Mobile
Conversation Long Transcript Touch · Mobile
Changed
Conversation Share Details · Desktop
Conversation Share Details · Desktop
Changed
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

@betegon
betegon merged commit 5697856 into main Nov 6, 2026
42 checks passed
@betegon
betegon deleted the feat/dashboard-mock-sends branch November 6, 2026 18:04

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 653439f6 Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant