Skip to content

feat(dashboard): add revision history and restore commands#936

Merged
MathurAditya724 merged 4 commits intomainfrom
issue-935-dashboard-revision-history
May 10, 2026
Merged

feat(dashboard): add revision history and restore commands#936
MathurAditya724 merged 4 commits intomainfrom
issue-935-dashboard-revision-history

Conversation

@MathurAditya724
Copy link
Copy Markdown
Member

Add sentry dashboard revisions and sentry dashboard restore commands to support dashboard revision history.

  • revisions lists saved revisions for a dashboard with cursor-based pagination
  • restore reverts a dashboard to a specific revision by ID
  • history alias available for revisions

Closes #935

Add `sentry dashboard revisions` to list revision history for a dashboard
and `sentry dashboard restore` to revert to a previous revision.

- New API functions: listDashboardRevisionsPaginated, restoreDashboardRevision
- DashboardRevision type with Zod schema
- Full cursor-based pagination support for revisions list
- `history` alias for `revisions` subcommand

Fixes #935
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-936/

Built to branch gh-pages at 2026-05-10 03:17 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@MathurAditya724
Copy link
Copy Markdown
Member Author

fix-ci: attempt 1 — dashboard revisions and dashboard restore missing from ORG_PROJECT_COMMANDS in complete.ts, causing the drift detection test to fail.

@MathurAditya724
Copy link
Copy Markdown
Member Author

fix-ci: added dashboard revisions and dashboard restore to ORG_PROJECT_COMMANDS in complete.ts. The drift detection test verifies all commands with org-positional placeholders are registered in the completion sets — the two new commands were missing. 431aac6

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Codecov Results 📊

6856 passed | Total: 6856 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +20
Passed Tests 📈 +20
Failed Tests
Skipped Tests

All tests are passing successfully.

❌ Patch coverage is 75.68%. Project has 14046 uncovered lines.
❌ Project coverage is 76.97%. Comparing base (base) to head (head).

Files with missing lines (3)
File Patch % Lines
src/lib/api/dashboards.ts 9.52% ⚠️ 38 Missing
src/commands/dashboard/revisions.ts 84.53% ⚠️ 28 Missing
src/commands/dashboard/restore.ts 84.21% ⚠️ 15 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    77.06%    76.97%    -0.09%
==========================================
  Files          317       319        +2
  Lines        60587     60988      +401
  Branches         0         0         —
==========================================
+ Hits         46688     46942      +254
- Misses       13899     14046      +147
- Partials         0         0         —

Generated by Codecov Action

@MathurAditya724 MathurAditya724 marked this pull request as ready for review May 8, 2026 18:02
@MathurAditya724
Copy link
Copy Markdown
Member Author

all CI checks green — lint, typecheck, unit tests, e2e, binary builds, and docs all pass. self-review looks clean: the two new commands follow existing dashboard command patterns, pagination and error handling are consistent, and completion sets are updated. marked ready for review.

Comment thread src/lib/api/dashboards.ts
Comment thread src/lib/api/dashboards.ts
…estore

- Fix placeholder from 'org/project/dashboard' to 'org/dashboard' since
  dashboards are org-scoped, not project-scoped
- Add test coverage for revisions and restore commands
@MathurAditya724 MathurAditya724 merged commit 3fa4503 into main May 10, 2026
28 checks passed
@MathurAditya724 MathurAditya724 deleted the issue-935-dashboard-revision-history branch May 10, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support dashboard revision history

1 participant