Skip to content

feat(dashboard): add layout/position flags to widget edit and add commands#591

Merged
BYK merged 5 commits intomainfrom
feat/dashboard-widget-layout-flags
Mar 27, 2026
Merged

feat(dashboard): add layout/position flags to widget edit and add commands#591
BYK merged 5 commits intomainfrom
feat/dashboard-widget-layout-flags

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Mar 27, 2026

Summary

  • Add --x, --y, --width, --height flags to dashboard widget edit and dashboard widget add commands for controlling widget position and size in the 6-column dashboard grid
  • Partial overrides supported in widget edit — omitted layout values preserve the existing layout
  • In widget add, explicit layout values override auto-layout defaults
  • Validation enforces grid bounds (x: 0–5, width: 1–6, x + width ≤ 6, height ≥ 1)
  • Human output now shows layout info (Layout: position (x,y), size w×h) for edited/added widgets

Closes #540

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 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 layout/position flags to widget edit and add commands by BYK in #591
  • (init) Surface server-provided detail in spinner messages by MathurAditya724 in #588
  • AsyncIterable streaming support for library SDK by BYK in #586

Bug Fixes 🐛

Dashboard

  • Normalize numeric org IDs from DSN auto-detection by BYK in #593
  • Show actionable error messages instead of raw API errors by BYK in #592

Other

  • (auth) Skip stale cached user info for env var tokens in auth status by BYK in #589
  • (upgrade) Move delta patch log.info outside spinner callback by BYK in #590

Internal Changes 🔧

  • Regenerate skill files and command docs by github-actions[bot] in 0276f760

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

PR Preview Action v1.8.1

QR code for preview link

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

Built to branch gh-pages at 2026-03-27 14:55 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

Codecov Results 📊

129 passed | Total: 129 | 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 99.41%. Project has 1269 uncovered lines.
✅ Project coverage is 95.69%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
src/lib/formatters/human.ts 93.75% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    95.68%    95.69%    +0.01%
==========================================
  Files          202       202         —
  Lines        29253     29415      +162
  Branches         0         0         —
==========================================
+ Hits         27987     28146      +159
- Misses        1266      1269        +3
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review March 27, 2026 14:34
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

BYK and others added 5 commits March 27, 2026 14:54
…mands

Add --x, --y, --width, --height flags to `dashboard widget edit` and
`dashboard widget add` commands so users can control widget position and
size in the 6-column dashboard grid.

- `widget edit`: partial overrides supported — omitted values preserve
  existing layout
- `widget add`: explicit values override auto-layout defaults
- Validation enforces grid bounds (x: 0–5, width: 1–6, x+width ≤ 6)
- Human output now shows layout info for edited/added widgets
- Regenerated SKILL.md

Closes #540
Replace magic numbers { x: 0, y: 0, w: 3, h: 2 } with a shared
FALLBACK_LAYOUT constant exported from dashboard.ts.
…aults

The initial validateWidgetLayout(flags) call only validates individual
flag ranges. When only --x is provided, cross-validation (x + width)
was skipped because width was undefined. After assignDefaultLayout fills
in the default width, the merged layout could overflow the grid.

Now re-validates the final merged layout to catch cross-dimensional
overflow (e.g., --x 5 on a table widget with auto-width 6).
…outless widgets

Same pattern as the add command fix — when an existing widget has no
layout, the early validateWidgetLayout call can't cross-validate x+width
because the fallback dimensions aren't known yet. Now re-validates the
merged replacement layout when the existing widget had no layout.
@BYK BYK force-pushed the feat/dashboard-widget-layout-flags branch from d1bbd8d to b8b7d97 Compare March 27, 2026 14:55
@BYK BYK merged commit 2cdb867 into main Mar 27, 2026
23 checks passed
@BYK BYK deleted the feat/dashboard-widget-layout-flags branch March 27, 2026 19:05
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.

dashboard widget edit: no flags to set widget layout/position

1 participant