This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
fix(init): start the plugin-installer handoff at the top of the screen - #1448
Merged
Merged
Conversation
Exiting the alternate screen buffer restores the cursor to the row where `sentry init` was invoked — usually low on the screen. The exit summary and the interactive `npx @sentry/ai install` UI (spawned with inherited stdio) then rendered from mid-screen, leaving a blank gap above them. When a post-exit action is queued (the agent-plugin installer), clear the restored screen and home the cursor right after leaving the alt buffer — the same clean top-of-screen start the wizard uses on entry. The normal exit (no installer) is untouched, so its compact summary still flows into the restored scrollback at the invocation point. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When exiting
sentry initwith finish after opting into the agent plugin, the exit summary and the interactivenpx @sentry/ai installUI render from mid-screen, with a blank gap above them:\x1b[?1049l), which restores the cursor to the row wheresentry initwas invoked — usually low on the screen.stdio: "inherit") then print from that row, leaving the top of the screen blank.Startup already clears + homes on entry (
\x1b[?1049h\x1b[2J\x1b[H); the exit-to-installer path did not.Fix
In
tearDown(), when a post-exit action is queued (the agent-plugin installer), append\x1b[2J\x1b[Hright after leaving the alt buffer — the same clean top-of-screen start the wizard uses on entry.The normal exit (no installer) is untouched, so its compact summary still lands in the restored scrollback at the invocation point.
Testing
test/lib/init/ui/ink-ui-teardown.test.tslocks in both branches (clears on handoff, doesn't clear on normal exit);spawnis stubbed so teardown never launches a real installer.tsc✅ ·biome✅ · init UI test suite ✅Note: the alt-screen behavior can't be asserted from a screenshot in CI (needs a real TTY + the spawned installer), so it's covered by the escape-sequence test rather than a visual snapshot.
🤖 Generated with Claude Code