Skip to content

Suppress welcome setup for explicit CLI selectors (Fixes #3105) - #3116

Merged
acoliver merged 3 commits into
mainfrom
issue3105
Aug 6, 2026
Merged

Suppress welcome setup for explicit CLI selectors (Fixes #3105)#3116
acoliver merged 3 commits into
mainfrom
issue3105

Conversation

@acoliver

@acoliver acoliver commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

TLDR

Explicit non-empty command-line provider/profile selectors now suppress only the automatic first-run welcome setup screen. The change preserves persisted onboarding state, folder-trust behavior, non-interactive dispatch, and manual reopening through /setup.

Dive Deeper

  • Preserves the parsed --profile value alongside --provider and --profile-load.
  • Normalizes repeated selector flags to the established last-value-wins behavior.
  • Computes suppression only from explicit parsed command-line selectors, so --model alone and environment/settings defaults retain normal welcome behavior.
  • Threads a private session-local boolean through the interactive UI path.
  • Initializes welcome state as hidden for a suppressed startup without writing welcomeCompleted.
  • Leaves resetAndReopen unchanged, allowing /setup to display onboarding during the same session.
  • Adds Bun behavioral tests for parser boundaries, repeated selectors, visibility, folder trust, persistence, and manual reopen.
  • Includes tmux harness evidence for all three selector forms, default and model-only startup, and /setup reopening.

Local verification covered focused Bun tests, workspace tests, typecheck, formatting, build, changed-file lint, the ESLint guard, exact changed-file ESLint, tmux validation, and the stepfun-37 smoke test. Full root aggregators that received an external SIGTERM were covered by bounded workspace and exact-file runs; the observed unrelated timeout cases passed independently with the inherited JSP bootstrap variable cleared.

Two DeepThinker cycles and two local OCR cycles were completed. OCR findings were classified and all Blocker-Fix and In-scope-Fix items were addressed. The final OCR cycle emitted no code comments and terminated on an OCR file-read range error; the session record was recovered and inspected without launching a prohibited third cycle.

Reviewer Test Plan

  1. Point LLXPRT_CODE_WELCOME_CONFIG_PATH at an isolated missing or incomplete welcome config.

  2. Launch interactive LLxprt independently with --provider, --profile, and --profile-load; verify the automatic Welcome to llxprt screen is absent.

  3. Launch with no selector and with --model alone; verify the welcome screen appears after folder trust.

  4. After a selector-suppressed launch, run /setup; verify the welcome screen opens.

  5. Exit and inspect the isolated welcome config; verify startup suppression did not persist completion.

  6. From packages/cli, run:

    LLXPRT_JSP_BOOTSTRAP_FILE= bun test ./src/config/cliArgParser.welcomeSuppression.test.ts ./src/ui/hooks/useWelcomeOnboarding.bun.tsx

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

Fixes #3105

Summary by CodeRabbit

  • New Features

    • Added support for selecting a profile directly from the command line.
    • Provider, profile, and profile-load options now consistently use the last supplied value.
    • The startup welcome flow is automatically skipped when a provider or profile is explicitly selected, enabling a more direct launch experience.
    • The welcome flow can still be reopened when needed.
  • Bug Fixes

    • Improved handling of repeated or invalid command-line option values.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 331f3d05-0cdd-4784-857b-f781337c6009

📥 Commits

Reviewing files that changed from the base of the PR and between eb16d69 and 552420e.

📒 Files selected for processing (2)
  • packages/cli/src/config/cliArgParser.ts
  • packages/cli/src/config/cliArgParser.welcomeSuppression.test.ts
📝 Walkthrough

Walkthrough

The CLI now detects explicit provider and profile selectors, propagates startup welcome suppression through interactive session setup, and initializes onboarding as completed when suppression is enabled. Tests cover parsing, visibility, persistence, and reopening behavior.

Changes

Startup welcome suppression

Layer / File(s) Summary
Selector detection and parsing
packages/cli/src/config/cliArgParser.ts, packages/cli/src/cli.tsx, packages/cli/src/config/cliArgParser.welcomeSuppression.test.ts
CliArgs supports profile. Provider, profile, and profile-load values use last-string normalization. CLI startup detects non-empty selectors and sets suppressStartupWelcome.
Session and application propagation
packages/cli/src/session/interactiveUI.tsx, packages/cli/src/session/nonInteractiveSession.ts, packages/cli/src/ui/App.tsx, packages/cli/src/ui/AppContainerRuntime.tsx, packages/cli/src/ui/containers/AppContainer/hooks/useAppDialogs.ts
The suppression flag passes from session dispatch to AppWrapper, runtime dialogs, and onboarding setup.
Onboarding behavior and tests
packages/cli/src/ui/hooks/useWelcomeOnboarding.ts, packages/cli/src/ui/hooks/useWelcomeOnboarding.bun.tsx
Suppressed startup initializes onboarding as completed without persisting completion. Tests cover trust, prior completion, suppression, persistence, and reopening.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • vybestack/llxprt-code#3056: Overlaps in CLI argument and profile test coverage, but primarily concerns Bun test-runner migration.

Suggested labels: maintainer:e2e:ok

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that startup welcome setup is suppressed for explicit CLI selectors and references the relevant issue.
Description check ✅ Passed The description covers the required sections, behavior, testing plan, testing matrix, and linked issue, although some matrix entries remain unverified.
Linked Issues check ✅ Passed The changes satisfy issue #3105 by suppressing startup welcome setup for explicit provider, profile, and profile-load selectors.
Out of Scope Changes check ✅ Passed The reviewed changes and tests remain focused on startup welcome suppression and its required CLI, session, UI, and onboarding behavior.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue3105

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 `@packages/cli/src/config/cliArgParser.ts`:
- Around line 183-190: Update validateRootArgs to normalize repeated profile and
profile-load selector values before applying the mutual-exclusion check, using
the existing pickLastRepeatedStringOption behavior or explicitly rejecting
repeats. Ensure commands combining --profile and --profile-load are consistently
detected even when either option produces an array.
🪄 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: Pro Plus

Run ID: b03f5252-29f3-4346-bcd6-3ba8364fbc07

📥 Commits

Reviewing files that changed from the base of the PR and between 05d50c1 and eb16d69.

⛔ Files ignored due to path filters (1)
  • project-plans/issue3105/plan.md is excluded by !project-plans/**
📒 Files selected for processing (10)
  • packages/cli/src/cli.tsx
  • packages/cli/src/config/cliArgParser.ts
  • packages/cli/src/config/cliArgParser.welcomeSuppression.test.ts
  • packages/cli/src/session/interactiveUI.tsx
  • packages/cli/src/session/nonInteractiveSession.ts
  • packages/cli/src/ui/App.tsx
  • packages/cli/src/ui/AppContainerRuntime.tsx
  • packages/cli/src/ui/containers/AppContainer/hooks/useAppDialogs.ts
  • packages/cli/src/ui/hooks/useWelcomeOnboarding.bun.tsx
  • packages/cli/src/ui/hooks/useWelcomeOnboarding.ts

Comment thread packages/cli/src/config/cliArgParser.ts
@acoliver

acoliver commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

Verification correction: the final full root test aggregator rerun was externally terminated with signal 15, as was the full lint aggregator; the prior thread reply saying the full test completed successfully should be disregarded. Post-remediation focused Bun behavior tests passed 20/20, and typecheck, format, build, exact-file ESLint, changed-file lint, ESLint guard, diff check, and the stepfun smoke test all passed. The issue behavior was also covered by the earlier merged-candidate workspace and tmux verification.

@acoliver
acoliver merged commit 5c5ae83 into main Aug 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

suppress welcome setup screen if --profile-load --profile or --provider are specified on the command line

1 participant