Skip to content

Add direct trace search redirect#2113

Open
fleon wants to merge 1 commit intomainfrom
fleon/hdx-3961
Open

Add direct trace search redirect#2113
fleon wants to merge 1 commit intomainfrom
fleon/hdx-3961

Conversation

@fleon
Copy link
Copy Markdown
Contributor

@fleon fleon commented Apr 14, 2026

Summary

Allow manually constructed /trace URLs to land in the existing search experience with the trace viewer opened from URL state. This keeps trace deep links user-friendly while reusing the search page for source selection, not-found handling, and trace inspection.

Screenshots or video

https://uploads.linear.app/158526bc-703f-4ea7-a6ff-9dbc61b77628/340aba1f-eab7-45dd-a1f6-216199e96d98/1c0193fa-ebc2-4238-aeb1-7166592483f9

How to test locally or on Vercel

  1. Click a log entry, view the traces tab
  2. Copy the trace ID
  3. Visit /trace/:trace_id: redirects to search with traces search open in the background
  4. Select a source
  5. Trace visible in a direct access.

References

Fixes HDX-3961

Allow manually constructed /trace URLs to land in the existing search experience with the trace viewer opened from URL state. This keeps trace deep links user-friendly while reusing the search page for source selection, not-found handling, and trace inspection.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 14, 2026

⚠️ No Changeset found

Latest commit: 4a701d1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Error Error Apr 14, 2026 3:46pm

Request Review

@github-actions github-actions bot added the review/tier-3 Standard — full human review required label Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🟡 Tier 3 — Standard

Introduces new logic, modifies core functionality, or touches areas with non-trivial risk.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: Full human review — logic, architecture, edge cases.
SLA: First-pass feedback within 1 business day.

Stats
  • Files changed: 12
  • Lines changed: 448 (+ 753 in test files, excluded from tier calculation)
  • Branch: fleon/hdx-3961
  • Author: fleon

To override this classification, remove the review/tier-3 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions
Copy link
Copy Markdown
Contributor

PR Review

✅ No critical issues found.

This is a solid implementation with good test coverage. A few observations worth noting:

  • Security fix included: The pre-existing SQL injection in DBTraceWaterfallChart.tsx (where: \${alias.TraceId} = '${traceId}'`) is correctly fixed to use SqlString.escape(traceId), and the new buildDirectTraceWhereClause` util applies the same pattern consistently.

  • useMemo mutation bug fixed: rows.sort() was previously mutating the memoized array outside the memo body — correctly moved inside useMemo.

  • ⚠️ // @ts-ignore on TraceRedirectPage.getLayout = withAppNav (pages/trace/[traceId].tsx:41) — if other pages in the codebase have a typed getLayout pattern, prefer it over the ignore comment.

  • ⚠️ In DirectTraceSidePanel.tsx, the directTraceFilterAppliedRef reset condition (if (!directTraceId || !directTraceSource) { ref.current = null }) could spuriously reset during a React Query refetch if directTraceSource briefly becomes undefined. React Query keeps stale data during refetches so this is unlikely in practice, but worth verifying the useSource hook returns stale data while revalidating.

@github-actions
Copy link
Copy Markdown
Contributor

E2E Test Results

All tests passed • 0 passed • 0 skipped • 70s

Status Count
✅ Passed 0
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 0

Tests ran across 3 shards in parallel.

View full report →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review/tier-3 Standard — full human review required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant