Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: a808f3c 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 |
E2E Test Results✅ All tests passed • 467 passed • 1 skipped • 1003s
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 |
dc3094d to
99f91cc
Compare
e182a5c to
d66d87f
Compare
99f91cc to
ca49e2c
Compare
d66d87f to
b1de8d0
Compare
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
PR Review
3 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 3 minor 3 posted as inline comment(s) on the changed lines. 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 P0/P1 issues confirmed by the reviewers that completed, and direct inspection of the two highest-risk paths — the alert drop-on-save and the source-picker grouping — found them correct. See the coverage caveat at the bottom: several bug-focused reviewers did not return in time, so this is not a clean bill of health. The two prior-review blockers are addressed. The alert is no longer eagerly cleared from form state; 🟡 P2 -- recommended
🔵 P3 nitpicks (5)
Reviewers (6 of 11 returned): correctness-reviewer (did not return), testing-reviewer, maintainability-reviewer, project-standards-reviewer, agent-native-reviewer, learnings-researcher, kieran-typescript-reviewer (did not return), julik-frontend-races-reviewer (did not return), adversarial-reviewer (did not return), api-contract-reviewer (did not return), previous-comments-reviewer. Coverage caveat: The correctness, adversarial, API/data-contract, TypeScript, and frontend-races reviewers had not returned when output was required, so logic-error, failure-scenario, persisted-config-contract, type-safety, and async-timing dimensions are only partially covered. The clean P0/P1 result reflects the completed reviewers plus direct inspection of the alert-save path (correct), the Testing gaps: Adhoc-filter variable-reference validation/resolution; import carry-over of refs in 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 |
ca49e2c to
696e73e
Compare
b1de8d0 to
6e0d854
Compare
696e73e to
3569649
Compare
6e0d854 to
a3c9c2f
Compare
a3c9c2f to
8ab2030
Compare
6bc2461 to
a795499
Compare
8ab2030 to
b6a6b5b
Compare
a795499 to
48f2179
Compare
b6a6b5b to
5863153
Compare
48f2179 to
335259d
Compare
5863153 to
bc2ecb1
Compare
jordan-simonovski
left a comment
There was a problem hiding this comment.
One comment to fix, but otherwise looks good. Lmk when it's ready for re-review
| } | ||
| }, [configType, displayType, previousDisplayType, setValue]); | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
This effect seems to remove the tile's alert as soon as a variable is picked, and nothing tells the user.
The alert has to go when the tile is saved on a variable, but clearing it in the form means picking $logs and switching back to the original source
still saves the tile without its alert. Dropping it at save time, plus a line of text where the alert section was, might be enough:
const savedConfig = convertFormStateToSavedChartConfig(form, tableSource, sourceKind);
if (savedConfig && usesReferenceVariable && 'alert' in savedConfig) {
savedConfig.alert = undefined;
}There was a problem hiding this comment.
Good idea, I've fixed in a808f3c. The same behavior impacts display type and config type switching, that could be handled separately as well
| * A data source variable reference (`$name`) is portable as written, so | ||
| * import neither maps it nor asks the user to. | ||
| */ | ||
| const isVariableRef = (name: string | undefined) => |
There was a problem hiding this comment.
What happens on import if a tile references $name and the template declares no data source variable with that name?
There was a problem hiding this comment.
Before it would have failed when saving due to API validations, now I have added front-end validations on the import page 👍
…and ignore unusable selections in filter forms
bc2ecb1 to
a808f3c
Compare
| data-testid="source-selector" | ||
| allowedSourceKinds={allowedSourceKinds} | ||
| allowSourceVariables | ||
| connectionId={connection} |
There was a problem hiding this comment.
🔵 minor — Raw SQL editor filters sources by the unresolved connection, while EditTimeChartForm resolves it
EditTimeChartForm now resolves the connection with useResolvedReference(connection) for allowedSourceItems and for the preview connection check. RawSqlChartEditor still passes the stored connection to SourceSelectControlled connectionId and to tableConnections (s.connection === connection). If a raw SQL tile's connection is a $conn reference, which getFormReferenceVariables treats as valid, the source picker lists only variables and SQL completions are empty. Fix: resolve it once (const resolvedConnection = useResolvedReference(connection)) and use that for connectionId, tableConnections and rawSqlConfig.connection.
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
| details: ( | ||
| <Stack gap={0}> | ||
| {referenceIssues.map(issue => ( | ||
| <Text key={issue} c="red"> |
There was a problem hiding this comment.
🔵 minor — New import error list uses raw c="red", Title Case copy, and keys that can collide
The conventions say new status text should use <Text variant="danger">, not c="red", and UI copy should be sentence case ("Failed to import dashboard"). Also, key={issue} collides when two tiles or filters have the same name and the same bad reference, because getTemplateVariableReferenceIssues builds identical strings for them. That causes React duplicate-key warnings. This block also repeats the schema-error block just above it. Fix: move both into one helper that renders string[] with variant="danger" and index-based keys.
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
| * The required filters that block a preview with `applySelections` off: only | ||
| * the reference variables the tile can't be queried without. | ||
| */ | ||
| function getUnappliedPreviewBlockingFilterNames( |
There was a problem hiding this comment.
🔵 minor — getUnappliedPreviewBlockingFilterNames repeats the reference-variable matching in getBlockingRequiredFilters
packages/common-utils/src/dashboardFilterValues.ts:287-291 already pairs getReferenceVariableFilters(unsatisfiedRequiredFilters) with referenceVariableNames to find the blocking reference variables. This helper re-implements that matching in the app package. Fix: export the reference-variable subset from dashboardFilterValues (for example getBlockingReferenceVariableFilters) and call it here and inside getBlockingRequiredFilters, so the dashboard and the editor preview share one rule.
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
Summary
PR 4/5 adding data source and data connection type variables. This PR allows source variables to be referenced via the source dropdowns in the chart editor interface.
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.1.46.44.PM.mov
How to test on Vercel preview
The E2E feature can be tested on PR 5: #3656
References