fix: SQL error when clicking search on a log while viewing trace - #2825
fix: SQL error when clicking search on a log while viewing trace#2825karl-power wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: b2487a7 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.
|
🔵 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
|
Greptile SummaryThe PR fixes cross-source searches from trace and row detail panels by rebinding generated search URLs to the selected event’s source and disabling source-specific filter and column actions when schemas differ.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/app/src/components/DBRowSidePanel.tsx | Introduces centralized source-aware context derivation and applies it to resolved leaf rows. |
| packages/app/src/components/DBTracePanel.tsx | Provides selected trace or log events with context rebound to their resolved source. |
| packages/app/src/components/tests/DBTracePanel.test.tsx | Verifies cross-source URL generation and gating of incompatible filter actions. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Search source context] --> B[Open trace or row detail]
B --> C[Resolve selected event source]
C --> D[Derive row-side-panel context]
D --> E[Generate Search URL with event source]
D --> F{Same source?}
F -->|Yes| G[Retain filter and column actions]
F -->|No| H[Disable source-specific actions]
Reviews (2): Last reviewed commit: "fix: SQL error when clicking search on a..." | Re-trigger Greptile
E2E Test Results✅ All tests passed • 271 passed • 1 skipped • 1066s
Tests ran across 4 shards in parallel. |
0d08bff to
b2487a7
Compare
| ], | ||
| "ignoreBinaries": ["make", "migrate"], | ||
| "ignoreBinaries": ["make", "migrate", "stryker"], | ||
| "ignoreDependencies": [ | ||
| "@dotenvx/dotenvx", | ||
| "concurrently", | ||
| "dotenv", | ||
| "babel-plugin-react-compiler" | ||
| "babel-plugin-react-compiler", | ||
| "@stryker-mutator/core" | ||
| ], |
There was a problem hiding this comment.
Deep Review
✅ No critical issues found. The core fix is sound: 🟡 P2 -- recommended
🔵 P3 nitpicks (5)
Reviewers (10): correctness, adversarial, testing, maintainability, kieran-typescript, julik-frontend-races, api-contract, project-standards, agent-native, learnings-researcher. Testing gaps:
|
Summary
Opening a trace and clicking a Search action on a log event from the waterfall threw a SQL error. The Search actions built a
whereclause from the log's columns but generated a/searchURL that kept the searched (traces) source, so log columns were queried against the trace table. The same bug existed in the mirror direction (span selected from a Logs search) and for cross-source pushed frames (e.g. a span-link "View Trace" hop). Manually switching to the logs view first worked, confirming only the source binding was wrong.Screenshots or video
Bug repro:
Screen.Recording.2026-08-06.at.14.25.08.mov
How to test on Vercel preview
Preview routes:
/searchSteps:
Traces search → open trace → click log event → Search now lands on the logs source with the where clause applied, no SQL error.
References