Repository navigation
feat(app): save a temporary dashboard with its content intact - #3729
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 00d1840 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
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
PR Review
2 finding(s): 🔴 0 P0/P1 · 🟡 2 P2 · 🔵 0 P3 1 posted as inline comment(s) on the changed lines. 1 listed below. Findings outside the changed lines
Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides. |
Deep Review✅ No critical issues found. This is a self-contained, well-tested client-side feature (save a temporary dashboard with its content). No P0/P1 ship-blockers: no data corruption, auth, injection, or guaranteed happy-path crash. The items below are recommended improvements and nits. 🟡 P2 -- recommended
🔵 P3 nitpicks (3)
Reviewers (11): correctness, adversarial, kieran-typescript, julik-frontend-races, reliability, testing, maintainability, project-standards, previous-comments, agent-native, learnings-researcher. Testing gaps: Save-button double-submit/disabled-on-click behavior is unverified. 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 |
E2E Test Results✅ All tests passed • 474 passed • 1 skipped • 1062s
Tests ran across 4 shards in parallel. |
a3d73bd to
7f111c3
Compare
7f111c3 to
1ab141d
Compare
| const viewDefaults = toViewDefaults({ | ||
| where, | ||
| whereLanguage: toWhereLanguage(whereLanguage), | ||
| rangeSeconds: (end.getTime() - start.getTime()) / 1000, |
There was a problem hiding this comment.
🟡 P2 — Saving a temporary dashboard always stores a default time range, even an odd one from a zoomed or absolute view
rangeSeconds comes from searchedTimeRange, which is always set, so every dashboard saved from a temporary one gets a savedDateRange. With the new hasSavedDefaults, that makes the menu say 'Update Default Query & Filters' and show 'Remove' even when the user never set a default. It also turns a chart drag-zoom (say 7m12.3s) into a permanent default of 'last 432.3s'. Fix: save a range only when the displayed input is a relative preset (for example, check displayedTimeInputValue against RELATIVE_TIME_OPTIONS in components/TimePicker/utils.ts). Otherwise leave savedDateRange unset.
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
When viewing a temporary dashboard, the banner said "This is a temporary dashboard and can not be saved."
Users that built a dashboard and wanted to keep it had no way to save their work. Now, there is a button to save the temporary dashboard:
Screenshots or video
Screen.Recording.2026-11-19.at.2.22.02.PM.mov
How to test on Vercel preview
Make a temporary dashboard and then try saving it
References
Fixes HDX-6108