feat(init): polish ink wizard chrome, colors, and non-tty handling#928
Conversation
Require non-TTY callers to pass --yes and explicit features before network lookup or UI startup. Normalize public feature aliases at the command boundary, and let Ink text inherit the terminal foreground instead of using unused theme detection.
|
…typecheck Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Codecov Results 📊✅ 6758 passed | Total: 6758 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
All tests are passing successfully. ❌ Patch coverage is 79.49%. Project has 14185 uncovered lines. Files with missing lines (11)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 75.74% 76.53% +0.79%
==========================================
Files 303 317 +14
Lines 58783 60439 +1656
Branches 0 0 —
==========================================
+ Hits 44523 46254 +1731
- Misses 14260 14185 -75
- Partials 0 0 —Generated by Codecov Action |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 915fda0. Configure here.
| })} | ||
| </Box> | ||
| ); | ||
| } |
There was a problem hiding this comment.
Exported StatusHistory component is never imported
Low Severity
StatusHistory is exported from ink-frame.tsx but never imported anywhere in the codebase. The old inline StatusBar was removed from the workflow layout in ink-app.tsx, and this extracted replacement was never wired up. It's dead code that adds maintenance burden without being used.
Reviewed by Cursor Bugbot for commit 915fda0. Configure here.
| "You'll choose the setup before local files change.", | ||
| ], | ||
| punchline: "Continue to let Sentry use AI for setup.", | ||
| }; |
There was a problem hiding this comment.
Welcome options text duplicated across two files
Low Severity
DEFAULT_WELCOME_OPTIONS in ink-app.tsx and buildWelcomeOptions() in wizard-runner.ts contain identical title, body, and punchline strings. If one copy is updated without the other, the fallback in ink-app.tsx will silently diverge from the primary value passed through the prompt flow.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 915fda0. Configure here.
| precomputeSentryDetection(directory).catch(() => null), | ||
| ]); | ||
| const fileCache = await preReadCommonFiles(directory, dirListing); | ||
| ui.setIntroMode?.(false); | ||
| spin.message("Connecting to wizard..."); | ||
| run = await workflow.createRun(); | ||
| // Large shared context (dirListing, fileCache, existingSentry) |
There was a problem hiding this comment.
Bug: If an error occurs during pre-computation, the call to ui.setIntroMode?.(false) is skipped, which prevents the sidebar timers from starting and updating the UI.
Severity: LOW
Suggested Fix
Move the ui.setIntroMode?.(false) call to a location before the try-catch block that handles pre-computation errors, or add an equivalent call inside the catch block to ensure the sidebar timers are always started.
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: src/lib/init/wizard-runner.ts#L576-L582
Potential issue: In the `runWizard` function, pre-computation steps such as
`precomputeDirListing` and `preReadCommonFiles` are wrapped in a `try-catch` block. If
one of these asynchronous operations fails, control jumps to the `catch` block. This
bypasses the `ui.setIntroMode?.(false)` call, which is responsible for triggering
`startSidebarTimers()`. Consequently, the sidebar's educational content and tips will
not start rotating, leaving that part of the UI static, although the main wizard
functionality is not blocked.
Did we get this right? 👍 / 👎 to inform future reviews.


Summary
Polish and hardening pass on the Ink wizard: extracted layout primitives into their own modules, fixed colors for non-TTY and dim terminals, tightened welcome copy, and added outcome-aware feedback prompts shown at the end of every run.
What's in this PR
Seven commits, roughly in order of impact:
49edbf10fix(init): harden non-tty init and ink colors — require--yesand explicit feature flags before any network lookup or UI startup in non-TTY mode. Let Ink text inherit the terminal's foreground color instead of the unusedtheme.tsdetection; deletedtheme.ts.56812003feat(init): polish ink welcome flow — vertically-centered intro, proportional top padding based on terminal height, trimmed copy.7a6718e6feat(init): streamline ink init screens — condensed screen layouts, removed redundant status bar rows, simplified tab footer.68c07bbdfix(init): simplify tracing feature copy — shortened verbose tracing feature description strings.6f0824ccfeat(init): add outcome feedback prompts — newfeedback.tswithformatFeedbackHint()that returns outcome-specific copy (success/cancelled/failed) pointing users tosentry cli feedback.b3817f2afeat(init): polish ink workflow chrome — extracted layout primitives intoink-frame.tsx(getInkFrameWidth,getInkFrameMargin,TabFooter,ShortcutFooter,InitRenderBoundary) and a shortcut-hint context intoink-shortcuts.tsx. Also addsink-report.tsfor the post-dispose chalk summary.1f63facefeat(init): clarify sidebar learning copy — revised the sidebar's "learning" block text for conciseness.Files added
src/lib/init/feedback.ts— outcome feedback hint formattersrc/lib/init/ui/ink-frame.tsx— frame-level layout components and error boundarysrc/lib/init/ui/ink-shortcuts.tsx— shortcut hint context + hookssrc/lib/init/ui/ink-report.ts— post-dispose chalk reportFiles deleted
src/lib/init/ui/theme.ts— unused since Ink now inherits terminal foregroundVerification
bun run typecheck(clean)bun run lint(no new warnings)bun test --isolate test/lib/init/(all pass)bun run src/bin.ts initrenders welcome, tabs, shortcuts, and feedback prompt on exit