Skip to content

feat(console): guide one MCP setup path at a time - #313

Merged
mohanagy merged 2 commits into
developmentfrom
feat/204-guided-console-wizard-v2
Jul 30, 2026
Merged

feat(console): guide one MCP setup path at a time#313
mohanagy merged 2 commits into
developmentfrom
feat/204-guided-console-wizard-v2

Conversation

@mohanagy

@mohanagy mohanagy commented Jul 30, 2026

Copy link
Copy Markdown
Owner

What changed

  • turn Set up another MCP into a focused chooser followed by one setup path
  • keep connector, remote endpoint, local executable, browser sign-in, and client-entry import flows distinct
  • add Back and Cancel actions; Cancel clears all setup forms without creating or changing configuration
  • preserve the existing security boundaries, planners, writers, endpoints, and file-containment behavior
  • add a focused interaction contract covering chooser, path isolation, Back, and safe cancellation

Validation

  • npx vitest run tests/console-server.test.ts tests/console-dashboard-application-service.test.ts
  • npm test
  • npm run test:core
  • npm run test:coverage (95.65% statements, 91.88% branches)
  • npm run lint
  • npm run typecheck
  • npm run build
  • npm run smoke:cli
  • npm run check:pack
  • npm run test:package
  • real local-browser walkthrough: chooser only, one path at a time, Back, Cancel

Refs #204

Summary by CodeRabbit

  • New Features
    • Added a three-step setup wizard for creating MCP configurations.
    • Choose from connectors, remote HTTPS endpoints, local executables, browser sign-in, or importing an existing client entry.
    • Added guided Continue, Back, and Cancel navigation with context-specific instructions.
  • Bug Fixes
    • Improved recovery when returning to an unfinished setup, showing the appropriate step and guidance.
  • Style
    • Refined setup form styling and placeholder presentation.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

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: 47 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0d68f595-6cc5-4248-b042-5fb904c8b472

📥 Commits

Reviewing files that changed from the base of the PR and between 73a258e and 70cca14.

📒 Files selected for processing (2)
  • src/console/console-assets.ts
  • tests/console-server.test.ts
📝 Walkthrough

Walkthrough

Changes

Console setup wizard

Layer / File(s) Summary
Wizard UI and client state
src/console/console-assets.ts
Adds the three-step setup wizard chooser, updated path labels, controls, styling, DOM bindings, and selected-source state.
Path routing and lifecycle control
src/console/console-assets.ts
Routes selected setup sources, manages path visibility and focus, resets forms, handles cancellation, and updates refresh/recovery behavior.
Wizard behavior validation
tests/console-server.test.ts
Extends fake DOM coverage, exercises wizard transitions, and asserts generated markup and JavaScript behavior.

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

Sequence Diagram(s)

sequenceDiagram
  participant ConsoleUser
  participant SetupWizard
  participant SetupPathViews
  ConsoleUser->>SetupWizard: Select setup source
  SetupWizard->>SetupWizard: Update source state
  ConsoleUser->>SetupWizard: Continue
  SetupWizard->>SetupPathViews: Show selected path
  SetupPathViews-->>SetupWizard: Update focus and guidance
  ConsoleUser->>SetupWizard: Back or cancel
  SetupWizard->>SetupPathViews: Hide paths and reset forms
Loading

Possibly related PRs

Poem

A bunny hops through paths anew,
Connector, browser, import too.
Back and cancel, forms reset bright,
Three little steps now guide the night.
“Choose your trail!” the rabbit sings,
While wizard buttons sprout their wings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: guiding one MCP setup path at a time.
Description check ✅ Passed The description covers the change and validation well, and it includes security-impact notes even if the template sections are not explicit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 feat/204-guided-console-wizard-v2

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/console/console-assets.ts (1)

1703-1720: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Wizard-hide branches skip hideSetupWizardPaths() and never reset returningSetupVisible.

Both the attentionCount > 0 branch and the discoveryState === "unavailable" branch inline the old three-line hide sequence instead of the new hideSetupWizardPaths() helper, and neither resets returningSetupVisible. If catalog state later flips back to configurations.length > 0 while returningSetupVisible is still stuck true from an earlier wizard session, that branch (1690-1697) skips re-hiding (already hidden) but also never re-shows the wizard — yet it displays "Complete the selected setup path, use Back to choose another path…" with no wizard controls visible. The user can still recover by clicking "Set up another MCP" again, so this is a confusing stale message rather than a hard dead end.

🐛 Proposed fix
       if (catalog.attentionCount > 0) {
-        if (onboardingView) onboardingView.hidden = true;
-        if (presetOnboardingView) presetOnboardingView.hidden = true;
-        if (clientEntryOnboardingView) clientEntryOnboardingView.hidden = true;
+        hideSetupWizardPaths();
+        returningSetupVisible = false;
         if (setupWizardView) setupWizardView.hidden = true;
         if (workspaceView) workspaceView.hidden = true;
         message("Miftah found configuration files, but none passed every trust and validation check. Review the safe reason summary, correct the expected files, then refresh.");
         return;
       }
       if (catalog.discoveryState === "unavailable") {
-        if (onboardingView) onboardingView.hidden = true;
-        if (presetOnboardingView) presetOnboardingView.hidden = true;
-        if (clientEntryOnboardingView) clientEntryOnboardingView.hidden = true;
+        hideSetupWizardPaths();
+        returningSetupVisible = false;
         if (setupWizardView) setupWizardView.hidden = true;
         if (workspaceView) workspaceView.hidden = true;
         message("Miftah could not safely inspect its standard configuration directory. Correct its local access or start the Console with --config.");
         return;
       }
🤖 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 `@src/console/console-assets.ts` around lines 1703 - 1720, Update both the
catalog.attentionCount and catalog.discoveryState === "unavailable" branches in
the setup flow to call hideSetupWizardPaths() instead of duplicating the inline
view-hiding statements, and reset returningSetupVisible to false in each branch
before returning. Preserve their existing messages and early-return behavior.
🤖 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 `@src/console/console-assets.ts`:
- Line 135: Remove the redundant static “Step 2 of 3” headers from the
connector, existing-client, and browser-sign-in sections, and update the
selectSetupSource flow so only the shared setupWizardStep dynamic header remains
visible. Apply the same cleanup to the related step-label markup around the
referenced setup wizard controls while preserving the section-specific content
and navigation behavior.

---

Outside diff comments:
In `@src/console/console-assets.ts`:
- Around line 1703-1720: Update both the catalog.attentionCount and
catalog.discoveryState === "unavailable" branches in the setup flow to call
hideSetupWizardPaths() instead of duplicating the inline view-hiding statements,
and reset returningSetupVisible to false in each branch before returning.
Preserve their existing messages and early-return behavior.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1e5b67ab-0b36-4891-9ef2-7b7a823c3e5e

📥 Commits

Reviewing files that changed from the base of the PR and between e417704 and 73a258e.

📒 Files selected for processing (2)
  • src/console/console-assets.ts
  • tests/console-server.test.ts

Comment thread src/console/console-assets.ts Outdated
@mohanagy

Copy link
Copy Markdown
Owner Author

Resolved the two review findings in 70cca14:

  • removed duplicate path-local Step 2 labels and made the shared wizard header path-specific
  • reset stale returning-wizard state in attention/unavailable catalog branches while reusing hideSetupWizardPaths()

Focused Console contracts, typecheck, lint, build, and diff checks are green.

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