fix: Fix duplicate key error on trace viewer ticks#2650
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 7bd23e7 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 |
🔵 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 minimal, correct fix. 🔵 P3 nitpicks (2)
Reviewers (4): correctness, testing, maintainability, kieran-typescript. Testing gaps: The behavioral change (React key derived from |
E2E Test Results✅ All tests passed • 237 passed • 3 skipped • 1539s
Tests ran across 4 shards in parallel. |
|
Closing in favor of #2652 |
…bels (hyperdxio#2652) # 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 - Trace viewer and trace minimap tick labels now show just enough precision to ensure that adjacent values are different - The trace viewer cursor / tooltip displays precision matching the tick labels ### Before https://github.com/user-attachments/assets/dd4cbcf2-495c-4b72-b4fc-b5476e78fae9 <img width="1079" height="439" alt="Screenshot 2026-07-16 at 8 45 27 AM" src="https://github.com/user-attachments/assets/8ba7bb1d-acd8-44f0-9a29-5b363ffe1dc8" /> ### After https://github.com/user-attachments/assets/a4a514eb-9593-46f7-99ab-69d37f682545 <img width="1057" height="360" alt="Screenshot 2026-07-16 at 8 45 19 AM" src="https://github.com/user-attachments/assets/4f9838b4-d2ab-434c-8d5e-b1a459681640" /> ## 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 hyperdxio#2650
Summary
This PR fixes a duplicate key error logged by react for the trace minimap when multiple time ticks rounded to the same label. The key is now the unique
valinstead of the rounded value.Screenshots or video
Before
Duplicate ticks:
Duplicate key errors:
After
None of the same warnings
How to test on local
Lookup trace id:
75f6402fba79e0c0501bd07191530342and show logs only. The warning won't appear in the preview environment because it's a prod build.References