feat(desktop): show workspace pages in the PR pane summary rail
Merged
AV
2mo ago+647+647+012345678901234567890123456789-17-17-01234567890123456789
Summary
- The workspace PR pane's Summary tab gets a Pages section under the info rail: up to three page cards for the workspace, a count badge, and a "View all (+N more)" link to the pages route.
- Page cards with no captured thumbnail show a placeholder surface that stands out from the card, and hovering a card shows a wash in both themes.
Why / Context
Agents publish pages (test results, screenshots, CDP captures) for the work behind a PR, but the PR pane had no way to reach them. Reviewers had to leave the pane and hunt through the pages list. Showing the workspace's pages beside the PR summary keeps the evidence next to the thing it supports.
How It Works
usePullRequestEvidenceruns the cloudpage.listPaginated(limit 3) andpage.countsqueries for the workspace, only while the pane shows a linked PR on the Summary tab. Both refetch every 30 s and on window focus.PullRequestEvidencerenders the section with loading skeletons, an empty state, an error state with retry, and the view-all link when a next cursor exists.EvidencePageCardopens the page in a page pane through the existingopenPagePaneInStore; view-all navigates to/pagesscoped to the workspace.PullRequestPageBodynow measures its own width with a ResizeObserver and renders one info variant instead of both (it used to render rows and column and hide one in CSS, so the rail mounted twice). A newasideslot renders once: under the info column when wide, after the content when narrow.PullRequestSummaryContentpasses the Pages section through it, andPullRequestDetailContentthreads it in assummaryAside. The shared route view passes none, so the standalone PR page only gains the single-mount change.PageThumbnailaccepts aclassName. The card sits onbg-muted, and in the dark theme muted, accent, and border are the same hex, so the defaultbg-muted/40placeholder and thehover:bg-accentstate were both invisible there. The card passesbg-fill-hoverfor the placeholder and uses afill-hoveroverlay for hover, which reads in both themes.
Manual QA Checklist
- Open the PR pane for the workspace's linked PR: a Pages section with up to three cards in one row appears under the info rail
- A page without a captured thumbnail shows a lighter placeholder tile, not a flat card
- Hovering a card shows a visible wash in dark mode
- Clicking a card opens that page in a page pane
- With more than three pages, "View all (+N more)" opens the pages list for this workspace
- Narrow the pane below 52rem: the info folds into rows under the header and the Pages section moves after the content, mounted once
- A PR that is not the workspace's linked PR shows no Pages section
- The standalone pull-requests route renders as before
Testing
bun test --isolateon the pull-requests folder (48) and the PullRequestPane folder (10) pass. The pane suite also passes in one shared process, which is what the fixture rewrite fixes. A newPullRequestPageBodytest checks one info variant and one aside at 600px and 1000px.bun run check:i18n: clean. The only new string reuses the existing "Pages" entry.bun run typecheckinapps/desktop: 28 errors, all the pre-existing local Better Auth type split inpackages/authandpackages/trpc, none in changed files.biome checkon every changed desktop file: clean.- Not yet verified visually in the running app. The dev stack is up with CDP enabled, so that is the next step before merge.
Design Decisions
- Translucent hover wash instead of a replacement color: every muted-surface hover in the desktop swaps to another token, and in dark mode the candidate tokens equal the card's resting color. An overlay stacks on whatever the card is, so it works without caring about the parent surface.
asideslot on the summary component instead of rendering in the pane: keeps the pages section inside the info rail's layout at both rail variants rather than bolting a second column onto the pane.
Known Limitations
- The view-all arrow in the section header was removed for now; the link under the grid is the only entry point.
- The fixture in
PullRequestPane/fixtures/checks.tsxstill module-mocks@superset/workspace-client. That predates this branch and is left for a separate cleanup.
Summary by cubic
Shows a workspace's pages (test results, screenshots, CDP captures) as up to three cards in the PR pane Summary tab's info rail, with a count badge and a "View all" link to the pages route. The section renders only for the workspace's linked PR; the standalone pull-requests route is unchanged.
- Cards open the page in a page pane; view-all navigates to the pages list scoped to the workspace.
- The page list and count queries run only while the Summary tab shows a linked PR and refetch every 30 s and on window focus.
- Page cards without a captured thumbnail show a placeholder that stands out from the card, and a hover wash that reads in dark mode.
- The "View all (+N more)" string is translated count-neutrally in fr, it, and cs.
- The summary rail now measures the body's width and renders a single info variant, so the aside mounts once and lands after the content in narrow panes instead of above it.
Summary by CodeRabbit
- New Features
- Pull request summaries can show related workspace pages with thumbnails, titles, and the number of additional pages available.
- Select a page to open it in the workspace, or choose View all to browse the complete page list.
- Evidence panels display loading, empty, and error states, with an option to retry after an error.
- Localization
- Added translations for the View all label in supported languages.