fix(traces): add precision to waterfall ticks to prevent duplicate labels#2652
Conversation
🦋 Changeset detectedLatest commit: afe63dd 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.
|
Greptile SummaryThis PR fixes duplicate tick labels on the trace waterfall and minimap when traces are short or heavily zoomed in. It extends
Confidence Score: 5/5Safe to merge — all changes are confined to display formatting helpers with no effect on data fetching, state management, or business logic. The change touches only label-rendering utilities and the React key for minimap ticks. The new No files require special attention. Important Files Changed
Reviews (6): Last reviewed commit: "Merge branch 'main' into cursor/waterfal..." | Re-trigger Greptile |
E2E Test Results✅ All tests passed • 241 passed • 1 skipped • 1048s
Tests ran across 4 shards in parallel. |
8a91a4d to
edd3e04
Compare
🔵 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
|
Deep Review✅ No critical issues found. This is a small, well-tested, backward-compatible change. No P2 findings. 🔵 P3 nitpicks (2)
Reviewers (6): correctness, testing, maintainability, project-standards, kieran-typescript, julik-frontend-races. Testing gaps: The cursor↔axis width-source equivalence (the mechanism that keeps cursor precision matched to tick precision) is asserted only by comment, not by a test that pins the two derivations together. |
|
Great change! |
Summary
On the trace minimap and waterfall viewer, short traces (or traces zoomed in far enough) produced duplicate tick values for values that rounded to the same ms value. Now, we ensure that adjacent tick labels differ by adding precision when adjacent values would round to the same number.
What changed
Before
Screen.Recording.2026-07-16.at.8.30.18.AM.mov
After
Screen.Recording.2026-07-16.at.8.29.32.AM.mov
How to test in Preview
Pick a relatively short trace and zoom way in. Observe the trace viewer ticks and cursor/tooltip.
References
Closes HDX-4803
Closes #2650