Skip to content

feat(dashboard): Open linked rows from the page around them - #2727

Merged
BYK merged 6 commits into
mainfrom
feat/dashboard-link-targets-from-server
Nov 5, 2026
Merged

BYK merged 6 commits into
mainfrom
feat/dashboard-link-targets-from-server

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Follow-up to #2635, part of #2568. Answers the linked-events review comment.

Before, a link to an event, Turn, or memory outside the loaded rows paged the transcript one page at a time until it found the row. Now the server gives the row position, and the client makes one request.

Design

  • Memories (details pane, whole Conversation): these come in bulk. Each recall and capture in the memory list now has its event seq. The list already reads those events, so this adds no query. A memory jump opens at that seq.
  • Event and Turn links (shared URL, review desk): GET /api/conversations/:id/events also takes event=<seq> and turn=<turnId> and returns the same page that around returns for that row.
    • event adds no query. It uses the same seq page read and access checks as around=<cursor>.
    • turn adds one lookup on the (conversation_id, type, seq) index, over this Conversation's turn_started rows. An unknown Turn returns 404 and the dashboard drops the link.
  • Client: if the loaded rows don't hold a link's row, useHistoryAround (renamed from useUnreadHistory) opens at the page around it, the same way it opens at the read position. Jump to latest clears the link, and a link page that fails is dropped. The page-by-page search (nextHistorySearch / loadToward) is gone.
  • Scroll fix: a link at open now sets the first scroll position. Before, bottom pinning ran after the event log showed the linked row and scrolled the row out of view.

No bulk mapping for event and Turn links. Each one points to one row, and an event link already has its seq in the URL. Only the Memories section shows targets from the whole Conversation, and it gets them in bulk.

Tests

  • Integration: event-list.test.ts gets "opens the page around a linked event or Turn" (event page, Turn page, unknown Turn 404). The memory REST test covers seq and seq order.
  • E2e (conversations-read-position.spec.ts): event and Turn links outside the loaded rows each make one link request, and the row is in the event log viewport. A memory outside the loaded rows opens with one event request.
  • Full dashboard e2e (90/90), dashboard unit tests, tsc for junior, junior-memory, and junior-dashboard, oxlint, and file-length:check pass.

Screenshots

Event link (?event=70) outside the loaded rows:

Event link

Memory chosen in details, opened at its capture:

Memory jump desktop

Memory jump mobile

Next for #2568

Virtualize the event log, then the transcript. @tanstack/react-virtual only picks and measures rows; bottom pinning keeps control of scrollTop.

via @BYK.

--

View Session in Sentry

sentry-junior Bot and others added 4 commits November 5, 2026 09:42
The transcript scrolled to the bottom after the event log showed a
linked row, so the row was out of view. A link at open now owns the
first scroll position. The e2e tests check the row is in view and
take screenshots.

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

vercel Bot commented Nov 5, 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 10:10am UTC

Request Review

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

11 screenshot changes — 7 changed · 4 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 Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Share Details · Desktop
Conversation Share Details · Desktop
Changed
Show 1 more changed screenshot
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

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

A link that the cached latest page held never set the link start, so a
far-behind reader still paged to the read position and lost the row.

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

@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 95d92c3. Configure here.

@BYK
BYK merged commit 7a93ed5 into main Nov 5, 2026
43 checks passed
@BYK
BYK deleted the feat/dashboard-link-targets-from-server branch November 5, 2026 10:31
BYK added a commit that referenced this pull request Nov 5, 2026
…2732)

Follow-up to #2727 (Bugbot
[r4479326810](#2727 (comment))).
Part of #2568.

A link at open keeps the scroll position, so the transcript stays at the
linked row. If the link failed (for example, an unknown Turn returns
404), `dropLink` cleared `startAtLink`, but bottom pinning had already
started for that Conversation and did not start again. A cached
transcript then stayed at the top, not at the "New" marker or the latest
message.

The start is now keyed on the Conversation and on whether it started at
a link. A dropped link changes the key, so the normal start runs once.

### Tests
- New e2e test: hover the row to cache the latest page, open
`?turn=turn-missing`, and expect the latest event in view after the link
is dropped. It failed before the fix (viewport ratio 0).
- Full dashboard e2e: 95 passed. Types and lint pass.

### Screenshot
After a failed Turn link, the event log opens at the latest event:

![Failed link opens at
latest](https://junior-prod.sentry.dev/public/artifacts/ffe5491d-0c5a-4788-a72d-ff5935b610f5.png)

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

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

--

[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A735c6e48f79c0c925da15893/?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]>
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