ref: Extract shared skill selection and validate setup-app args#208
Draft
ref: Extract shared skill selection and validate setup-app args#208
Conversation
Warden finding code-simplifier-ed2bac3e Severity: medium Co-Authored-By: Warden <noreply@getsentry.com>
Warden finding code-simplifier-395781e1 Severity: medium Co-Authored-By: Warden <noreply@getsentry.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| return options.skill; | ||
| } | ||
| if (reporter.mode.isTTY) { | ||
| reporter.blank(); |
There was a problem hiding this comment.
Refactoring adds extra blank line to local add path
Low Severity
The resolveSkillName helper unconditionally calls reporter.blank() before invoking the prompt callback in TTY mode. The original runAddRemote had this reporter.blank() call, but the original runAdd (local skills path) did not. By consolidating both paths into resolveSkillName, the local runAdd interactive flow now outputs an extra blank line that wasn't there before, making this extraction not behavior-preserving.
Additional Locations (1)
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.


Two related cleanups in the CLI argument handling:
Validate setup-app port/timeout: Add NaN validation for --port and --timeout parseInt results, consistent with how --parallel is validated in the run command. Previously, non-numeric values silently produced NaN causing runtime failures.
Extract shared skill selection: Extract the duplicated skill selection if-else-if pattern from runAddRemote and runAdd into a shared resolveSkillName() helper, eliminating code duplication.
Automated fixes for Warden findings code-simplifier-395781e1 and code-simplifier-ed2bac3e (medium, detected by code-simplifier).