Skip to content

feat(dashboard): Adapt queued messages to the available space - #2678

Merged
thomasjiangcy merged 1 commit into
mainfrom
bt/conversation-queued-messages
Nov 5, 2026
Merged

thomasjiangcy merged 1 commit into
mainfrom
bt/conversation-queued-messages

Conversation

@betegon

@betegon betegon commented Nov 4, 2026

Copy link
Copy Markdown
Member

Refs #2673
Depends on #2677

The queued message list uses a single disclosure when the viewport is short, leaving more room for the transcript. Tall desktop views still show a preview, and messages that need attention remain visible.

Before and after

Captured with the same mock data and viewport from this PR's base and head.

Queued messages on a short desktop window

Before After
Before: Queued messages on a short desktop window After: Queued messages on a short desktop window

Validation

Verified in Chromium: the short and tall queue states and the composer queue flow. The dashboard tests pass on the complete stack.

@vercel

vercel Bot commented Nov 4, 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 5, 2026 1:08pm UTC

Request Review

@betegon
betegon marked this pull request as ready for review November 4, 2026 19:39
@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 4, 2026
@BYK
BYK added this pull request to stack #2680 November 4, 2026 19:56
@blacksmith-sh

This comment has been minimized.

thomasjiangcy added a commit that referenced this pull request Nov 5, 2026
…2716)

When a conversation opens with no cached copy, the transcript waits for
two requests in a row: `/pending-messages`, then
`/api/conversations/:id`. #1932 added this order on purpose. Workers
commit input before they acknowledge it, so reading the mailbox first
means a message that moves into history between the two reads still
appears in one of them.

In prod traces, the detail request started only after the mailbox
request returned:

-
[`3cffecfa…`](https://sentry.sentry.io/explore/traces/trace/3cffecfa6ae6460f8677a8fc57ea128e/)
(navigation): mailbox 47→383ms, then detail from 385ms.
-
[`0d26d374…`](https://sentry.sentry.io/explore/traces/trace/0d26d3741d5d477793c326ccfbed4f4b/)
(pageload): mailbox 713→856ms, then detail from 861ms.
-
[`19019d5f…`](https://sentry.sentry.io/explore/traces/trace/19019d5f769341a2916e865e93267baa/)
and
[`40a68dfc…`](https://sentry.sentry.io/explore/traces/trace/40a68dfc3ed248dca589f837bd109bb8/):
the mailbox took 0.86s and 1.8s in the browser, and the detail waited
for it.

Change:

- `GET /api/conversations/:id?mailbox=true` reads the mailbox first and
then history, in one request. It returns the `/pending-messages` report
as `mailbox`. A request with `mailbox=true` never returns 304.
- The client uses it only for a first read with no cached copy. Polls
and cached reopens keep the two reads, so the detail can still return
304 (#2655).
- The mock reporting API and its hash-based 304 middleware support the
flag. A shared e2e helper, `withRequestedMailbox`, adds the mailbox to
mocked detail reports.

Expected impact (inference): opening a conversation saves one round trip
plus the server's mailbox read, about 150–350ms in typical traces and up
to about 1.8s in the slow ones. Polling cost does not change.

Checks: `pnpm typecheck` (junior, junior-dashboard), oxlint, prettier,
`file-length:check`, junior `pending-messages` and `detail` integration
tests, dashboard vitest, and the whole dashboard Playwright suite (87
passed). `tests/dashboard-output.test.ts` fails in my sandbox on `main`
too, during its Nitro build, so it is not related to this change.

Overlaps: #2657, #2676, #2677, #2678, and #2428 change the conversation
page UI. This PR changes only `queries.ts` data loading and the detail
route, so I expect few conflicts. #2657 (catch up on unread activity)
may touch the same detail options. This branch is based on `main`. #2712
(Neon pool size) is independent, and it fixes most of the server-side
wait in the slow traces.

<!-- junior-request-attribution:start -->
via @thomasjiangcy.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A34a570431e2cdbd57aba2d8c15a0c1ac -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A34a570431e2cdbd57aba2d8c15a0c1ac)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A34a570431e2cdbd57aba2d8c15a0c1ac/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Thomas Jiang <[email protected]>
Base automatically changed from bt/conversation-brief-usage to main November 5, 2026 13:07
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

Review screenshots in Frameshift

Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automation Run Details Light · Desktop
Automation Run Details Light · Desktop
Changed
Conversation Detail · Desktop
Conversation Detail · Desktop
Changed
Conversation Detail · Mobile
Conversation Detail · Mobile
Changed
Conversation Detail Focused · Mobile
Conversation Detail Focused · Mobile
Changed
Conversation Event Log Virtual · Desktop
Conversation Event Log Virtual · Desktop
Changed
Show 12 more changed screenshots
Conversation Fork Dialog · Desktop
Conversation Fork Dialog · Desktop
Changed
Conversation Fork Dialog · Mobile
Conversation Fork Dialog · Mobile
Changed
Conversation Outbox Author · Desktop
Conversation Outbox Author · Desktop
Changed
Conversation Queue Compact · Desktop
Conversation Queue Compact · Desktop
Changed
Conversation Queue Compact · Mobile
Conversation Queue Compact · Mobile
Changed
Conversation Quick Question · Desktop
Conversation Quick Question · Desktop
Changed
Conversation Quick Question Answered · Desktop
Conversation Quick Question Answered · Desktop
Changed
Conversation Recalled Memories Popover · Desktop
Conversation Recalled Memories Popover · Desktop
Changed
Conversation Recalled Memories Popover · Mobile
Conversation Recalled Memories Popover · Mobile
Changed
Conversation Review Item Dismissed · Desktop
Conversation Review Item Dismissed · Desktop
Changed
Conversation Review Item Dismissed · Mobile
Conversation Review Item Dismissed · Mobile
Changed
Conversation Stop Active · Desktop
Conversation Stop Active · Desktop
Changed

6 more changed screenshots in Frameshift.

@thomasjiangcy
thomasjiangcy merged commit 12e423a into main Nov 5, 2026
42 checks passed
@thomasjiangcy
thomasjiangcy deleted the bt/conversation-queued-messages branch November 5, 2026 15:13
betegon added a commit that referenced this pull request Nov 5, 2026
Refs #2673
Depends on #2678

Make the conversation list, Brief, Details, and transcript use a
consistent type scale and spacing. Selected conversations gain emphasis,
panel headings become easier to distinguish from metadata, and mobile
messages and loading rows share an inset. The chat header retains its
current title weight.

The reply composer uses less vertical space on short desktop windows and
remeasures drafts when the layout density changes.

## Before and after

Captured from this PR's base and head with the same mock data, theme,
and viewport.

**Desktop**

| Before | After |
| --- | --- |
|
![typography-desktop-before](https://github.com/user-attachments/assets/96ebcca2-10ef-4709-b137-844ac537e6eb)
|
![typography-desktop-after](https://github.com/user-attachments/assets/8f6fc8db-da88-44a4-89ac-47b7fb127542)
|

**Mobile**

| Before | After |
| --- | --- |
|
![typography-mobile-before](https://github.com/user-attachments/assets/18f286ac-7365-49ab-9d72-dbde9c725009)
|
![typography-mobile-after](https://github.com/user-attachments/assets/360afb39-9c43-43ba-bc46-f509f361b7c4)
|

## Validation

Verified the mock dashboard with
`JUNIOR_DASHBOARD_MOCK_CONVERSATIONS=true pnpm dev` on desktop and
mobile. The 31 conversation E2E tests, 364 dashboard tests, dashboard
TypeScript and lint, dashboard style checks, and file length checks
pass.

This branch was successfully deployed

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

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants