iPolloWork icon indicating copy to clipboard operation
iPolloWork copied to clipboard

[Bug] Unavailable-model recovery action no longer opens the Composer picker

Open yuuu125 opened this issue 4 months ago • 0 comments

Background and impact

The recovery path for an unavailable selected model was restored in #91: the send error exposes a Choose model action. After the combined Composer model/reasoning menu landed in #138, that action updates state which no longer controls a visible picker. Clicking it therefore leaves the user with no direct way to select a working model and they cannot send the task until they find the model control manually.

Affected modules

  • apps/app/src/react-app/shell/session-route.tsx
  • apps/app/src/react-app/domains/session/surface/composer/composer.tsx
  • apps/app/src/react-app/domains/session/surface/composer/model-behavior-menu.tsx

session-route.tsx sets modelPicker.compactOpen to true from the unavailable-model toast action and forwards it as modelPickerOpen / onModelPickerOpenChange. Before #138, Composer passed those props to the controlled ModelSelect. The replacement ModelBehaviorMenu owns an independent useState(false) for its popover and receives neither prop, so the recovery action cannot open it.

Steps to reproduce

  1. Select a model whose provider is later disabled, disconnected, or otherwise unavailable.
  2. Start a session, enter a prompt, and send it.
  3. In the Selected model is unavailable error, click Choose model.

Expected behavior

The Composer model picker opens immediately so the user can choose an available model and continue sending the task.

Actual behavior

No model picker opens. The toast action changes compactOpen, but the combined ModelBehaviorMenu does not consume that state.

Suggested investigation

Make the combined menu expose and honor controlled open / onOpenChange props (or route the recovery action directly to its open state), then pass the existing Composer props through. Add a regression test that triggers the unavailable-model recovery action and verifies that the combined picker becomes visible.

yuuu125 avatar Jul 24 '26 08:07 yuuu125