-
-
Notifications
You must be signed in to change notification settings - Fork 738
Add ways to disable onboarding #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,6 +23,15 @@ async function runServer() { | |||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| // Parse command line arguments for onboarding control | ||||||||||||||||||||||||||||||||||||||||||||
| const DISABLE_ONBOARDING = process.argv.includes('--no-onboarding'); | ||||||||||||||||||||||||||||||||||||||||||||
| if (DISABLE_ONBOARDING) { | ||||||||||||||||||||||||||||||||||||||||||||
| logToStderr('info', 'Onboarding disabled via --no-onboarding flag'); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| // Set global flag for onboarding control | ||||||||||||||||||||||||||||||||||||||||||||
| (global as any).disableOnboarding = DISABLE_ONBOARDING; | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 🧩 Analysis chainSet the global flag without Use the typed global and drop the // Parse command line arguments for onboarding control
-const DISABLE_ONBOARDING = process.argv.includes('--no-onboarding');
+const DISABLE_ONBOARDING =
+ process.argv.includes('--no-onboarding')
+ // Optional: allow env override (document if adopted)
+ || process.env.DC_DISABLE_ONBOARDING === '1'
+ || process.env.DC_DISABLE_ONBOARDING === 'true';
if (DISABLE_ONBOARDING) {
logToStderr('info', 'Onboarding disabled via --no-onboarding flag');
}
// Set global flag for onboarding control
-(global as any).disableOnboarding = DISABLE_ONBOARDING;
+global.disableOnboarding = DISABLE_ONBOARDING;Verification script (ensures no remaining unsafe casts and that the flag is wired once): 🏁 Script executed: #!/bin/bash
rg -nC2 -S '\(global as any\)\.disableOnboarding|global\.disableOnboarding|disableOnboarding' --type tsLength of output: 749 Use the typed global (remove src/types.ts already declares global.disableOnboarding; replace all casts and set the flag from args or an env var in src/index.ts, and update usages elsewhere. Locations:
Suggested diff for src/index.ts: // Parse command line arguments for onboarding control
-const DISABLE_ONBOARDING = process.argv.includes('--no-onboarding');
+const DISABLE_ONBOARDING =
+ process.argv.includes('--no-onboarding')
+ // Optional: allow env override (document if adopted)
+ || process.env.DC_DISABLE_ONBOARDING === '1'
+ || process.env.DC_DISABLE_ONBOARDING === 'true';
if (DISABLE_ONBOARDING) {
logToStderr('info', 'Onboarding disabled via --no-onboarding flag');
}
// Set global flag for onboarding control
-(global as any).disableOnboarding = DISABLE_ONBOARDING;
+global.disableOnboarding = DISABLE_ONBOARDING;📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||||
| logToStderr('info', 'Loading configuration...'); | ||||||||||||||||||||||||||||||||||||||||||||
| await configManager.loadConfig(); | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Confirm: does
setuphonor--no-onboarding?Docs list
--no-onboardingunder “Command line options during setup”, but the server entrypoint short-circuits onsetupand the PR wires the flag for runtime only. VerifyrunSetupactually persists this flag (e.g., into Claude config args); otherwise, move this bullet to the runtime CLI section.🏁 Script executed:
Length of output: 27
🏁 Script executed:
Length of output: 2395
🏁 Script executed:
Length of output: 26979
🏁 Script executed:
Length of output: 16029
Action: --no-onboarding is not honored during setup — update docs or persist the flag.
Verified: README lists
--no-onboardingunder setup (README.md lines 90–93) but code short-circuits onsetupbefore parsing that flag (src/index.ts calls runSetup and returns). runSetup (src/npm-scripts/setup.ts) imports/executes setup-claude-server.js without passing args, and setup-claude-server.js contains no handling for--no-onboarding. Runtime handling exists (src/index.ts sets global.disableOnboarding; src/utils/usageTracker.ts reads it), so the flag only takes effect when starting the server, not during setup.🤖 Prompt for AI Agents