Skip to content

Choose an available provider for new sessions - #208

Open
notsapinho wants to merge 2 commits into
hardbeat920:mainfrom
notsapinho:fix/available-default-provider
Open

Choose an available provider for new sessions#208
notsapinho wants to merge 2 commits into
hardbeat920:mainfrom
notsapinho:fix/available-default-provider

Conversation

@notsapinho

@notsapinho notsapinho commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

What changed

New sessions now choose an installed provider when the saved/default provider is unavailable. The initial blank session is corrected after provider discovery, creation paths share the same availability-aware selection, and unavailable providers cannot be made the effective default in Settings.

Why

A clean install could open on Cursor Composer 2.5 even when Cursor was missing and Codex or OpenCode was installed. Settings also presented unavailable providers as valid defaults.

UI

Provider Settings now disables the default action for unavailable CLIs and labels the effective installed provider as the default.

Checklist

  • I ran npm run check:web
  • This PR is small and focused
  • I did not mix unrelated changes

Summary by CodeRabbit

  • New Features
    • New sessions automatically select an available provider when the preferred provider is unavailable.
    • Empty sessions using unavailable providers are updated at startup, while active work and resumed or transferred sessions remain unchanged.
    • Availability-aware defaults now apply when creating sessions, inboxes, splits, panes, history entries, and projects.
    • Provider settings now show the effective default provider and disable “Use by default” for unavailable providers.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 3a0055ca-9040-4a5e-8580-5dc84f22304e

📥 Commits

Reviewing files that changed from the base of the PR and between ba26105 and ad8cef3.

📒 Files selected for processing (4)
  • src/App.tsx
  • src/lib/models.test.ts
  • src/lib/models.ts
  • src/surfaces/SettingsView.tsx

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Availability-aware defaults

Layer / File(s) Summary
Availability-aware default selection
src/lib/models.ts, src/lib/models.test.ts
defaultSessionChoice accepts an availability predicate and selects an available fallback. Tests cover unavailable preferred providers and saved choices for available providers.
Availability-aware session creation
src/App.tsx
Session creation paths use available harness and model defaults. Startup reassignment affects only eligible empty sessions.
Provider settings availability state
src/surfaces/SettingsView.tsx
The Default badge uses the effective available choice. The default button is disabled for unavailable providers.

Priority: ➖ Normal

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant HarnessAvailability
  participant SessionState
  App->>HarnessAvailability: Probe harness availability
  HarnessAvailability-->>App: Return availability
  App->>SessionState: Reassign eligible empty sessions
  App->>SessionState: Create sessions with available defaults
Loading

Suggested reviewers: hardbeat920

Merge Risk: ⚪ Minimal · up to ad8ce

New and empty sessions now select available providers, and Settings reflects that effective choice. The change is ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description includes all required sections and clearly explains the provider-availability change, rationale, UI impact, and checklist status. It reports npm run check:web instead of the template…
Title check ✅ Passed The title clearly and concisely describes the main change: selecting an available provider for new sessions.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

viannaanalyst added a commit to viannaanalyst/monocode that referenced this pull request Sep 13, 2026
- Start new sessions on an available provider instead of a missing one (hardbeat920#208)
- Add Close All Tabs to the menu, keyboard and tab commands (hardbeat920#215)
- Hide gitignored and .git entries in the explorer by default, with a toggle (hardbeat920#217)
- Show GitHub PR diffs with full file context (hardbeat920#189)
- Silence the Windows console window for background commands (hardbeat920#221)
- Raise the skill picker cap from 50 to 300 (hardbeat920#168)
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