Skip to content

test(cli): Check dashboard and issue search arguments across commands - #1742

Merged
BYK merged 1 commit into
mainfrom
byk/cli-argument-conventions-dashboard
Oct 29, 2026
Merged

BYK merged 1 commit into
mainfrom
byk/cli-argument-conventions-dashboard

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Part of #1564. Follow-up to #1730 and #1739.

#1739 added argument-conventions.test.ts, which checks that commands sharing a parser read the same input the same way. #1730 then moved dashboards and issues onto the shared ID grammar, and dashboards and issues weren't in that test yet. This adds them. It only changes packages/cli/test/lib/argument-conventions.test.ts.

Dashboard commands: view, restore, revisions, and widget add/edit/delete must all read every DASHBOARD_INPUTS entry the same way dashboard view does:

  • Inputs: a bare ID or title, <org>/<id>, <org>/<project>/<id>, a separate target, <target> <title words…>, the bare-org fallback (My Dashboard), reversed arguments, extra arguments, and dashboard and org URLs.
  • Usage-hint text in warnings is normalized before comparing, and widget add's own widget title is removed first. widget add only gets inputs of up to 2 arguments, because its last argument is the widget title.
  • Per command: a missing dashboard fails at parse time, a pasted URL's server is applied on resolve and not on parse, widget add splits off its title, and widget add rejects more than 3 arguments.

dashboard list: its own block, because it reads a target plus a title filter, not a dashboard. A dashboard URL fails with a suggestion to use dashboard view.

Issue commands: ISSUE_INPUTS gains login timeout, so every issue command must read search text the same way issue resolve does. A separate test checks that it parses as { type: "search" }.

No lint allow-list changes: #1730 already removed the dashboard entries. The issue/utils.ts and issue/merge.ts entries are still in use and get migrated separately.

Verification:

  • argument-conventions.test.ts: 336 passed, 19 skipped.
  • Dashboard, issue and event command suites, plus the id-arguments and dashboard-arguments lib tests: 31 files pass.
  • pnpm run lint in packages/cli is clean, tsc --noEmit is clean, and scripts/cli-lint-rules.test.mjs passes 70/70.

via BYK.

--

View Junior Session in Sentry

Add the dashboard commands migrated to the shared ID grammar in #1730 to
the argument conventions suite: view, restore, revisions, and widget
edit, delete, and add must read every dashboard input the same way, and
dashboard list keeps its own target-and-filter reading. Issue commands
now also agree on text with spaces, which is a search.
@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Oct 29, 2026 10:06pm UTC

Request Review

@github-actions github-actions Bot added the risk: low PR risk score: low label Oct 29, 2026
@BYK
BYK enabled auto-merge (squash) October 29, 2026 22:13
@BYK
BYK merged commit 00c2ce9 into main Oct 29, 2026
26 checks passed
@BYK
BYK deleted the byk/cli-argument-conventions-dashboard branch October 29, 2026 22:18

This branch was previously deployed

1 inactive deployment
Preview — 09da0491 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant