Skip to content

Codex/exclude claude welcome page - #562

Merged
edgarsskore merged 4 commits into
mainfrom
codex/exclude-claude-welcome-page
Jul 14, 2026
Merged

Codex/exclude claude welcome page#562
edgarsskore merged 4 commits into
mainfrom
codex/exclude-claude-welcome-page

Conversation

@edgarsskore

@edgarsskore edgarsskore commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • New installs are now eligible for the welcome onboarding A/B flow after first creation.
  • Bug Fixes
    • Legacy configs are migrated to include the required onboarding fields.
    • Pending welcome onboarding state is now consistently consumed/cleared whenever onboarding is skipped (including for ineligible clients, when onboarding is disabled via feature flags, or for excluded clients).
    • Eligibility logic was adjusted to better handle client cases and feature-flag gating.
  • Tests
    • Expanded regression coverage to verify pending state is cleared after initialization via the built server entrypoint.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 386d640b-47ba-4b5b-a0d3-de72877d3182

📥 Commits

Reviewing files that changed from the base of the PR and between 8d398e7 and 1f48a02.

📒 Files selected for processing (1)
  • src/server.ts

📝 Walkthrough

Walkthrough

ConfigManager migrates legacy configurations and enables welcome onboarding for new installs. MCP initialization now routes eligible clients to onboarding and clears pending state for ineligible clients. A regression test validates these paths across legacy configuration scenarios.

Changes

Welcome onboarding flow

Layer / File(s) Summary
Configuration eligibility and migration
src/config-manager.ts
Legacy configs receive explicit onboarding fields, while new configs set welcomeOnboardingEligible and pendingWelcomeOnboarding to true.
Initialize-time onboarding routing
src/server.ts, src/utils/welcome-onboarding.ts
Initialization routes eligible clients through onboarding and clears pending state for ineligible, disabled, or excluded clients.
Legacy configuration regression coverage
test/test-welcome-onboarding-legacy-config.js
A spawned-server test validates pending-state consumption across legacy configuration, feature-flag, and client-exclusion scenarios.

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

Possibly related PRs

Suggested labels: size:L

Suggested reviewers: wonderwhy-er

Sequence Diagram(s)

sequenceDiagram
  participant MCPClient
  participant InitializeHandler
  participant WelcomeOnboarding
  MCPClient->>InitializeHandler: send Initialize request
  alt eligible client
    InitializeHandler->>WelcomeOnboarding: handleWelcomePageOnboarding
  else ineligible client
    InitializeHandler->>WelcomeOnboarding: skipWelcomePageOnboarding
    WelcomeOnboarding->>WelcomeOnboarding: set pendingWelcomeOnboarding to false
  end
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and directly matches the welcome/onboarding exclusion and eligibility changes in the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/exclude-claude-welcome-page

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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 `@test/test-welcome-onboarding-legacy-config.js`:
- Around line 37-40: In the spawn call within the test setup, the piped stderr
stream is never consumed and can deadlock the child process. Update the stdio
configuration in the spawn invocation to ignore stderr or attach a drain
listener that continuously consumes it.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: f410f852-68b3-4df1-adbc-54fc4a87c1bf

📥 Commits

Reviewing files that changed from the base of the PR and between 78100e6 and 379cf07.

📒 Files selected for processing (4)
  • src/config-manager.ts
  • src/server.ts
  • src/utils/welcome-onboarding.ts
  • test/test-welcome-onboarding-legacy-config.js

Comment on lines +37 to +40
const child = spawn('node', [DIST_INDEX], {
env: { ...process.env, HOME: this.home, USERPROFILE: this.home },
stdio: ['pipe', 'pipe', 'pipe'],
});

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Drain or ignore stderr to avoid a pipe-buffer deadlock.

stderr is piped but never consumed. If the spawned server writes more than the OS pipe buffer (~64KB) to stderr, it will block on the write and the test will hang until TIMEOUT_MS, producing a flaky timeout rather than a clean result. Either ignore stderr or drain it.

🔧 Proposed fix
       const child = spawn('node', [DIST_INDEX], {
         env: { ...process.env, HOME: this.home, USERPROFILE: this.home },
-        stdio: ['pipe', 'pipe', 'pipe'],
+        stdio: ['pipe', 'pipe', 'ignore'],
       });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const child = spawn('node', [DIST_INDEX], {
env: { ...process.env, HOME: this.home, USERPROFILE: this.home },
stdio: ['pipe', 'pipe', 'pipe'],
});
const child = spawn('node', [DIST_INDEX], {
env: { ...process.env, HOME: this.home, USERPROFILE: this.home },
stdio: ['pipe', 'pipe', 'ignore'],
});
🤖 Prompt for 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.

In `@test/test-welcome-onboarding-legacy-config.js` around lines 37 - 40, In the
spawn call within the test setup, the piped stderr stream is never consumed and
can deadlock the child process. Update the stdio configuration in the spawn
invocation to ignore stderr or attach a drain listener that continuously
consumes it.

… exclusions (#583)

* feat(onboarding): flag-controlled welcome page kill switch and client exclusions

Add two feature flags evaluated before the welcome-page A/B decision:
- welcome_page_enabled: kill switch, defaults to true so older flag
  documents keep current behavior
- welcome_page_excluded_clients: case-insensitive client-name list;
  matching clients have their pending onboarding consumed silently

Extend the legacy-config regression test into scenario runner covering
the disabled flag and case-insensitive exclusion paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(onboarding): fail open on malformed kill-switch values, pin skip-path test assertions

Review fixes for #583:
- welcome_page_enabled: only explicit false disables; absent or malformed
  values fail open so a flag-file typo cannot permanently consume pending
  onboarding for new installs.
- Test scenarios also assert sawOnboardingPage stays unset, distinguishing
  genuine skip paths from the A/B control path that also consumes pending.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

@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.

♻️ Duplicate comments (1)
test/test-welcome-onboarding-legacy-config.js (1)

47-47: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Drain or ignore stderr to avoid a pipe-buffer deadlock.

stderr is piped but never consumed. If the spawned server writes more than the OS pipe buffer (~64KB) to stderr, it will block on the write and the test will hang until TIMEOUT_MS, producing a flaky timeout rather than a clean result. Either ignore stderr or drain it.

🔧 Proposed fix
-        stdio: ['pipe', 'pipe', 'pipe'],
+        stdio: ['pipe', 'pipe', 'ignore'],
🤖 Prompt for 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.

In `@test/test-welcome-onboarding-legacy-config.js` at line 47, Update the spawned
server configuration in test-welcome-onboarding-legacy-config.js to avoid piping
an unconsumed stderr stream: either configure stderr to be ignored or consume it
continuously. Preserve the existing stdout and stdin behavior while ensuring
stderr cannot fill its pipe and block the test.
🤖 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.

Duplicate comments:
In `@test/test-welcome-onboarding-legacy-config.js`:
- Line 47: Update the spawned server configuration in
test-welcome-onboarding-legacy-config.js to avoid piping an unconsumed stderr
stream: either configure stderr to be ignored or consume it continuously.
Preserve the existing stdout and stdin behavior while ensuring stderr cannot
fill its pipe and block the test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 045c1491-bf41-440d-a8ab-a583b02fbd1f

📥 Commits

Reviewing files that changed from the base of the PR and between 379cf07 and 8d398e7.

📒 Files selected for processing (2)
  • src/utils/welcome-onboarding.ts
  • test/test-welcome-onboarding-legacy-config.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/utils/welcome-onboarding.ts

Resolves server.ts conflict with #558's hardcoded claude-code exclusion:
the flag-served welcome_page_excluded_clients list (already live in
production with claude-code) replaces the hardcode, per #583's design.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@edgarsskore
edgarsskore merged commit 59895c6 into main Jul 14, 2026
2 checks 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.

1 participant