Skip to content

feat(gallery): preview each run's instrument on row hover - #8

Merged
wustep merged 1 commit into
mainfrom
feat/gallery-hover-previews
Jul 18, 2026
Merged

feat(gallery): preview each run's instrument on row hover#8
wustep merged 1 commit into
mainfrom
feat/gallery-hover-previews

Conversation

@wustep

@wustep wustep commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Hovering a leaderboard row on desktop now shows a cropped screenshot of that run's instrument.
  • New pnpm bench thumbs [<run-id>] shoots each published preview and crops to the instrument. The crop is found in the DOM rather than hard-coded — locate the keyboard (the element with the most key-shaped children), then walk up to the painted chassis containing it — so the surrounding status text and page background are dropped. All ten runs resolve via key detection; there are painted-bounds and full-viewport fallbacks.
  • Thumbnails are written beside the preview build they were shot from, so the gallery derives the URL from previewPath and no field is added to run.json.

Layout notes

The card is pointer-only (hidden below the 900px breakpoint), aligns its left edge with the table's, and is sized to stop just short of the phase-sector columns — so it can cover a neighbouring model name but never anyone's scores. It clears the hovered row entirely and flips below the row when that row is near the top of the viewport, so the tallest crop is never clipped.

Test plan

  • pnpm typecheck, pnpm lint, pnpm test (36/36)
  • All ten thumbnails verified visually — instrument only, no status text or page background
  • Browser-verified at 1440x900: both placements render, all thumb.jpg requests 200, no console errors
  • Card left edge aligns with the table (130px); right edge 550px clears the first sector column at 559px
  • Reviewer: confirm the ~400KB of committed JPEGs is acceptable alongside the existing tracked preview builds
  • Reviewer: bench thumbs is a manual step, not wired into seal — a newly published preview shows no card until it is run

Hovering a leaderboard row on desktop shows a cropped screenshot of that
run's keyboard. Every run places the instrument differently, so the crop is
found in the DOM rather than hard-coded: locate the keyboard, then walk up to
the painted chassis containing it, which drops the surrounding status text and
page background. Thumbnails sit beside the preview build they were shot from,
so the gallery derives the URL from previewPath with no new run.json field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stagebench Ready Ready Preview, Comment Jul 18, 2026 8:09am

Request Review

@wustep
wustep merged commit 9ac933b into main Jul 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant