Skip to content

fix(dashboard): Show when an object card was fetched and keep hover card height stable - #3413

Merged
BYK merged 2 commits into
mainfrom
byk/object-card-fetched-at
Nov 14, 2026
Merged

BYK merged 2 commits into
mainfrom
byk/object-card-fetched-at

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Saved object cards said "Latest saved state", which tells the reader nothing. They now say Last fetched 5 minutes ago (relative time from the Annotation's updatedAt, absolute time on hover). Live cards show no fetch time, because they were just fetched.

A hover card for a link that has only a saved link Annotation (common for GitHub PRs) first shows the sparse saved card. Then it swaps to the live card when /api/objects answers. The height changed (167px → 221px in the mock), so the popup jumped. That hover card now has a fixed height (min(22rem, available height)) while the live card can still replace it, and it keeps that height after the swap. The card body scrolls when it is taller, and the footer stays at the bottom. If the live fetch finishes without a card, the saved card goes back to its natural height.

Other hover cards never swap, so they keep their natural height.

Preview images and the new fetch time come from one SavedObjectsContext, which replaces ObjectPreviewImagesContext.

Screenshots

Mock dashboard. /api/objects is delayed 6s and returns a live PR card for getsentry/junior#2201.

Before: the popup grows when the live card arrives.
before

After: same height in both states.
after

Not covered

  • The link text still changes from the label to the live title (getsentry/junior#2201 → Update Junior to 4.2 after the release (#2201)). This moves the anchor, so the popup still shifts sideways.
  • Standalone inline cards (a link alone on its line) still grow when the live card replaces the saved one. A fixed height there would leave big gaps in the transcript.

via @BYK.

--

View Session [Sentry]

…ard height stable

Replace the "Latest saved state" footer on saved object cards with
"Last fetched <relative time>", read from the Annotation's updatedAt.

A hover card for a saved link swaps to the live card when the API
answers, so its height changed and the popup jumped. Give that hover
card a fixed height while the live card can still replace it. The card
body scrolls when it is taller.

Co-Authored-By: BYK <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from BYK November 14, 2026 00:17
@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 14, 2026 12:21am UTC

Request Review

…ed-at

# Conflicts:
#	packages/junior-dashboard/src/client/display-text/ObjectLinks.tsx

@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 2 potential issues.

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 c7d387a. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

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

Review screenshots in Frameshift

@BYK
BYK merged commit b3d7288 into main Nov 14, 2026
43 checks passed
@BYK
BYK deleted the byk/object-card-fetched-at branch November 14, 2026 00:30
BYK pushed a commit that referenced this pull request Nov 14, 2026
…efer object fetch time (#3414)

Follow-up to #3413. It fixes two issues Cursor Bugbot
found after that PR auto-merged.

- **Refetch restores reserved hover height.** `settled` was `requested
!== undefined && !isFetching`, so any later request turned the reserved
height back on. That covers a window-focus refetch or a request for new
links in a streamed message. A saved link that had already resolved
without a live card then grew to 22rem while its hover card was open.
`fetchObjects` now adds an entry for every link it asked about,
including links without a card. `settled` is true once an answer covers
the link or a request fails, and later requests keep it true.
- **Link Annotations stamp the fetch time.**
`savedObjectsFromAnnotations` took the newest Annotation for a plugin
and key. A newer `resource_link` therefore set "Last fetched" over the
older object Annotation that holds the facts. The object Annotation now
sets the fetch time and preview images over a newer link with the same
key.

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

--

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

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

---------

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

This branch was successfully deployed

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

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant