Skip to content

feat(dashboard): add widget add, edit, and delete commands#407

Draft
betegon wants to merge 2 commits intofeat/dashboard-commands-corefrom
feat/dashboard-widget-commands
Draft

feat(dashboard): add widget add, edit, and delete commands#407
betegon wants to merge 2 commits intofeat/dashboard-commands-corefrom
feat/dashboard-widget-commands

Conversation

@betegon
Copy link
Member

@betegon betegon commented Mar 12, 2026

Summary

  • Add sentry dashboard widget add — add a widget with inline --display/--query/--where/--group-by/--sort/--limit flags
  • Add sentry dashboard widget edit — edit an existing widget by --index or --title, merging only changed fields
  • Add sentry dashboard widget delete — remove a widget by --index or --title
  • Add widget formatters (formatWidgetAdded, formatWidgetDeleted, formatWidgetEdited)

All widget commands use the GET-modify-PUT pattern with server field stripping and auto-layout for new widgets.

Stacked on #406.

Test plan

  • bun run typecheck — no new type errors
  • bun run lint — passes
  • bun test test/types/dashboard.test.ts — 53 tests pass

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Dashboard

  • Add widget add, edit, and delete commands by betegon in #407
  • Add dashboard list, view, and create commands by betegon in #406

Init

  • Add --team flag to relay team selection to project creation by MathurAditya724 in #403
  • Enforce canonical feature display order by betegon in #388
  • Accept multiple delimiter formats for --features flag by betegon in #386
  • Add git safety checks before wizard modifies files by betegon in #379
  • Add experimental warning before wizard runs by betegon in #378
  • Add init command for guided Sentry project setup by betegon in #283

Issue List

  • Auto-compact when table exceeds terminal height by BYK in #395
  • Redesign table to match Sentry web UI by BYK in #372

Other

  • (trial) Auto-prompt for Seer trial + sentry trial list/start commands by BYK in #399
  • Support SENTRY_HOST as alias for SENTRY_URL by betegon in #409
  • Add --dry-run flag to mutating commands by BYK in #387
  • Return-based output with OutputConfig on buildCommand by BYK in #380
  • Add --fields flag for context-window-friendly JSON output by BYK in #373
  • Magic @ selectors (@latest, @most_frequent) for issue commands by BYK in #371
  • Input hardening against agent hallucinations by BYK in #370
  • Add response caching for read-only API calls by BYK in #330

Bug Fixes 🐛

Init

  • Remove implementation detail from help text by betegon in #385
  • Truncate uncommitted file list to first 5 entries by MathurAditya724 in #381

Other

  • (api) Convert --data to query params for GET requests by BYK in #383
  • (docs) Remove double borders and fix column alignment on landing page tables by betegon in #369
  • Add trace ID validation to trace view + UUID dash-stripping by BYK in #375

Internal Changes 🔧

Init

  • Remove --force flag by betegon in #377
  • Remove dead determine-pm step label by betegon in #374

Other

  • Convert list command handlers to return data instead of writing stdout by BYK in #404
  • Split api-client.ts into focused domain modules by BYK in #405
  • Migrate non-streaming commands to CommandOutput with markdown rendering by BYK in #398
  • Convert Tier 2-3 commands to return-based output and consola by BYK in #394
  • Convert remaining Tier 1 commands to return-based output by BYK in #382
  • Converge Tier 1 commands to writeOutput helper by BYK in #376

Other

  • Minify JSON on read and pretty-print on write in init local ops by MathurAditya724 in #396

🤖 This preview updates automatically when you update the PR.

@betegon betegon force-pushed the feat/dashboard-commands-core branch from 02c23d0 to f05f91a Compare March 13, 2026 09:39
@betegon betegon force-pushed the feat/dashboard-widget-commands branch from 17da821 to 64ddb86 Compare March 13, 2026 09:40
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

Codecov Results 📊

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

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 89.00%. Project has 781 uncovered lines.
❌ Project coverage is 96.44%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
human.ts 94.07% ⚠️ 77 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    96.68%    96.44%    -0.24%
==========================================
  Files          159       170       +11
  Lines        21011     21924      +913
  Branches         0         0         —
==========================================
+ Hits         20314     21143      +829
- Misses         697       781       +84
- Partials         0         0         —

Generated by Codecov Action

@betegon betegon force-pushed the feat/dashboard-widget-commands branch from 2a0361d to 38e3eda Compare March 13, 2026 11:14
betegon and others added 2 commits March 13, 2026 12:22
Add three widget management subcommands under `sentry dashboard widget`:
- `widget add` — add a widget with inline --display/--query/--where/--group-by flags
- `widget edit` — edit an existing widget by --index or --title, merging only changed fields
- `widget delete` — remove a widget by --index or --title

All widget commands use GET-modify-PUT pattern with server field stripping
and auto-layout for new widgets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…o shared module

- Move resolveWidgetIndex from edit.ts to resolve.ts (shared by edit + delete)
- Extract validateWidgetEnums to resolve.ts (shared by add + edit)
- Remove inline enum validation from add.ts and edit.ts
- Remove inline widget-index logic from delete.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@betegon betegon force-pushed the feat/dashboard-widget-commands branch from 1f3a700 to 0d179ef Compare March 13, 2026 11:22
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.

1 participant