Repository navigation
feat(init): redesign the completion screen around the first error - #1444
Conversation
Turn the exit screen into a guided handoff instead of a wall of text: what was installed, the one thing to do next (trigger an error and watch it land in the Issues feed), and a driveable menu of next steps. - Rebuild the screen in init's own visual idiom — numbered action steps, glyph-aligned rows, colour-coded hierarchy — and keep it mounted until the user dismisses it. - Link to the project's Issues stream instead of project settings; when the verify step catches the first event, celebrate it and deep-link that event. - Recover org/project from the settings URL when the server doesn't return the slugs, so the Issues link and MCP step work regardless of server version (see the companion cli-init-api change that sends them directly). - Drive next steps from the screen: open Issues in the browser, write the Sentry MCP config for an editor, or queue the agent-plugin installer to run in the real terminal after the alternate screen tears down. - Leave a compact confirmation in scrollback on exit rather than re-dumping the whole summary. Adds a `preview:completion` script to iterate on the screen without a full run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Use the bigger, bolder ▶ cursor across all init selectors (was a tiny ▸)
so the selection is unmistakable, and align the completion menu options
under the section title.
- Merge the "Here's what we set up" subheader into the ✔ headline
("Sentry is set up in <project>, with:") so it reads as one sentence.
- Add an inline "(o) to open" shortcut on the first-error link that opens it
in the browser directly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ee1c447. Configure here.
- Drop the hand-rolled MCP editor-config step (Cursor/VS Code/Claude Code only). The @sentry/ai plugin already wires the MCP server + skills into Cursor, Codex, Claude Code and Grok, so a separate, narrower MCP writer was redundant and missed Codex. The completion menu now offers just the agent-plugin install. - Trim the post-exit echo to a warm one-liner plus the Issues link, and drop the feedback prompt that chained onto the queued `npx @sentry/ai install`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… screen
The CLI creates the Sentry project itself — the `ensure-sentry-project` step
suspends with the `create-sentry-project` client tool, whose result already
carries `{orgSlug, projectSlug, projectId, dsn, url}`. Previously that data made
a redundant round-trip: the CLI sent it to the server, and the server echoed it
back in the workflow output just so the completion screen could build the Issues
link. This captures the tool result in the wizard runner instead and passes it
straight to `formatResult`, so the completion screen is built entirely from local
data — no server echo needed. Makes getsentry/cli-init-api#239 unnecessary.
The captured identity takes precedence over any server-sent fields (the CLI is
authoritative), with the existing `output.*` / settings-URL fallback kept so the
CLI still works against any server version.
Also guards against the dry-run stub's `projectId: "(dry-run)"` sentinel leaking
into the Issues URL — only a genuine numeric id scopes the `?project=` filter;
anything else yields the org-wide stream.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop `script/preview-completion.tsx` and its `preview:completion` npm script — the completion screen is covered by the formatters/wizard-runner tests, so the standalone preview is no longer needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| if (isSentrySaasUrl(url)) { | ||
| // Org is the subdomain; guard against the bare apex (no org subdomain). | ||
| const [subdomain] = parsed.hostname.split("."); | ||
| const orgSlug = | ||
| parsed.hostname === DEFAULT_SENTRY_HOST ? undefined : subdomain; | ||
| return { orgSlug, projectSlug }; |
There was a problem hiding this comment.
Bug: The parseOrgProjectFromSettingsUrl function incorrectly identifies the region subdomain (e.g., us in us.sentry.io) as the organization slug for multi-region SaaS URLs.
Severity: LOW
Suggested Fix
Update parseOrgProjectFromSettingsUrl to guard against known region subdomains. Before treating a subdomain as an organization slug, check if it is a valid region (e.g., 'us', 'de') and handle it accordingly.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: packages/cli/src/lib/sentry-urls.ts#L250-L255
Potential issue: The function `parseOrgProjectFromSettingsUrl` incorrectly parses
multi-region Sentry SaaS URLs, such as `us.sentry.io`. It splits the hostname by `.` and
incorrectly assumes the first part (`us`) is the organization slug. This logic is a
fallback that is triggered only when an `orgSlug` is not provided by the server or
captured locally during project creation. While safeguards make this scenario unlikely,
if it occurs, it would lead to the generation of incorrect issue links, pointing to a
non-existent organization based on the region name.
Did we get this right? 👍 / 👎 to inform future reviews.

What
Redesigns the
sentry initcompletion (exit) screen so finishing the wizard reads as a guided handoff instead of a wall of text. It answers three things, in the order a first-time user cares about:<project>, with a one-line note per enabled feature and a file-changed count.The screen speaks init's own visual language (numbered action steps, glyph-aligned rows, colour-coded hierarchy) and stays mounted until dismissed.
Notable behaviour
Testing
pnpm test— 589 init/url tests pass; biome +tscclean.pnpm run preview:completion(add--verified) renders the screen with sample data for fast iteration.🤖 Generated with Claude Code