Repository navigation
fix(native-chat): keep model picker choices stable during discovery - #36113
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Priority: Merge Risk:
|
|
Saved or seeded model choices could disappear while a native chat waited for discovery, and an unknown catalog could expose built-in replacement choices. Codex also lost its displayed default effort after the first reply. This change keeps the known choice visible, uses the same readiness rule for mouse, keyboard and requested opens, and gives unlisted choices readable labels with exact IDs. Display-only effort remains separate from accepted input; an explicit Low pick still records the user’s choice. The full review completed three rounds with zero new findings in the last round. Repairs cover the synthetic host label, provisional equal-value selection, refused phone request replay, and redundant accepted-effort catalog scans. The repeated stale-test failures were resolved under settled full-panel rulings; independent verification confirmed the downstream dispatch, effort, legacy exclusion and PTY checks actually ran. One pruning pass removed six redundant cases. The final diff against merged main is tests +851/-94; production +141/-53. The remaining cases cover distinct regressions, consumers, recorded output or mixed-version contracts. Incoming main also exposed an accepted-seed launch contract mismatch. A second full panel settled a tests-only repair: all twelve launch cases remain, with exact payload, permission, absent replacement mode and downstream settlement assertions. The repair passed the 29-case guard and 35 launcher contracts; main then moved the matrix into a parity file, and both final-content files passed all 29 cases together. All selected checks are green for final head Whole-mechanism reference, performance and readiness reviews are complete. The optional derived inventory marker preserves required arrays and old-peer behavior; literal saved choices remain authoritative and are never automatically replaced. The existing execution-host owner and quiet disabled placeholder are intended adaptations of the common pattern. The deferred terminal display-label/echo coupling concern has no demonstrated failing CLI input and remains nonblocking under the panel ruling. Retired OpenCode substitution remains tracked separately in STA-11727 / STA-11445. An inherited SSH upload error-attribution race surfaced in CI and is tracked in STA-13013; the picker PR leaves those source/test bytes unchanged. A The QA table classifies every changed flow as UI/observation ( Desktop screenshots are from For Brennan's review Loading, main and branch: Settled, main and branch: Disabled placeholder and provisional/explicit effort: Native phone: loading and saved choice during unknown inventory: Independent permissions, discovery without replay, and a fresh picker open: Source spots: display-only effort, unlisted host label, phone refused request. |












Saved model choices and the Model placeholder could disappear while a native chat waited for discovery, and the generic Model placeholder could still open by mouse, keyboard or a command. An in-flight catalog could expose built-in replacement choices before the installed list arrived. Codex could also lose its displayed default effort after its first reply.
The picker now keeps accepted seed and saved choices visible independently of discovery, keeps unknown pending inventory quiet, and uses one readiness result for its opening paths. Phone drawers honor the same descriptor boundary while keeping permissions reachable. Unlisted models get readable labels with the exact literal ID in the existing details. Codex can show a verified model’s declared effort default as presentation context after a reply; that value never becomes an explicit or saved choice.
Tracked in STA-11567, STA-11574 and STA-11620 (display half). The seed-visibility and unknown-catalog intent of #27641 is now covered here; merged #31208 already supplies its remaining ordering and ownership behavior. The legacy controller is not ported. The retired-Claude reset and error-copy work from the plan was already completed by #35266 and is not repeated here. Native OpenCode MiniMax-to-Flint substitution is tracked elsewhere in STA-11727 / STA-11445; this PR does not claim to fix it or acquire execution evidence.
Differences from the common pattern:
modelsKnown: falsefield. Requiredmodelsarrays remain unchanged. A new client retains its existing placeholder or last-good rows on false, still applies current values and permissions, and accepts later discovery even after an earlier live list. Pi’s live startup observation is unknown until its own listing completes; a completed empty live list remains authoritative. Old clients ignore the extra field and retain their existing recovery reads. Old hosts omit it, so new clients retain today’s authoritative-list behavior and recovery reads for those peers. This adaptation supports desktop, phone and SSH without a minimum host version. There is no new RPC, capability, saved data, Send refusal or provider-echo gate.Validation: all selected checks are green for
af5ef3d2b431d3bf6f30004a1f94de926524f6a5, including all 12 unit shards, static analysis/typecheck, Mobile, packaging and all three WSL jobs. Mobile CI collected and passed 27 picker tests and 6 first-frame tests. Focused contracts cover recorded Pi listing/state through production parsing, recorded ACP setup through its producer/host/shared boundary, literal dispatch, unknown-versus-empty inventory across versions, recovery reads and counted projection work at N and 10N.The full review completed three rounds with zero new findings in the last round, plus architecture, whole-mechanism reference, performance and readiness source reviews. One pruning pass removed six redundant cases. Final test diff is +851/-94; production is +141/-53. Remaining cases cover distinct regressions and consumer/cross-version boundaries. Settled panel rulings repaired stale downstream expectations while retaining exact identity, effort, permissions and dispatch checks. Incoming main's launch matrix now preserves all 12 cases and their downstream assertions; its 17 guard plus 12 parity cases passed together, and 35 launcher contracts passed separately. Passing runs overlap and are not summed as unique coverage.
An unrelated inherited SSH upload error-attribution race surfaced in one CI shard. Its source/test bytes match main and the prior green head. The requested
--failedretry passed; the underlying P2 remains tracked in STA-13013 and is unchanged here. The terminal display-label/echo concern remains deferred under the panel ruling without a demonstrated failing CLI input.The QA table types these changes as UI/observation (
qa=tests); no live-agent, provider-turn or lifecycle execution verdict is claimed. Desktop screenshots compare identical controlled catalog inputs on main and branch through shipped UI/hooks: loading and settlement, disabled pointer/ArrowDown/requested opens, independent permissions, provisional effort and an actual accepted Low host-write receipt. Native iOS proof uses the installed app's shipped native shell and hash-validated branch page bundle with an isolated synthetic host. It passed disabled opening, saved choice during unknown inventory, independent permissions, consumed/modelwithout later replay and fresh opening after discovery. All owned copies/helpers/Metro stopped and the simulator shut down. Optional folder and readonly-model variations were not exercised in screenshots.Desktop evidence remains attributed to
8ad5852versus maind61f8ba; phone evidence is57c5351. Independent integration checks carry those unchanged flows across tests-only57c5351/04acf237, the display-equivalent effort optimization79f95ad, and audited main merges5e2de508,02a8d804andaf5ef3d2. The last main merge preserves its fixture refactor and moves the complete repaired matrix into its parity file, with the former effectiveaskfixture input explicit; all other 35 reviewed paths, including production, are byte-unchanged. The working Mac received no extra mobile installation, standalone lint/typecheck or full suite.