Skip to content

feat(api): Feed media and links, and richer sidebar annotations - #3449

Merged
BYK merged 12 commits into
mainfrom
feat/api-feed-media-links-annotations
Nov 15, 2026
Merged

BYK merged 12 commits into
mainfrom
feat/api-feed-media-links-annotations

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The new dashboard (#3035) shows files and object cards on Conversation rows. This PR adds that server side to main before the new UI ships behind its opt-in. The current UI sends no include= and reads none of the new optional fields, so it sees no change and runs no new query.

Feed links move to a stacked PR. They will be built on junior_attachments, reworked to hold URLs too, not on a table of their own (see the review discussion).

What changes

  • GET /api/conversations takes include=media. With it, each row gets its newest files (up to 3), read by a scalar subquery column on the feed row read itself, so media adds no round trip. Files are private content, so a row gets them only when the viewer can see its private content. Without include, the feed runs no extra query.
  • Sidebar annotations get optional title, url and imageUrl in @sentry/junior-plugin-api. @sentry/junior-github fills them for pull requests.

No migration and no schema change.

Query cost

I measured with EXPLAIN (ANALYZE, BUFFERS) on Postgres 17, with 200k Conversations, 400k messages and a 50-row feed page. The media subquery runs once per page row after the LIMIT, about 0.08 ms each, so about 4 ms for a page, inside the row statement.

Old open tabs

The dashboard parses responses with .strict() schemas from this package. A tab that still runs a bundle from before this deploy rejects the new annotation fields until it reloads. Feed rows get media only with include=, so old tabs never see it.

via @BYK.

--

View Session [Sentry]

sentry-junior Bot and others added 3 commits November 14, 2026 21:08
The feed returns each row's newest files and web links only with
include=media,links, from one query with a lateral subquery for each part.
Sidebar annotations can carry the object's title, url and imageUrl, and the
GitHub plugin fills them.

conversationFeedQuerySchema moves to the feed schema module, which keeps
the conversation schema under the file-length limit.

Co-Authored-By: BYK <[email protected]>
The event store writes each message's raw link matches in the same
statement as the message, and transcript purge deletes them. The feed reads
a Conversation's newest links through the table's primary key instead of
matching the text of its last 50 messages. The migration fills links for
Conversations active in the last 30 days with the same pattern and mention
rule.

Co-Authored-By: BYK <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from BYK November 14, 2026 21:50
@vercel

vercel Bot commented Nov 14, 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 15, 2026 6:41pm UTC

Request Review

@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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

Review screenshots in Frameshift

Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automations Runs Filters · Desktop
Automations Runs Filters · Desktop
Changed
Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Attachment Zoom · Desktop
Conversation Attachment Zoom · Desktop
Changed
Show 12 more changed screenshots
Conversation Captured Memories Popover · Desktop
Conversation Captured Memories Popover · Desktop
Changed
Conversation Child Agents · Desktop
Conversation Child Agents · Desktop
Changed
Conversation Details Watched Linked Work · Desktop
Conversation Details Watched Linked Work · Desktop
Changed
Conversation Event Log Virtual · Mobile
Conversation Event Log Virtual · Mobile
Changed
Conversation Long Transcript Touch · Mobile
Conversation Long Transcript Touch · Mobile
Changed
Conversation Memory List Jump · Desktop
Conversation Memory List Jump · Desktop
Changed
Conversation Memory List Jump · Mobile
Conversation Memory List Jump · Mobile
Changed
Conversation Question Picks And Text · Desktop
Conversation Question Picks And Text · 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 Task Line · Desktop
Conversation Task Line · Desktop
Changed
Push Notifications Tip · Desktop
Push Notifications Tip · Desktop
Changed

5 more changed screenshots in Frameshift.

…inks-annotations

# Conflicts:
#	packages/junior/migrations/meta/0109_snapshot.json
#	packages/junior/migrations/meta/_journal.json

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

Stale Bugbot comment from a previous run.

Fork copies message events in SQL, so their link rows were missing in
the fork until a later message arrived.
…inks-annotations

# Conflicts:
#	packages/junior/migrations/meta/0110_snapshot.json
#	packages/junior/migrations/meta/_journal.json
@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 a05ad4e. Configure here.

A message_updated event kept the links of the first save, so the feed
could show a URL that an edit removed. The links keep the seq of the
first save, like the transcript, and the migration fill reads the text
of the newest save.

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This all looks good that said I have one design concern: all this data is derived data which makes me feel a bit icky to put into a table. What if we expanded the concept: these are just attachments on the message with the type URL or media etc and the position is optional where a lack of position means it's shown at the end or wherever? This should also play well with the "attach" concept in the cards we added earlier and we can also send this to the LLM as an "aside" with the sequence message. Even better if the same attachment is being used in the same conversation we can just refer to it with an I'd instead of adding it over and over.

Wdyt?

@sentry-junior

sentry-junior Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

@BYK I agree. A link is something the message carries, so it fits better as a message attachment than as a side table of regex matches. Here's how I'd shape it:

  • One Conversation-scoped attachment row per thing. It covers a file (what junior_attachments holds today), a URL, or an attached object card. Rows are deduped per Conversation by a key: the normalized URL, the object key or the file digest. A repeat gets the same id.
  • A message → attachment join of (conversation_id, seq, attachment_id, position NULL). A null position means "show at the end". URLs found in the text get their position, and uploads and attached cards get none.
  • One read for the feed: media and links become one query over the join, by kind.
  • The LLM sees an aside after the message, such as attachments: [att_1 (url), att_2 (file)]. Later messages refer to an id that is already listed and don't repeat it.

Things to settle first:

  1. junior_attachments requires storage, filename, content type and bytes. A URL row would need those columns to become nullable, which alters an existing table, or a new parent table that files point into. I'd rather add a new table than alter that one.
  2. The aside changes what the model reads, so it needs its own evals. I'd ship it separately from the feed.
  3. Backfill: the current migration fill would move to the new tables.

My suggestion: drop junior_conversation_links from this PR, and ship include=media plus the annotation fields now. Media already reads junior_attachments, so it needs no new table. Then the attachment model gets its own design and PR, with include=links on top of it. That way we don't ship a table we would migrate away from. Does that work for you, or should this PR wait for the new model?

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

junior_attachments requires storage, filename, content type and bytes. A URL row would need those columns to become nullable, which alters an existing table, or a new parent table that files point into. I'd rather add a new table than alter that one.

Why can we not rework this table to be compatible with a more generic object model? Or create a new table and migrate attachments to that instead?

@sentry-junior

sentry-junior Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

@BYK Fair point, we can rework it. I was being too cautious. I checked the code: junior_attachments has four consumers in core (chat/attachments/store.ts, chat/attachments/uploads.ts, chat/slack/attachments.ts and the feed) and no foreign keys that point into it.

I'd go with reworking it in place, not with a new table plus a copy:

  • Rework in place. ADD COLUMN kind text NOT NULL DEFAULT 'file' plus nullable url and object_key columns are metadata-only on Postgres 11+. DROP NOT NULL on the storage, filename, content type and bytes columns is metadata-only too. Each takes a short ACCESS EXCLUSIVE lock under our 5 s lock_timeout, with no rewrite and no row locks. The per-Conversation dedupe key gets a CREATE UNIQUE INDEX CONCURRENTLY in its own migration, following the repo's pattern. Existing rows become kind = 'file' with no backfill. The GC index and purge only touch rows where storage_provider is set, so URL and object rows stay out of them.
  • New table plus migrating the rows has to copy every attachment row in a migration. While the deploy rolls out, the old runtime keeps writing to the old table, so we'd need a dual write or a second catch-up copy. Uploads also share their id with the attachment row they turn into. That's more moving parts for the same end state.

The message → attachment join (conversation_id, seq, attachment_id, position NULL) would be the only new table. Links found in message text become kind = 'url' rows, and attached object cards become kind = 'object' rows.

If that works for you, I'll write up the migration shape and the write and read paths, and get your OK on it before I build anything.

@BYK

BYK commented Nov 15, 2026

Copy link
Copy Markdown
Member

Mostly sounds good. I'm wondering if we can rework it to be even more generic so we don't have filename, it becomes something applicable to URLs too like "name" or "title"? Alternatively we can have a JSON field for each object type detail to be more flexible but not sure if that's a great idea.

@sentry-junior

sentry-junior Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

@BYK Yes to a generic name. I'd use title, since it fits a file name, a page title and an object title. One catch: junior upgrade runs migrations while the old workers are still running (see openspec/changes/actor-identity-end-state/tasks.md), so a plain RENAME COLUMN filename TO title would break the old runtime's reads and writes during the deploy. Two safe ways to get there:

  1. Rename in code now, in SQL later. The Drizzle field becomes title: text("filename"), so the code says title and the old runtime still works. A later release renames the column once no old worker is left. This needs no migration now.
  2. Expand and contract. Add title, write both columns, copy the old rows in bounded batches outside the migration, read title, then drop filename a release later. That works, but it takes more steps for the same result.

I'd take 1.

On a JSON field per object type: I'd keep typed columns for everything we filter, dedupe, join or GC on (kind, title, url, object_key, content_type, bytes, the storage fields and the times). I'd add one details jsonb only for per-kind extras that nothing queries, such as an image size or a page description. Each kind would get a zod schema at the read edge (policies/runtime-boundary-schemas.md). Putting everything in JSON would lose NOT NULL and check constraints, plain indexes and Drizzle types, and the GC and dedupe queries would turn into JSON path expressions. So: typed columns for the shared fields, with JSON as the overflow, and only once a kind actually needs it.

I'll fold this into the design write-up: the migration shape, the write and read paths, and how the feed and the LLM aside use it. I'll get your OK on that before I build.

@BYK

BYK commented Nov 15, 2026

Copy link
Copy Markdown
Member

Sounds good, also let's go with 1 (drizzle rename).

Do we store the blobs in the DB for attachments? That sounds like a bad idea?

@sentry-junior

sentry-junior Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

@BYK Got it, I'll go with 1 (Drizzle rename) in the design.

No, the blobs aren't in the DB. junior_attachments holds only metadata. The bytes live in object storage behind chat/attachments/storage.ts, which has an S3 adapter (s3.ts) and a Vercel Blob adapter (vercel.ts). The row keeps storage_provider + storage_key to locate the object, plus sha256, bytes, content_type and the vision summary. storage_key is null when Junior records a file without storing it, such as a large Slack file. GC deletes the objects through junior_attachments_gc_idx, after purge sets delete_requested_at.

In the reworked model, URL and object rows have no storage fields at all, so the GC filter becomes storage_key IS NOT NULL, and they never reach object storage.

@BYK

BYK commented Nov 15, 2026

Copy link
Copy Markdown
Member

Sounds good, let's build this

sentry-junior Bot and others added 2 commits November 15, 2026 17:13
Drop junior_conversation_links, its migration, and the link write,
edit, fork and purge paths. The feed keeps include=media and the
sidebar annotation fields. Links come back on the reworked
attachment model in a stacked PR.

Co-Authored-By: BYK <[email protected]>
@sentry-junior

sentry-junior Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

@BYK In 04b6fc0, this PR now ships only include=media and the sidebar annotation fields. I dropped junior_conversation_links, its migration, the link write, edit, fork and purge code, include=links and their tests. Links move to a stacked PR on top of this branch, built on the reworked junior_attachments with the message → attachment join we discussed. I'll link it here once it's open. I also updated the PR body.

Only a file row has a storage provider. Rows for web links will share
junior_attachments, and a worker that runs during that deploy must not
list them as media.

Co-Authored-By: BYK <[email protected]>
Feed media was a third round trip that waited for the access read. It is
now a scalar subquery column on the row read, and the response keeps it
only where the viewer sees private content.
@BYK
BYK enabled auto-merge (squash) November 15, 2026 18:44
@BYK
BYK merged commit 88fb6b3 into main Nov 15, 2026
45 checks passed
@BYK
BYK deleted the feat/api-feed-media-links-annotations branch November 15, 2026 18:48
sentry-junior Bot added a commit that referenced this pull request Nov 15, 2026
…he row statement

Links follow media onto the feed row read as a scalar subquery. It keeps
each link once in SQL from the newest 20 uses, then looks up only the
newest 6, so the feed shows 3 after it drops the links a row already
shows.

Co-Authored-By: BYK <[email protected]>
BYK added a commit that referenced this pull request Nov 15, 2026
Follows #3449.

The new dashboard (#3035) shows the web links of each
Conversation on its feed row, so people can see what a Conversation
touched without opening it. Reading links out of message text on every
feed request does not scale, so this stores them at write time. Links
are Attachments of kind `url` in `junior_attachments`, the same model as
files, so a repeat of a link in a Conversation refers to one row by id.
The current UI sends no `include=links` and sees no change.

## What changes

- `junior_attachments` gets `kind` (`file` or `url`, default `file`) and
a nullable `url`. `storage_provider`, `filename`, `content_type` and
`bytes` become nullable. Drizzle reads `filename` as `title`; the column
keeps its name so old workers keep working.
- A new table, `junior_message_attachments (conversation_id, seq,
attachment_id, position)`, records where each message uses an
Attachment. `position` is nullable.
- The event store writes a `url` Attachment for each distinct link of a
message, and its uses, in the transaction that stores the message. Edits
replace the uses of the edited message, forks copy them, and transcript
purge deletes them. Attachment GC deletes purge-marked `url` rows and
their uses. A `url` row has no bytes, so it does not expire after 30
days like a file.
- `GET /api/conversations?include=links` returns up to 3 links per row
from its newest messages. Like media, links are a scalar subquery column
on the feed row read, so they add no round trip. Links are private
content. Without `include`, the feed reads nothing extra.
- Migration 0112 fills links for Conversations active in the last 30
days. Migration 0113 builds a partial unique index on `(conversation_id,
url) WHERE url IS NOT NULL`, `CONCURRENTLY`.

A `url` Attachment's id is the SHA-256 of its Conversation and URL, so
the write path and the fill make the same ids and `ON CONFLICT (id) DO
NOTHING` dedupes them. The unique index stops any other writer from
adding a second row for a link.

Object-card rows and sending links to the model as an aside are out of
scope.

## Deploy safety

Old workers keep running during the deploy and never treat a `url` row
as a file:

- The attachment route, `loadAttachment` and model input reject a row
whose storage provider is not theirs. A `url` row has none.
- Vision summaries, `storeAttachment`, uploads and `sendFiles` read by
file or upload ids, which never equal a `url` id.
- GC selects rows by storage provider, so it skips `url` rows. An old
purge only marks them; the new GC deletes them.
- Slack matching filters on `provider = 'slack'`.
- Feed media from #3449 filters on storage provider.

On the new code, file readers also filter on `kind = 'file'`.

## Cost

On Postgres 17 with 200k Conversations, 400k messages and 80k edits:

- The DDL in 0111 takes about 6 ms. The fill in 0112 takes 22.7 s and
writes 189,152 `url` Attachments and 251,161 uses; a rerun inserts
nothing. It holds a row-exclusive lock on `junior_attachments` and the
new table, and share locks on the event and Conversation tables, so app
reads and writes keep running. The index build in 0113 takes 0.9 s and
does not block writes.
- For a 50-row page, the links column takes 6.5 ms and 1,595 buffers,
down from 12.3 ms for a plain join of the newest 50 uses. That is about
on par with a links table of its own, which took 6 ms on the same data.
The column keeps each link once from the newest 20 uses and looks up
only the newest 6, enough for 3 after the row drops links it already
shows.

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

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

--

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

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

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>
sentry-junior Bot added a commit that referenced this pull request Nov 15, 2026
Take main's feed media and links (#3449, #3483). The new UI asks for them
with include=links,media; the mock feed honours include= as the API does.
Review item links go back to main's /review?item=, which the new UI maps.

Co-Authored-By: BYK <[email protected]>
MathurAditya724 added a commit that referenced this pull request Nov 16, 2026
…elds (#3502)

After a deploy, an open dashboard tab can suddenly lose every
Conversation in the sidebar. In its place it shows a wall of
`unrecognized_keys` errors for `sidebarAnnotations[].title` and `url`.

Here's why: #3449 added `title`, `url`, and `imageUrl`
to sidebar annotations, and the dashboard parses responses with
`.strict()` schemas. A tab still running the old bundle rejects the new
fields. The next feed refresh fails, and the sidebar swaps its rows for
the raw Zod message. Reloading fixes it, and the version drift banner
already asks for that, but the sidebar is gone until then. #3449 called
this out under "Old open tabs".

What this changes:

- If a feed refresh fails, the sidebar keeps the rows it already loaded.
It only shows the error when it has nothing loaded yet.
- If a response fails its schema and the server reports a different
Junior version than the bundle, the error says "The dashboard changed.
Refresh to load the latest version." instead of the schema issues. This
covers every dashboard read, not only the feed. When the versions match,
the original error still comes through, so real schema bugs stay
visible.

The schemas stay strict, as `policies/runtime-boundary-schemas.md` asks.

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

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A73f86254b6e881c9fa523f1d -->

--

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

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

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Aditya Mathur <[email protected]>
BYK added a commit that referenced this pull request Nov 17, 2026
This PR adds the new dashboard UI behind the per-user switch from #3446.
Turn on **Settings › General › Try the new dashboard** to get it.
Everyone else keeps the current dashboard, unchanged. Base: `main`.

The new UI puts all navigation in one left pane, and merges
Conversations and the Review desk into one Inbox, modeled on Google
Inbox. It started as #3035 (one-pane nav) and #3036 (Inbox bundles). The
pane comes from Kix's tabs prototype (`proto/dashboard-tabs`,
`34b2a6bc2`), and the Inbox from Kix's unified Inbox prototype
(`9094c16ba`). Thanks, Kix.

**Why:** what waits on you is spread over the Conversations sidebar, a
separate Review desk page and each Conversation. The new UI puts it in
one list, with the rest of the dashboard one click away.

## How the switch works

- The page loads one shell, chosen on the server from the user's
`experimentalUi`:
  - `ClassicShell` is the current UI, as on `main`.
- `InboxShell` (entry `src/inbox.ts`) is this PR's UI. It replaces
`main`'s placeholder.
- The checkbox is in Settings › General in both shells. It is off by
default and visible to everyone. It sends `PATCH /api/me` and reloads,
so a user can always switch back.
- The current UI's own modules stay as they are on `main`. New-UI code
lives in its own modules under `src/client/inbox/`. Where a shared
module has new behavior, the new UI turns it on through `useInboxUi()`
or an optional prop. Shared Review item links stay `/review?item=`, and
the new UI maps them to its Inbox.
- **Bundles** (first-load JS, gzip): classic **587.0 KB → 599.9 KB**
(+2.2%: the shell switch, the setting and 12 shared icons). Inbox
**616.3 KB** (the placeholder was 387.3 KB). The classic entry has no
new-UI module, and the inbox entry has no module that only the current
UI uses.

## What the new UI has

- **One pane:** search, **+** and the pane toggle on top. Below them,
one list: Inbox, Snoozed, Done │ Conversations, Automations, plugin
pages │ Asks by type (Pull requests, Decisions) │ In flight (pins, then
running Conversations). Counts come from the server. Settings, System,
Memories and Code get their own pane, with a way back.
- **Inbox:** **To do** (asks that name you), **Up for grabs** (asks for
everyone, with "I'll take it"), then Today, This week and Earlier. Rows
show the Brief status and summary, ask pills and linked work. A click
expands a row in place, to answer, Dismiss, Snooze or Pin it. Dismiss
and Snooze move the focus to the next row. Notices clear per section
with Undo.
- **Density:** Compact (the default) or Comfortable, in the profile
menu. Comfortable rows add a summary column, quiet linked-work cards,
file thumbnails and link cards. The row under the pointer grows a little
and opens in the same motion. **Expand on hover** (Off / Compact only /
Everywhere) controls the opening. Reduced motion turns both off.
- **Pull requests** (`?view=prs`): your open changes in three piles:
Waiting on you, Waiting on others, and Drafts.
- **Automations:** a pane row with your Automations that need attention.
The list uses the Inbox's style, with To do, Active, Paused and
Completed sections.
- **Omni search** (`⌘K`) is the only search. It covers Conversations,
Inbox items, Automations, people, repositories, changes, Memories, Runs
and Events.
- **Tab count:** `main`'s tab title and icon count (#3460), in both
shells.
- **Shortcuts:** `⌘B` toggles the pane, `⌥⌘B` Details, and `⌥⌘Y` Zen
mode. `Esc` closes Details, then goes back to the list. Off Mac, use
Ctrl instead of ⌘.

## API

There are no API, schema or migration changes. The new UI reads APIs
that are already on `main`. It adds `include=links,media` to its feed
reads (#3449, #3483), so only users of the new UI pay for that query.

Outside the dashboard, the GitHub plugin's "Review requested" and "Ready
to merge" notices now name the pull request by number, and put its URL
on its own line, so both UIs show it as one card.

## What could break, and what to do

- **The current UI:** it should look and behave as on `main`. A
difference is a bug in this PR. Report it here.
- **The new UI:** it is opt-in. If it breaks for you, clear **Try the
new dashboard** in Settings › General to go back.
- **State kept in the browser:** in the new UI, snoozes, dismissed
Automation alerts, density and Expand on hover are saved per browser.
They don't follow a user to another browser. A later PR moves snoozes to
the server.
- **Safari:** `⌥⌘Y` is not tested in Safari yet.

## Screenshots

Mock data, 1440 (phone 390), taken at the merged head.

**Current UI:** `main` on the left, this PR on the right, with `main`'s
mock data. Only Settings changes: it adds the switch.

| | Light | Dark |
| --- | --- | --- |
| **Home** |
![](https://junior-prod.sentry.dev/public/artifacts/c9aa4ccd-0352-4d6a-b6f9-477a03b2765a.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/4367d62c-b831-4019-8c25-d52e3298cc73.png)
|
| **Review desk** |
![](https://junior-prod.sentry.dev/public/artifacts/c1b3d971-02c4-438c-950c-38c2dbec0d32.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/fc798af7-b7c0-430c-b19b-1c976468e09a.png)
|
| **Settings** |
![](https://junior-prod.sentry.dev/public/artifacts/3a08fc48-72bc-42d4-a81d-91b61f2a70aa.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/3b797edc-508d-49fd-b3f2-1ffdd0517cca.png)
|

**New UI** (this PR's mock data):

| | Light | Dark |
| --- | --- | --- |
| **Inbox, compact: before (`1b49ab899`)** |
![](https://junior-prod.sentry.dev/public/artifacts/bd6fea41-f704-4b89-aefb-054d101c2d9f.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/c4c0bc3a-f564-43f2-960d-1420366cd605.png)
|
| **Inbox, compact: after** |
![](https://junior-prod.sentry.dev/public/artifacts/6a63ce2e-7ac1-4781-b5e8-0e6d1101408f.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/3519cd21-8da7-464b-b892-0e50fb7da3dd.png)
|
| **Inbox, comfortable: before (`1b49ab899`)** |
![](https://junior-prod.sentry.dev/public/artifacts/8438d282-383f-431c-b802-16444b02e1b8.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/f26ae454-ea9e-434e-9b3a-61a314f07e6e.png)
|
| **Inbox, comfortable: after** |
![](https://junior-prod.sentry.dev/public/artifacts/5634caf9-e195-415f-bfda-ae65e499afe6.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/018d1d10-ad83-41df-919b-2af78491e940.png)
|
| **Conversations, compact: before (`1b49ab899`)** |
![](https://junior-prod.sentry.dev/public/artifacts/b6505daf-8113-4a79-b4ea-e919e7f314d7.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/06420e44-aaea-445c-96b3-1fc4df483fc2.png)
|
| **Conversations, compact: after** |
![](https://junior-prod.sentry.dev/public/artifacts/a53915e7-1fa0-421c-918d-02b1983f0ec5.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/37573235-a68c-473c-8f60-c5761b2fc945.png)
|
| **Pane top bar, 16rem: before (`eea8bd38d`)** |
![](https://junior-prod.sentry.dev/public/artifacts/a1a1f587-dd6d-4b6f-901b-992e79270504.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/b6505528-6b75-4b84-b975-c639de769a28.png)
|
| **Pane top bar, 18rem: after** |
![](https://junior-prod.sentry.dev/public/artifacts/0821e4db-bfe3-4f07-b471-d92f6563bace.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/070937b9-8d22-48ef-8722-aab3597c9344.png)
|
| **Pane footer, tall (≥720px): before (16rem, `a208b87e1`)** |
![](https://junior-prod.sentry.dev/public/artifacts/0524a5f4-4d9c-4cd1-9e01-2c017bca957f.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/99778968-61dc-47e2-a620-f1259d54321e.png)
|
| **Pane footer, tall (≥720px): after (18rem)** |
![](https://junior-prod.sentry.dev/public/artifacts/8040f915-5d98-44c6-afb3-44fead527b20.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/5fac3984-d4a1-438e-9f78-841a01d47787.png)
|
| **Pane footer, short (<720px): before (16rem, `a208b87e1`)** |
![](https://junior-prod.sentry.dev/public/artifacts/cbd2829e-3d83-4d03-a827-240aa7fcc044.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/f81694d5-7d31-4925-a744-828739955a77.png)
|
| **Pane footer, short (<720px): after (18rem)** |
![](https://junior-prod.sentry.dev/public/artifacts/d6ddb1b9-41cb-4e56-bb43-e174958eb27c.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/2288abf8-e3a2-44cc-9deb-f7d3dafbd4d3.png)
|
| **Conversations, comfortable: before (`1b49ab899`)** |
![](https://junior-prod.sentry.dev/public/artifacts/ce5772c5-f281-49ae-b1ec-67c5eb7a6701.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/35892815-fa56-41e5-823e-8f976b03c5bb.png)
|
| **Conversations, comfortable: after** |
![](https://junior-prod.sentry.dev/public/artifacts/6bbe1a4e-d652-4da2-ab0a-a50c682a930c.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/2d4edec9-74b6-4792-a433-bc6644ab2439.png)
|
| **A triage row with PRs, Linear issues and Threads, comfortable:
before (`1b49ab899`)** |
![](https://junior-prod.sentry.dev/public/artifacts/928f7809-1cbc-47fe-9566-782245512d68.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/7dff1871-e25f-483e-9a1a-b07aba16f82f.png)
|
| **A triage row with PRs, Linear issues and Threads, comfortable:
after** |
![](https://junior-prod.sentry.dev/public/artifacts/7e9d48f6-f9b9-4c14-8b74-ef1056d22949.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/ef7a21af-3c34-4ee8-9217-5ff5ac2d8072.png)
|
| **A triage row with PRs, Linear issues and Threads, compact: before
(`1b49ab899`)** |
![](https://junior-prod.sentry.dev/public/artifacts/aafc98ce-1647-4541-9a91-e36843dda1a0.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/2278e33a-485c-456f-be03-223e8d93e643.png)
|
| **A triage row with PRs, Linear issues and Threads, compact: after** |
![](https://junior-prod.sentry.dev/public/artifacts/79a5c2db-b476-4565-8ed8-1117187b0d14.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/4c26aebd-d4a2-4c68-8718-a91d0996c037.png)
|
| **A row with 90 PRs and 12 images, comfortable: before (`1b49ab899`)**
|
![](https://junior-prod.sentry.dev/public/artifacts/40a90477-1ae1-4d1a-a2ef-48f81546b0e9.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/1c311d9e-ea02-4668-a943-d6698a4f106e.png)
|
| **A row with 90 PRs and 12 images, comfortable: after** |
![](https://junior-prod.sentry.dev/public/artifacts/677583c2-04a4-4fe2-94ad-4b7fd6d49d16.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/04facc66-4c46-48b9-8e69-3b19279cd6bf.png)
|
| **An open pinned row: before (`1b49ab899`)** |
![](https://junior-prod.sentry.dev/public/artifacts/4d5d6d9f-540e-4cbc-9824-f1df1e1b5940.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/828c19ce-5d0a-4984-aacf-9bc99d4fc8df.png)
|
| **An open pinned row: after** |
![](https://junior-prod.sentry.dev/public/artifacts/7cb8a939-d4a6-4115-81dc-3b5a096c68b6.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/4e494913-6b13-420b-89a3-9d14df8ed608.png)
|
| **A pinned row, pointer on its Threads: before (`1b49ab899`)** |
![](https://junior-prod.sentry.dev/public/artifacts/58a0bade-7c6f-4f95-afa5-9ca48d4dbcbf.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/75817647-3951-458b-86ce-b6fcd5348db8.png)
|
| **A pinned row, pointer on its Threads: after** |
![](https://junior-prod.sentry.dev/public/artifacts/7fb822f6-41c1-483b-8fe7-1ce11c922cbd.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/880360eb-5917-4609-997d-684b14d268a7.png)
|
| **An expanded question row** |
![](https://junior-prod.sentry.dev/public/artifacts/713f2035-22ec-4b92-b268-5f91ff6c434e.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/04301bb3-a422-4b21-b94f-b450fcedb24b.png)
|
| **Pull requests** |
![](https://junior-prod.sentry.dev/public/artifacts/aa1f6568-3b96-4c59-8b10-e5dde0a762e1.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/581759cc-4195-4014-98a4-e9cdc708121e.png)
|
| **Conversation** |
![](https://junior-prod.sentry.dev/public/artifacts/5a1953a5-40a5-44ff-9904-c1767d944ecd.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/36df8ab2-e85b-4efd-aea1-230895c58c42.png)
|
| **Automations** |
![](https://junior-prod.sentry.dev/public/artifacts/3d7729a3-726e-4dd2-b54e-f64b4d5a60df.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/22e2d5bf-7572-48f3-aafd-96e79052813e.png)
|
| **Settings, with the switch** |
![](https://junior-prod.sentry.dev/public/artifacts/97fd6078-43a9-4c13-8334-faacf5f57881.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/0d4f2861-1e71-4632-ae65-3ba24d4adf2d.png)
|
| **Settings, Inbox motion** |
![](https://junior-prod.sentry.dev/public/artifacts/e2ef7d4c-23ed-4421-a812-27881c734b73.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/58d2198b-663b-40a7-87c9-197ef5905c73.png)
|
| **Phone** |
![](https://junior-prod.sentry.dev/public/artifacts/aa0f1f4c-3d98-4acc-a46b-c0a348dc5725.png)
|
![](https://junior-prod.sentry.dev/public/artifacts/79b1300b-a451-4cc2-a177-746c80576459.png)
|
| **Hover scroll: before (`596edf8b8`) / after** | Before (dark, mock):
![](https://junior-prod.sentry.dev/public/artifacts/f18e94e6-e832-4127-bd1c-90ddaa4d1cfd.png)
[GIF](https://junior-prod.sentry.dev/public/artifacts/8deeabd4-2dd5-4e0f-bf72-8905d4ccde8e.gif)
| After (dark, mock):
![](https://junior-prod.sentry.dev/public/artifacts/d61285d6-82f1-4683-9964-e22347a4394b.png)
[GIF](https://junior-prod.sentry.dev/public/artifacts/4c83b687-6c69-4ebe-8499-a7e429c2e0ee.gif)
|

<!-- junior-request-attribution:start -->
via @BYK, @betegon.
<!-- junior-request-attribution:end -->

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

--

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

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

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>
Co-authored-by: David Cramer <[email protected]>
Co-authored-by: bete <[email protected]>
BYK added a commit that referenced this pull request Nov 17, 2026
Turns the perf patterns from #3184,
#2820, #2991, #3271,
#2921 and #3449 into checks that fail
CI, and fixes the code that breaks them. `policies/performance.md` lists
each rule and the check behind it. The DB and request budgets come in a
follow-up PR.

| Rule | Where | Fixed | Left |
| --- | --- | --- | --- |
| `unicorn/no-array-for-each` | root + dashboard | 43 | 0 |
| `query-invalidation/no-broad-query-invalidation` (new, dashboard JS
plugin) | dashboard `src` | 20 calls | 5 disable comments with reasons |
| `junior/bounded-fan-out` (new) | `packages/*/src` | 24 (19 behind
`pLimit`, 5 batched reads) | 13 disable comments naming the cap |
| `no-await-in-loop` | `packages/*/src` | 3 moved to bounded
`Promise.all`, 2 dashboard disables | 467 sites in 137 files, baselined
|

**`query-invalidation/no-broad-query-invalidation`** fails on
`invalidateQueries`, `refetchQueries`, `resetQueries` or `removeQueries`
when the key is missing, a literal of 2 or fewer parts, or a bare prefix
const, unless the call passes `exact: true`. The fixes:
- `invalidateConversationFeeds` replaces each `["dashboard",
"conversations"]` refresh.
- Rename writes the response title into the feeds and does not refetch.
- `reviewItemQueryKey` and `invalidateReviewItemCollections` let Review
item actions write item details from the response and refresh only
count, list and waiting conversations.

**`junior/bounded-fan-out`** flags
`Promise.all`/`allSettled(<list>.map(async …))` unless the callback
calls a `p-limit` limiter. A literal array is not flagged. Fixes use
limits of 5 for provider APIs and 8 for internal storage. Batched fixes
are `readSubscriptions` (one `mGet`) in `chat/events/store.ts` and
`getStateValues` in cache warming. `junior-github` gets a `p-limit`
dependency.

**`no-await-in-loop` uses a baseline** because 467 sites is too many to
triage safely in one PR. Many are intentionally sequential: cursor
pages, ordered writes, rate limits, stop-on-first-failure.
`tools/oxlint/await-in-loop.json` turns the rule off only for the listed
files, and `scripts/await-in-loop-baseline.json` holds their per-file
counts. `pnpm await-in-loop:check` (part of `pnpm lint`) fails when:
- a count goes up,
- a count goes down and the entry is not lowered or removed,
- the two file lists drift.

New files get the rule with no exemption.

**Automations exclusion:** Otto is rewriting this code in
#3570, so it is left alone. In the dashboard,
`pages/automations/**`, `inbox/pages/automations/**` and
`review-desk/inboxQueries.ts` have `no-broad-query-invalidation` and
`no-await-in-loop` turned off. The server-side Automations files sit in
the `no-await-in-loop` baseline like any other file. None of them had
fan-out sites. Remove the dashboard override when that rewrite lands.

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

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

--

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

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

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 6525e3e7 Deployed Nov 15, 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