Repository navigation
fix(web): hovering a commit marker opens its commit card again - #2578
Conversation
The Foldkit port left the marker hover as a TODO, so a grouped marker
("+2") only showed its first label in a native title tooltip. Hovering a
label (or a dash on a chart too dense for labels) now opens a card that
lists every commit in the group: avatar, subject, author, age and sha.
Every commit in a group is looked up, not only the representative. Wired
on the service Overview grid, the API tab's responses chart and the
release detail grid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Foldkit refuses event handlers nested in a submodel's view inputs, so the marker layer can no longer ride in the chart's `overlay` input. It now sits beside the chart in the same wrapper (the plot box fills it, so the geometry lines up unchanged). Adds /lab/bench/service-detail-markers, the grid with a grouped deploy to hover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Maple review🟢 Confidence 8/10 · likely safe to merge. The marker card is wired the way the existing commit card is, but its own open path and row rendering ship untested. Hovering a deploy marker now opens a card listing the commits first seen in that bucket, wired on the service Overview grid, the API responses chart and the release detail grid. The wiring follows the existing commit-card pattern; the gap is that the card's own behaviour is not pinned by a test.
Findings🟠 Warning · F1 · The marker card's open path and its rows have no testtests ·
🤖 Prompt to fix this finding with an AI agent
|
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
| markersOverlay(h, markerLayout(markers, plot), plot, MARKER_LABEL_GAP, "all", { | ||
| ...markerCardOf(model, inputs.timeZone), | ||
| scope: "markers-api-responses", | ||
| }), |
There was a problem hiding this comment.
🟡 API deploy cards lack commit details
Opening the API tab directly makes markerCardOf show unavailable details for deploys with resolvable SHAs. commitsStep runs only on the Overview tab, so those commits load only after visiting Overview.
Learn more
The API responses chart draws deploy markers from the service overview's release timeline, but the page loads commit details only through overviewTabSteps. A direct API-tab visit still fetches the service overview, while apiTabSteps never invokes the commit lookup. The new hover card reads model.commits, so each unresolved SHA gets an unavailable row rather than its subject and author.
Example: Visit /services/orders?tab=api with a deploy at noon and a connected VCS repository. Hovering its marker shows “Commit details unavailable”; visiting Overview and returning loads the commit and fills the card.
Recommended fix: Run commitsStep(context) on the API tab once overview data is available, preferably in a shared step used by both tabs. Keep the existing missing-SHA check to avoid duplicate requests.
Was this helpful? React with 👍 or 👎 to provide feedback.
| } | ||
|
|
||
| /** The card's body for one marker group: a header, one row per commit, and the overflow count. */ | ||
| export const markerCardBody = <M>( |
There was a problem hiding this comment.
Warning
The marker card's open path and its rows have no test
F1 · Warning · tests
markers.test.ts pins only markerShas. Nothing exercises what this PR adds: markersOverlay handing triggerFor to a label or dash, the groupOf lookup that resolves a trigger to its group, or markerCardBody listing a merged group's commits with the +N more cap. The repository scene-tests hover cards of exactly this shape.
Add a scene test: hover a grid marker label, resolve `WaitHoverDelay` and `MountHoverCard`, then assert the card lists every commit of the merged group and stops at `MARKER_CARD_COMMITS` with `+N more`.
🤖 Prompt to fix with an AI agent
In `apps/web/src/page/kit/service-metrics/marker-card.ts:70-74`: The marker card's open path and its rows have no test.
`markers.test.ts` pins only `markerShas`. Nothing exercises what this PR adds: `markersOverlay` handing `triggerFor` to a label or dash, the `groupOf` lookup that resolves a trigger to its group, or `markerCardBody` listing a merged group's commits with the `+N more` cap. The repository scene-tests hover cards of exactly this shape.
Suggested fix: Add a scene test: hover a grid marker label, resolve `WaitHoverDelay` and `MountHoverCard`, then assert the card lists every commit of the merged group and stops at `MARKER_CARD_COMMITS` with `+N more`.
Verify the problem exists at that location before changing it, and keep the fix to those lines.
Hovering a deploy marker on the service charts did nothing useful: the Foldkit port left the marker card as a
TODO(marker-cards), so a label only had a nativetitletooltip with its first commit, and a grouped marker (+2) never showed the other commits.Hovering a marker label now opens a card listing every commit first seen in that bucket: avatar, subject, author, age and short sha (up to 8, then "+N more"). On a chart too dense for labels, the dashes open it. The hovered label and dash take the active style.
kit/service-metrics/marker-card.ts: the card body and itsHoverCardinit. One card per page, shared by every chart.markerShaslooks up every commit in a group, not only the representative, so the extra rows resolve.overlayinput: Foldkit refuses event handlers nested in a submodel's view inputs. The plot box fills the wrapper (measured offset 0,0 on all four charts), so marker positions are unchanged./lab/bench/service-detail-markers: the grid with a grouped deploy, to try it without sign-in.Before / after
Before (production, native title tooltip, first commit only):
After (lab bench, hovering the
+2group):Verification
oxlint -c .oxlintrc.effect.jsonclean on the touched files;ui:patterns:checkOK.markers.test.tsfor the commit lookups.preview:webdeploy would cover that.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.