fix(cli): improve interactive startup and short-terminal TUI - #1426
Merged
Conversation
commit: |
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
Interactive terminal E2ERecorded from the built CLI at |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4ed5188. Configure here.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Why
After interactive project selection, React Doctor performed Git scope detection and project preparation before mounting scan feedback. On larger repositories this left the terminal looking stalled even though work had started.
The experimental TUI also devoted most of a short terminal to score and diagnostic-detail chrome, leaving almost no issue list. In tall stacked terminals it did the opposite: expanded the list into a wall that pushed the selected finding's evidence far below it. Selected findings became dim as soon as they were marked read, the code frame floated in a heavy box, and the one-line footer crowded counts, position, and every shortcut together. Repeated live diagnostics could additionally produce duplicate React-key warnings. The fix-action chooser forced ANSI black and white backgrounds, which some terminal themes remapped into a gray slab with an unreadable selected row.
What changed
scan.feedback_delayto track selection-to-feedback latencyGnavigation while keepinga add CIas a discrete shortcuttui.compact_report_shown,tui.stacked_report_capped,tui.action_menu_opened, andtui.finding_navigatedshadcn-ui/uidelta-audit fixturereact-doctorParity was not run because this changes CLI progress and presentation, not lint detector behavior.
Test plan
nr test— 15 tasks, 223 files, and 2,335 tests passednr test tests/ink/scan-app.test.tsx— 13 focused TUI tests passed after restoring the full score cardnr typecheck— 16 tasks passednr lint— passed with existing fuzz-corpus warningsnr format:check— passednr build— 10 build tasks passednr smoke:json-report— schema v3 full report passednr smoke:tty-prompt— real project selection reachedScanning...before delayed Git completedshadcn-ui/ui@68e1f17— selected the realv4workspace and completed a clean startup scanGnavigated, andqexited without a CI promptsame-nextfixture at 105×60 — the original score card remained intact; all 1,391 findings stayed navigable; the active finding remained high-contrast; evidence and the two-line footer rendered cleanlybash -n scripts/setup-terminal-recording.sh— passednlx react-doctor@latest design --verbose --scope changed --yes— no design issuesnlx react-doctor@latest --verbose --scope changed --yes— 100/100Product brief
Interactive feedback and report hierarchy
scan.feedback_delaymeasures startup responsiveness;tui.compact_report_shownandtui.stacked_report_cappedmeasure responsive layout use;tui.action_menu_openedmeasures chooser adoption;tui.finding_navigatedrecords once when a user moves beyond the initially selected finding.PR recording
Note
Low Risk
Changes are limited to CLI progress UX, experimental TUI presentation, telemetry, and CI recording; scan logic and report schemas are unchanged.
Overview
Shows
Scanning...immediately after interactive project selection, pausing only for the optional scope prompt while Git diff/setup runs, and recordsscan.feedback_delay. The PTY smoke test now asserts that feedback appears before a delayedgit difffinishes.The experimental TUI picks compact, stacked, or split layouts from terminal size: short viewports get a one-line score header and list-only report; tall stacked views cap the list at 16 rows; wide terminals keep the side-by-side layout. Finding rows stay severity-highlighted when read; detail panels are flattened; the fix menu is a full-screen cyan-themed screen instead of black/white overlays; live scan lines get disambiguated React keys. New TUI telemetry counters cover compact/capped layouts, action menu opens, and first navigation past the initial finding.
experimental-tuialso forwards--no-supply-chain.PR CI adds a VHS workflow that records startup + TUI flows and posts a sticky preview comment with GIF/MP4 artifacts.
Reviewed by Cursor Bugbot for commit 4ed5188. Bugbot is set up for automated code reviews on this repo. Configure here.