Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 0a3f111 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
E2E Test Results✅ All tests passed • 469 passed • 1 skipped • 1016s
Tests ran across 4 shards in parallel. |
Duplicate code analysis4 new clones introduced by this PR.
If one of these duplicates a helper that already exists, import it instead jscpd compared this branch against |
d66d87f to
b1de8d0
Compare
0eae6c9 to
c9ebd71
Compare
🔴 Tier 4 — CriticalTouches authentication, tenancy data models, the public API or shipped database config — or substantially changes the query rendering engine, background tasks, the OTel pipeline, image build, or release CI. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
PR Review
2 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 2 minor None could be anchored to changed lines; they are listed below. Findings outside the changed lines2 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Deep Review✅ No critical issues found. The core risk in this PR — widening 🟡 P2 — recommended
🔵 P3 nitpicks (3)
Reviewers (10 dispatched): correctness, adversarial, security, api-contract, kieran-typescript, frontend-races, testing, maintainability, previous-comments, project-standards. Previous-comments and project-standards returned clean; previous-comments confirmed the Testing gaps: API-level test that the 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 |
6e0d854 to
a3c9c2f
Compare
c9ebd71 to
c07163c
Compare
| const renderConnectionIcon = () => <IconServer size={16} />; | ||
|
|
||
| /** A connection variable's picker. */ | ||
| export const ConnectionDashboardFilter = ({ |
There was a problem hiding this comment.
🔵 minor — A connection variable pointing to a deleted connection looks unselected, but tiles keep querying it
ReferenceVariableSelect hides a value that is no longer in the list (lines 67-71), so the new ConnectionDashboardFilter shows the 'required' warning when the saved connection ID has been deleted. But useDashboardFilters.tsx:252-257 builds connectionValues and referenceVariableValues without checking the ID against existing connections. It does check data source variables against the existing sources (lines 258-277). As a result, tiles, SQL query filters and data source variables limited to $conn keep resolving to the deleted ID instead of being blocked as missing a selection. Fix: drop a connection variable selection whose ID is not in useConnections() data, the same way data source selections are dropped.
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
a3c9c2f to
8ab2030
Compare
8ab2030 to
b6a6b5b
Compare
c07163c to
c7d029e
Compare
b6a6b5b to
5863153
Compare
c7d029e to
42ee6ec
Compare
5863153 to
bc2ecb1
Compare
42ee6ec to
993b901
Compare
| isSourceVariableAccepted(variable, allowedSourceKinds), | ||
| (!allowedSourceKinds || | ||
| isSourceVariableAccepted(variable, allowedSourceKinds)) && | ||
| (!connection || |
There was a problem hiding this comment.
Should a data source variable with no connection limit be offered to a raw SQL tile that runs on a fixed connection?
It passes this filter, so a viewer can pick a source on another connection and the tile shows the "different connection" placeholder. Is that the intended trade-off, or would it be better to offer only variables limited to the tile's connection?
(!connection || variable.connection === connection)There was a problem hiding this comment.
That is the intended trade-off for now.
Something I want to add as a follow up is the ability for the connection input to refer to a source variable, basically meaning "use the connection associated with this source." I want to offer the flexibility of changing both connection and source, but it's currently a little annoying to have to change both. Once that is in place, I would hope that there are few cases of users with a fixed connection and a variable source that may not belong to that connection.
bc2ecb1 to
a808f3c
Compare
993b901 to
0a3f111
Compare
Summary
PR 5/5 adding data source and data connection type variables. This PR adds a UI for defining, rendering, and referencing a connection variable in dashboard tiles (raw sql tiles) and filters (source variables).
Source and connection variables allow for dashboards variable inputs that define a source or connection queried by a tile or other filters. Selected values are stored in source or connection id slots in the saved chart config, in the
$varNameformat, then converted to source or connection IDs at runtime when there is a selection.Variables are substituted prior to rendering the dashboard, at the top level, so that components and configs down the stack can just use source and connection IDs like they have been.
Direct
$sourcereferences are not yet allowed in SQL tiles - the source is selected at the chart level and $__sourceTable can be used to reference it. Connection variables are mostly only useful for (a) raw sql tiles and (b) source variables that can be scoped to a single connection, dynamically.Screenshots or video
Screen.Recording.2026-11-16.at.3.26.32.PM.mov
How to test on Vercel preview
Create a dashboard, add some connection and source variables, try it out
References