Repository navigation
fix(cli): highlight retained gateway environments - #8876
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe uninstall plan now reports retained gateway environments as warnings. Warning text uses conditional yellow coloring. Tests separately capture logs and warnings and verify gateway retention, command formatting, color behavior, silence, and failed sweep handling. ChangesUninstall gateway reporting
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit 20b2ecd in the TypeScript / code-coverage/cliThe overall coverage in commit 20b2ecd in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/actions/uninstall/run-plan.ts`:
- Around line 526-531: Update yellowWarningText in
src/lib/actions/uninstall/run-plan.ts (lines 526-531) to disable color whenever
runtime.env.NO_COLOR is defined, including an empty string. Update
src/lib/actions/uninstall/run-plan-other-gateway-report.test.ts (lines 117-125)
to omit NO_COLOR from the colored case and add coverage confirming NO_COLOR: ""
returns plain warning text.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 9ede8e9b-970d-45a9-92bd-d62a8b0f4c26
📒 Files selected for processing (2)
src/lib/actions/uninstall/run-plan-other-gateway-report.test.tssrc/lib/actions/uninstall/run-plan.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
1 additional E2E selection from the second opinionAdvisory only. The primary lane did not select these E2E jobs or targets.
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. 2 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite for the commit under review. Recommended E2E: None This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
cv
left a comment
There was a problem hiding this comment.
src/lib/actions/uninstall/run-plan.ts:531 treats an interactive stderr as sufficient evidence of color support. On a TTY, Node reports hasColors() === false and color depth 1 for FORCE_COLOR=0, NODE_DISABLE_COLORS=1, and TERM=dumb, but yellowWarningText still writes ANSI escape bytes. This violates the PR's plain-output contract and affects terminals or captures that explicitly disable color. Determine color capability from stderr's color support result while retaining NO_COLOR handling, and add regression coverage for an interactive stderr that does not support color. Reproduction on Node v25.9.0 through a pseudo-TTY produced isTTY=true, depth=1, and hasColors=false for all three cases; the current test covers only non-TTY stderr and NO_COLOR.
Signed-off-by: Charan Jagwani <[email protected]>
|
Addressed the requested terminal-capability review on current head 59364c3: warning color now requires stderr.hasColors() in addition to TTY and NO_COLOR checks, with a regression for an interactive stderr that reports no color support. Focused behavior test, Biome, CLI build, typecheck, and normal commit/pre-push hooks pass. |
Summary
Selected-port uninstall now presents retained sibling gateway environments and their cleanup commands as a yellow warning on interactive terminals. The warning uses stderr and remains plain when stderr does not support color or
NO_COLORis set, while gateway cleanup behavior is unchanged.Related Issue
Partially addresses #8797.
Changes
The downgrade-install migration diagnostic reported in #8797 is outside this first change and should be handled separately.
Type of Change
Quality Gates
Documentation Writer Review
no-docs-neededdocs/manage-sandboxes/uninstall-nemoclaw.mdxanddocs/reference/commands.mdxalready document the retained-gateway notice and cleanup commands; no documentation source changed.DGX Station Hardware Evidence
scripts/prepare-dgx-station-host.shis unchanged.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpx vitest run src/lib/actions/uninstall/run-plan-other-gateway-report.test.ts -t "colors the retained gateway warning"(1 passed, 5 skipped)npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — Not applicable; this is a scoped uninstall presentation change covered by the targeted CLI test and normal hooks.npm run docsbuilds without warnings (doc changes only)Signed-off-by: San Dang [email protected]
Summary by CodeRabbit