Repository navigation
fix: wrap long values in release marker tooltips - #3391
Conversation
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
🦋 Changeset detectedLatest commit: bae04f3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
[Low impact] The PR appears safe to merge, with the earlier non-blocking concern about hidden releases only partly addressed.
|
| <Text size="xs" c="dimmed" style={wrapLongValue}> | ||
| {member.group} | ||
| </Text> | ||
| )} | ||
| <Text size="xs" fw={500} style={{ whiteSpace: 'nowrap' }}> | ||
| <Text size="xs" fw={500} style={wrapLongValue}> |
There was a problem hiding this comment.
Lower releases become unreadable
Wrapping makes clustered release rows taller, but ChartTooltipContainer still caps its content at 200px. A cluster that previously fit can now hide its lower releases behind a vertical scrollbar. Since AnnotationTooltip sets pointerEvents: 'none', users cannot scroll to them. Provide a reachable scroll or pinned view for wrapped content that exceeds the cap.
E2E Test Results✅ All tests passed • 431 passed • 1 skipped • 1815s
Tests ran across 4 shards in parallel. |
…t cap Co-authored-by: Mike Shi <mike@hyperdx.io>
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
|
|
||
| // Release-marker tooltip only. Its values wrap over several lines each, so the | ||
| // shared cap above clips a cluster of releases almost immediately. | ||
| .annotationTooltipContent { |
There was a problem hiding this comment.
🟠 major — Releases past 500px still sit behind a scrollbar nobody can reach
.annotationTooltipContent raises the height cap but keeps the overflow-y: auto it inherits from .chartTooltipContent. The tooltip is pointer-events: none (AnnotationTooltip.tsx:62), and members has no upper bound (chartAnnotations.tsx:222 slices the whole cluster). So a big cluster of wrapped rows still overflows into a scrollbar that can't be used, which is the same problem this PR fixes for width. Do what .chartTooltipContentClipped already does (overflow: hidden), and cap the rendered rows with a "+N more" line so the cut is visible.
Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond
There was a problem hiding this comment.
Separate fix - and it would be annoying.
| // Release-marker tooltip only. Its values wrap over several lines each, so the | ||
| // shared cap above clips a cluster of releases almost immediately. | ||
| .annotationTooltipContent { | ||
| max-height: 500px; |
There was a problem hiding this comment.
🔵 minor — Fixed 500px cap ignores viewport height for a tooltip that never flips
The tooltip is position: fixed and always opens downward from the marker (top: point.y + 6), with no flip or clamp. A 500px list plus the header runs off the bottom of the screen for tiles in the lower part of a dashboard or on short viewports. Before, the 200px cap mostly hid this. Bound it to the viewport the way the series list at line 51 does, e.g. max-height: min(500px, 40vh).
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review
3 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 3 minor 3 posted as inline comment(s) on the changed lines. Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Deep ReviewA small, well-scoped frontend change: release-marker tooltip rows now wrap long service names and versions instead of overflowing a fixed-width, ✅ No critical issues found. 🟡 P2 -- recommended
🔵 P3 nitpicks (2)
Reviewers (6 dispatched): correctness, testing, maintainability, project-standards, kieran-typescript, previous-comments. Findings synthesized from the correctness reviewer plus orchestrator-level verification; the remaining reviewers were dispatched and their likely scope (CSS-module test behavior, changeset convention, inline-style/type correctness, prior-comment disposition) was independently checked. Independently verified (no finding): CSS modules map to Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
|
|
||
| // Release-marker tooltip only. Its values wrap over several lines each, so the | ||
| // shared cap above clips a cluster of releases almost immediately. | ||
| .annotationTooltipContent { |
There was a problem hiding this comment.
🔵 minor — Release tooltip still gets a scrollbar the pointer can't reach once content passes 500px
.annotationTooltipContent only raises max-height. It still inherits overflow-y: auto from .chartTooltipContent, and the portal wrapper in AnnotationTooltip.tsx sets pointerEvents: 'none'. So when a large release cluster with wrapped values grows past 500px, it gets the same unreachable scrollbar this PR is trying to remove. Add overflow: hidden to match the hover-only .chartTooltipContentClipped rule a few lines above, or reuse that pattern.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
| // Release-marker tooltip only. Its values wrap over several lines each, so the | ||
| // shared cap above clips a cluster of releases almost immediately. | ||
| .annotationTooltipContent { | ||
| max-height: 500px; |
There was a problem hiding this comment.
🔵 minor — 500px tooltip opens below the marker with no viewport clamp
AnnotationHitLayer.tsx anchors the tooltip at the bottom of the label band, which is the top of the chart, and AnnotationTooltip sets top = point.y + 6 with no flip or clamp. For a chart in the lower half of the screen, a tooltip that can now be 500px tall plus its header runs off the bottom of the viewport, and the user can't scroll it. Cap the height relative to the viewport, e.g. max-height: min(500px, calc(100vh - <anchor>)) passed as an inline style, or flip the tooltip above the marker when there isn't room below.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
| <Text | ||
| size="xs" | ||
| c="dimmed" | ||
| style={{ ...wrapLongValue, minWidth: SERVICE_MIN_WIDTH_PX }} |
There was a problem hiding this comment.
🔵 minor — minWidth set via raw style instead of a Mantine style prop
The Repository conventions say to prefer individual Mantine style props over raw styles. Use miw={SERVICE_MIN_WIDTH_PX} on the Text and keep only overflowWrap in style, since Mantine has no style prop for it.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
Summary
Release marker tooltip rows forced
white-space: nowrapon both the service name and the version. The tooltip is a fixed 280px wide and ispointer-events: none, so any value wider than that overflowed horizontally into a scrollbar the pointer could never reach — the text was simply unreadable. This shows up as soon as a source's version expression concatenates attributes beyondResourceAttributes['service.version'], which is the documented workaround for surfacing extra release metadata.Three changes, all scoped to the release marker tooltip:
overflow-wrap: anywhererather thanbreak-wordbecause onlyanywhereshrinks an element's min-content width, which is what thewrap="nowrap"flex row measures — withbreak-wordthe row would still be sized by its longest unbroken token and still overflow. The marker dot top-aligns (with a small offset to sit on the first line) now that a row can be several lines tall.annotationTooltipContentclass rather than raisingchartTooltipContent, which the series tooltips also use.Short values render as before, except that the 80px floor now lines the version column up across rows.
Screenshots or video
Five releases in one hovered cluster, two of them with a concatenated version value.
How to reproduce
Starting point:
yarn dev(the change needs a source whose Service Version Expression is edited in Team Settings).On
main:concat(ResourceAttributes['service.version'], ' — ', ResourceAttributes['k8s.cluster.name'], ' — ', ResourceAttributes['deployment.environment']).On this branch:
How to test on Vercel preview
N/A — reaching the tooltip requires editing a source's version expression in Team settings, which isn't available in LOCAL_MODE.
References
Linear Issue: HDX-5740