You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(native-chat): new chats' model picker opens with the full list instead of a partial one - #36646
Opening the model picker in a new Codex or Claude chat could briefly show only part of the list, often just the remembered model, before the rest appeared. Each folder has its own list. A new folder had none, and startup discovery only populated the home-folder entry, leaving the existing account fallback empty.
Change
Orca saves the account list learned during startup and uses it while a new folder’s own list loads. The folder’s result then replaces it, including any project-specific models and defaults.
The provisional list declares neither the folder’s default model nor its default effort. Ordinary reads stay immediate when the account is not known yet. Account changes and shutdown invalidate obsolete results. An account request that reuses or joins an existing listing still publishes the account list. Provisional answers remain folder-scoped, and visiting many folders cannot discard the known account identity. If a later account lookup fails or times out, an existing valid list and its defaults remain available until a successful replacement arrives.
There are no new saved fields, wire fields or RPCs. Older desktop and phone clients use the reads they already make; older hosts retain their existing behavior.
Differences from the common pattern
Intended: Folder lists stay authoritative because project configuration can change membership: Codex model_provider, model_providers and model_catalog_json, and Claude availableModels. The account list is provisional, so Orca does not duplicate the CLIs’ configuration rules.
Intended: Only the account’s own requested listing supplies the account list, including reuse of that same home listing. An arbitrary project’s restricted list never becomes another project’s fallback.
Intended: With no account list yet, or before the current account is known, the picker keeps its existing behavior. A saved folder list also remains authoritative while refreshed. This change improves the answer available to a new folder; it does not promise a full list before the first host response.
Verification
Tests cover both Claude and Codex: immediate provisional membership, the folder’s final list and defaults, preservation of explicit and unlisted choices, account retirement and shutdown, passive reads, shared listing/cache reuse, and a real catalog-file save and reload.
A production-path operation-count contract uses 61/610 models and 10/100 unrelated folders/readers. It checks one account publication plus the existing exact publication, no extra probes or writes from passive reads, coalesced persistence, unchanged-data suppression, and delivery of genuinely changed membership. This is an operation-count check, not a latency claim.
Focused catalog, RPC, shared option-display and renderer tests passed. The final repair passed 61 tests across the account service, renderer-cache integration and terminal enrichment files; subsequent checks of the two modified files passed 42 and 4 tests. Regressions cover failed and timed-out refreshes, late completion, subsequent success, account changes and newer publications, plus the actual structured shown default and terminal catalog consumption. All five provisional producer-to-cache checks remain covered in the existing cross-surface test project. The receiving-account regression file also passed 14/14, including proof that an unavailable receiving account never borrows the original account’s fallback list and that resolved account inventory stays correctly scoped. No app run was required for these catalog projection and persistence flows. Local phone-hook tests could not collect because react-test-renderer is absent; shared production option-display tests cover the changed input for both agents.
…own listing runs
A new Claude or Codex chat in a folder with no saved model list showed only its remembered model (or nothing) until that folder's model probe finished, then the full list appeared 1-2 s later. Every new worktree and every chat after a restart hit this, because these agents keep one list per folder and the account-level list reads already fall back to was never written.
The account's own listing (prewarm names no folder) now also saves that list, and a read whose folder isn't listed yet answers from it, including before its scope resolves. The stand-in names no default as the folder's; the folder's own listing still replaces it.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
Walkthrough
The service identifies eligible account-level catalog listings and resolves catalog fingerprints for session records. It records completed folder listings at a base fingerprint without copying the folder’s configured default. For qualifying reads, it can use an account observation when the later snapshot remains unknown and preserve the listing-in-progress indicator. Snapshot projection suppresses default selection under specified conditions. Tests cover pending listings, folder isolation, lifecycle handling, persistence, option state, and scaling.
Merge Risk: Low · up to adc95
A scope-resolution failure can temporarily hide folder-specific models or defaults, but the impact is localized and the existing published finding identifies a small, straightforward fix.
Pre-merge checks: 3 · 2
Failed checks: 2 warnings
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check
The description clearly explains the problem, change, scope, compatibility, and verification. It is incomplete against the repository template because it omits the required Linked Issue, Visual Proof …
Add an actual issue link under Linked Issue, provide before/after visual proof or write N/A with a reason, complete the Testing section and platform coverage, complete the Review, Notes, Agent skill upstream boundary, and Checklist sections…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title clearly identifies the primary user-facing change: new chats open the model picker with the full list instead of a partial list.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 8 functions across 7 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Full details: Description check
Explanation
The description clearly explains the problem, change, scope, compatibility, and verification. It is incomplete against the repository template because it omits the required Linked Issue, Visual Proof or an explicit N/A explanation, testing checkboxes and platform details, review notes, and the checklist.
Resolution
Add an actual issue link under Linked Issue, provide before/after visual proof or write N/A with a reason, complete the Testing section and platform coverage, complete the Review, Notes, Agent skill upstream boundary, and Checklist sections, and add AI Disclosure if the contributor is external.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Let the late account resolution settle before you assert that no probe ran.
home.resolve(HOME) only schedules the continuations that wait on home.promise. The next statement, expect(h.runs).toEqual([]), runs synchronously in the same turn. No continuation has run at that point, so h.runs is always empty, even if the service ignores its deadline and probes /cold.
As written, this check cannot catch a regression where a late account resolution still starts a listing. Yield to the event loop before the assertion. Alternatively, wait for a short interval and also check that h.resolve was never called.
💚 Proposed fix
home.resolve(HOME)
+ await new Promise((resolve) => setTimeout(resolve, 0))+ expect(h.resolve).not.toHaveBeenCalled()
expect(h.runs).toEqual([])
Based on learnings, the repository asks for tests "that would actually catch a regression, not shallow coverage that only exercises the happy path."
Source: Learnings
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: a85d0928-0b5c-4a31-ad8e-80a5ed31d521
Commits
Reviewing files that changed from the base of the PR and between 1b80900 and 8362e5f.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
New Claude and Codex chats could briefly show only a remembered model or a partial list while their folder’s inventory loaded. Startup discovery populated a different entry, leaving the existing account fallback empty.
This PR makes the known account list available while each folder’s own list loads. The provisional answer declares no folder default model or effort, remains folder-scoped, and never controls whether a user’s literal choice is accepted. A valid same-account result also survives failed refreshes until a successful replacement arrives; real account changes, retirement and shutdown still invalidate it.
Five review rounds and the unanimous design-panel ruling are complete. Review fixed configured-default leakage, obsolete account replies, missed cached/joined publication, passive-read waiting, provisional scope metadata, account-proof eviction and failed-refresh demotion. Fresh correctness, consumer, architecture, performance, readiness and whole-mechanism reference checks accepted the final mechanism; the continued reviewer agreed. The addressed automated thread is resolved.
Verified for both Claude and Codex through the real service/store, persistence save/reload, shared shown-model/effort view, renderer cache and terminal discovery. The focused run passed 61 tests across three files, with final modified-file checks passing 42 and 4 tests. Six new regressions failed before the repair. Operation-count contracts cover 61/610 models and 260/2,600 requests, with no extra passive probes/writes and bounded canonical retention. The main-merge receiving-account regression file passed 14/14. CI is green on the merged head, including actually executed compiler/type checks, the cross-surface type ratchet, all twelve unit shards, wire compatibility, persistence, packaging and WSL jobs.
QA is tests-only: no app-only behavior, layout or interaction change was identified. No app, real-agent, emulator or screenshot run is claimed. Local phone-hook tests did not collect because react-test-renderer is absent; shared production response-to-shown-output contracts cover the changed input for both agents. The change does not promise a full list before the first host response; an account without a known list keeps its existing first-use behavior.
Two unproved concerns remain deferred: freshness bookkeeping when an old complete list is reused after a failed refresh, and precision of one effort-display assertion. Neither has a demonstrated user-visible failure.
Review and tests-row evidence are on 5747e32. The conflict-exception main merge eaafb55 incorporates main 002e975. Its narrow three-way review preserves main’s extracted lookup and receiving-account checks together with the approved publication rule; a demonstrated fallback interaction was corrected using those existing ownership facts and the targeted 14-test check. Evidence carries across that merge under the main-merge rule; final CI covers eaafb55.
Adapt upstream stablyai#36646 to the LLW catalog service. Keep temporary rows free of project defaults and retain account isolation.
(cherry picked from commit a2235ad)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Opening the model picker in a new Codex or Claude chat could briefly show only part of the list, often just the remembered model, before the rest appeared. Each folder has its own list. A new folder had none, and startup discovery only populated the home-folder entry, leaving the existing account fallback empty.
Change
Orca saves the account list learned during startup and uses it while a new folder’s own list loads. The folder’s result then replaces it, including any project-specific models and defaults.
The provisional list declares neither the folder’s default model nor its default effort. Ordinary reads stay immediate when the account is not known yet. Account changes and shutdown invalidate obsolete results. An account request that reuses or joins an existing listing still publishes the account list. Provisional answers remain folder-scoped, and visiting many folders cannot discard the known account identity. If a later account lookup fails or times out, an existing valid list and its defaults remain available until a successful replacement arrives.
There are no new saved fields, wire fields or RPCs. Older desktop and phone clients use the reads they already make; older hosts retain their existing behavior.
Differences from the common pattern
model_provider,model_providersandmodel_catalog_json, and ClaudeavailableModels. The account list is provisional, so Orca does not duplicate the CLIs’ configuration rules.Verification
Tests cover both Claude and Codex: immediate provisional membership, the folder’s final list and defaults, preservation of explicit and unlisted choices, account retirement and shutdown, passive reads, shared listing/cache reuse, and a real catalog-file save and reload.
A production-path operation-count contract uses 61/610 models and 10/100 unrelated folders/readers. It checks one account publication plus the existing exact publication, no extra probes or writes from passive reads, coalesced persistence, unchanged-data suppression, and delivery of genuinely changed membership. This is an operation-count check, not a latency claim.
Focused catalog, RPC, shared option-display and renderer tests passed. The final repair passed 61 tests across the account service, renderer-cache integration and terminal enrichment files; subsequent checks of the two modified files passed 42 and 4 tests. Regressions cover failed and timed-out refreshes, late completion, subsequent success, account changes and newer publications, plus the actual structured shown default and terminal catalog consumption. All five provisional producer-to-cache checks remain covered in the existing cross-surface test project. The receiving-account regression file also passed 14/14, including proof that an unavailable receiving account never borrows the original account’s fallback list and that resolved account inventory stays correctly scoped. No app run was required for these catalog projection and persistence flows. Local phone-hook tests could not collect because
react-test-rendereris absent; shared production option-display tests cover the changed input for both agents.