Skip to content

feat: unified arrow-key selection + setup checkboxes#2459

Merged
la14-1 merged 3 commits intoOpenRouterTeam:mainfrom
AhmedTMM:feat/unified-select-v3
Mar 10, 2026
Merged

feat: unified arrow-key selection + setup checkboxes#2459
la14-1 merged 3 commits intoOpenRouterTeam:mainfrom
AhmedTMM:feat/unified-select-v3

Conversation

@AhmedTMM
Copy link
Copy Markdown
Collaborator

Summary

  • Replace p.autocomplete (type-ahead) with p.select (arrow-key navigation) for agent and cloud selection prompts
  • Add p.multiselect checkboxes for optional post-provision setup steps (GitHub CLI, Chrome browser) — all ON by default, user can uncheck to skip
  • Bridge selections to published CLI via SPAWN_ENABLED_STEPS env var so orchestrate.ts gates GitHub auth and Chrome install

Changes

File What changed
commands/interactive.ts p.autocompletep.select with initialValue defaults; new promptSetupOptions() + hasLocalGithubToken()
commands/run.ts Wire promptSetupOptions into cmdRun direct path
shared/agents.ts OptionalStep type, getAgentOptionalSteps() static metadata
shared/orchestrate.ts Read SPAWN_ENABLED_STEPS env var, gate GitHub auth + pass enabledSteps to configure
shared/agent-setup.ts Gate installChromeBrowser with enabledSteps in setupOpenclawConfig
__tests__/orchestrate.test.ts Update configure call expectations for new enabledSteps param
package.json Version bump 0.15.400.16.0

Test plan

  • bunx @biomejs/biome check src/ — 0 errors (114 files)
  • bun test — 1497 tests pass, 0 failures
  • Manual: spawn → arrow-key agent select (default: OpenClaw) → arrow-key cloud select → checkbox setup steps (GitHub + Chrome checked)
  • Manual: Uncheck Chrome → deploys without ~400MB Chrome install
  • Manual: spawn claude hetzner → setup checkboxes shown before spawn name prompt

🤖 Generated with Claude Code

Replace p.autocomplete (type-ahead) with p.select (arrow-key navigation)
for agent and cloud selection. Add p.multiselect checkboxes for optional
post-provision setup steps (GitHub CLI, Chrome browser), all ON by default.

Three fast prompts: agent → cloud → setup options. Defaults: OpenClaw,
first cloud with credentials, all steps enabled.

Key changes:
- interactive.ts: p.autocomplete → p.select with initialValue defaults
- interactive.ts: promptSetupOptions() with p.multiselect, exported for reuse
- run.ts: wire setup options into cmdRun direct path
- agents.ts: OptionalStep type, getAgentOptionalSteps() static metadata
- orchestrate.ts: read SPAWN_ENABLED_STEPS env var, gate GitHub auth + configure
- agent-setup.ts: gate Chrome install with enabledSteps in setupOpenclawConfig
- Version bump 0.15.40 → 0.16.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tarballs are built with absolute /root/ paths, but GCP and AWS Lightsail
SSH as a regular user whose $HOME is /home/<user>/. After extraction,
binaries like `claude` end up at /root/.claude/local/bin/ but the
launchCmd looks in $HOME/.claude/local/bin/ — causing "command not found".

Add a post-extraction step that copies /root/ dotfiles to $HOME/ when
the SSH user isn't root. This fixes `spawn claude gcp` failing with
exit code 127 after tarball install.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Review

Verdict: APPROVED
Commit: d1a5db8

Summary

This PR adds multiselect setup options for post-provision steps (GitHub CLI, Chrome browser). Clean implementation with no security issues.

Findings

  • No critical or high severity issues
  • MEDIUM: Subprocess spawning for GitHub token detection - properly sanitized with hardcoded command array
  • MEDIUM: Env var parsing for SPAWN_ENABLED_STEPS - safe (only used for boolean checks, no injection risk)
  • All user input properly validated and contained

Positive Practices

  • Changed from autocomplete to arrow-key selection (simpler, safer)
  • Safe defaults on cancel (all steps enabled)
  • Static metadata for optional steps (not user-controlled)
  • Proper test coverage with cleanup

Tests

  • bash -n: N/A (no shell scripts changed)
  • bun test: PASS (1497 tests, 0 failures)
  • biome lint: PASS (0 errors)
  • curl|bash safety: N/A (no shell scripts)
  • macOS compat: N/A (no shell scripts)

-- security/pr-reviewer

@louisgv louisgv added the security-approved Security review approved label Mar 10, 2026
@la14-1 la14-1 merged commit d82dea8 into OpenRouterTeam:main Mar 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-approved Security review approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants