Repository navigation
feat(api): Feed links on url Attachments - #3483
Merged
Merged
Conversation
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]>
…inks-annotations 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]>
…inks-annotations # Conflicts: # packages/junior/migrations/meta/0109_snapshot.json # packages/junior/migrations/meta/_journal.json
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
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.
…inks-annotations Co-Authored-By: BYK <[email protected]>
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]>
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]>
junior_attachments gets a kind (file or url) and a url, and its file columns become nullable. filename is read as title in Drizzle; the column keeps its name while old workers run. A new junior_message_attachments table records where each message uses an Attachment, with an optional position. The event store writes a url Attachment per distinct link of a message and its uses in the event transaction. Edits replace a message's uses, forks copy them, transcript purge deletes them, and attachment GC deletes purge-marked url rows. File readers skip url rows. Migration 0112 fills links for Conversations active in the last 30 days. The feed returns links with include=links. Co-Authored-By: BYK <[email protected]>
…tions' into feat/api-feed-links-attachments Co-Authored-By: BYK <[email protected]> # Conflicts: # packages/junior/src/api/conversations/feed-media.ts
Stored links are already trimmed, so the feed only parses them. A url row has no storage provider, so the GC needs only its kind. Co-Authored-By: BYK <[email protected]>
Build the partial unique index on (conversation_id, url) concurrently, after the fill. 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.
…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]>
…ttachments Co-Authored-By: BYK <[email protected]> # Conflicts: # packages/junior/src/api/conversations/feed-media.ts # packages/junior/src/api/conversations/list.ts # packages/junior/src/api/schema/conversation-feed.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
27 screenshot changes — 27 changed · 0 added · 0 removed Review screenshots in Frameshift Show 12 more changed screenshots9 more changed screenshots in Frameshift. |
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 1afff6a. Configure here.
A Postgres btree entry cannot pass about 2.7 kB, so a long link failed the message write and the 0113 index build. The write path and the 0112 fill now skip links over 2048 bytes.
BYK
requested changes
Nov 15, 2026
Feed links now use the shared safeLinkUrl, moved out of the review item card, and parseDashboardConversationLink, so a self link must also match the dashboard origin and base path. Message link positions count matches in one pass.
BYK
approved these changes
Nov 15, 2026
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]>
23 tasks done
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** |  |  | | **Review desk** |  |  | | **Settings** |  |  | **New UI** (this PR's mock data): | | Light | Dark | | --- | --- | --- | | **Inbox, compact: before (`1b49ab899`)** |  |  | | **Inbox, compact: after** |  |  | | **Inbox, comfortable: before (`1b49ab899`)** |  |  | | **Inbox, comfortable: after** |  |  | | **Conversations, compact: before (`1b49ab899`)** |  |  | | **Conversations, compact: after** |  |  | | **Pane top bar, 16rem: before (`eea8bd38d`)** |  |  | | **Pane top bar, 18rem: after** |  |  | | **Pane footer, tall (≥720px): before (16rem, `a208b87e1`)** |  |  | | **Pane footer, tall (≥720px): after (18rem)** |  |  | | **Pane footer, short (<720px): before (16rem, `a208b87e1`)** |  |  | | **Pane footer, short (<720px): after (18rem)** |  |  | | **Conversations, comfortable: before (`1b49ab899`)** |  |  | | **Conversations, comfortable: after** |  |  | | **A triage row with PRs, Linear issues and Threads, comfortable: before (`1b49ab899`)** |  |  | | **A triage row with PRs, Linear issues and Threads, comfortable: after** |  |  | | **A triage row with PRs, Linear issues and Threads, compact: before (`1b49ab899`)** |  |  | | **A triage row with PRs, Linear issues and Threads, compact: after** |  |  | | **A row with 90 PRs and 12 images, comfortable: before (`1b49ab899`)** |  |  | | **A row with 90 PRs and 12 images, comfortable: after** |  |  | | **An open pinned row: before (`1b49ab899`)** |  |  | | **An open pinned row: after** |  |  | | **A pinned row, pointer on its Threads: before (`1b49ab899`)** |  |  | | **A pinned row, pointer on its Threads: after** |  |  | | **An expanded question row** |  |  | | **Pull requests** |  |  | | **Conversation** |  |  | | **Automations** |  |  | | **Settings, with the switch** |  |  | | **Settings, Inbox motion** |  |  | | **Phone** |  |  | | **Hover scroll: before (`596edf8b8`) / after** | Before (dark, mock):  [GIF](https://junior-prod.sentry.dev/public/artifacts/8deeabd4-2dd5-4e0f-bf72-8905d4ccde8e.gif) | After (dark, mock):  [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]>
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.

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
urlinjunior_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 noinclude=linksand sees no change.What changes
junior_attachmentsgetskind(fileorurl, defaultfile) and a nullableurl.storage_provider,filename,content_typeandbytesbecome nullable. Drizzle readsfilenameastitle; the column keeps its name so old workers keep working.junior_message_attachments (conversation_id, seq, attachment_id, position), records where each message uses an Attachment.positionis nullable.urlAttachment 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-markedurlrows and their uses. Aurlrow has no bytes, so it does not expire after 30 days like a file.GET /api/conversations?include=linksreturns 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. Withoutinclude, the feed reads nothing extra.(conversation_id, url) WHERE url IS NOT NULL,CONCURRENTLY.A
urlAttachment's id is the SHA-256 of its Conversation and URL, so the write path and the fill make the same ids andON CONFLICT (id) DO NOTHINGdedupes 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
urlrow as a file:loadAttachmentand model input reject a row whose storage provider is not theirs. Aurlrow has none.storeAttachment, uploads andsendFilesread by file or upload ids, which never equal aurlid.urlrows. An old purge only marks them; the new GC deletes them.provider = 'slack'.On the new code, file readers also filter on
kind = 'file'.Cost
On Postgres 17 with 200k Conversations, 400k messages and 80k edits:
urlAttachments and 251,161 uses; a rerun inserts nothing. It holds a row-exclusive lock onjunior_attachmentsand 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.via @BYK.
--
View Session [Sentry]