Skip to content

Require explicit model selection before chat send - #865

Closed
hamzamerzic wants to merge 1 commit into
mobius-os:mainfrom
hamzamerzic:enhancement/explicit-model-selection
Closed

Require explicit model selection before chat send#865
hamzamerzic wants to merge 1 commit into
mobius-os:mainfrom
hamzamerzic:enhancement/explicit-model-selection

Conversation

@hamzamerzic

Copy link
Copy Markdown
Collaborator

Summary

  • remove the invisible provider-default model path from interactive chats
  • open the existing model picker when Send is pressed without a selected model
  • preserve the draft and focus while asking for a choice

Tests

  • node --test src/components/ChatView/__tests__/modelSelectionPolicy.test.js

The full frontend build was also attempted against current main, but its memory-pressure guard deferred the run before compilation.

Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
@hamzamerzic hamzamerzic added area: ui User interface and interaction design enhancement New feature or request labels Aug 23, 2026

@miljanm miljanm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewer: QA second look

I found the following concrete risks. I’ve kept this focused on issues with a supported failure mode rather than style preferences.

LOW · Interactive open-picker wiring is only source-text asserted, not executed

frontend/src/components/ChatView/__tests__/modelSelectionPolicy.test.js:42 · tests
Reviewer rule: tests.changed_behavior_unprotected

The stateful behavior added here — the handledModelSelectionRequestRef dedup guard, the effect dependency array, and the ChatView setModelSelectionRequest increment threaded into ComposerPopover — is never exercised at runtime. A regression that keeps the matched text intact but breaks the wiring (an inverted ref comparison that re-opens on mount, a wrong/missing effect dependency, or the prop silently not threaded) still passes these assertions, while a cosmetic reformat of the matched source would falsely fail them.

Evidence: The needsModelSelection policy has real executed unit tests, but the new interactive behavior is checked only by reading files and regex-matching source: assert.match(popover, /modelSelectionRequest[\s\S]*setOpen\(true\)/), plus similar matches against ChatView.jsx and ChatSettingsPanel.jsx. No test renders the components or drives the state increment.

Suggested direction: Add at least one execution-level test asserting that incrementing the request opens the popover, that a further increment re-opens it after dismissal, and that a non-zero initial mount value does not auto-open — instead of matching source strings.

Reviewed revision b533075003c5.

@hamzamerzic

Copy link
Copy Markdown
Collaborator Author

Superseded by #869, which includes this picker UX and adds the authoritative server-side model requirement plus removal of remaining silent fallback paths. Keeping both open would duplicate the same frontend change and create avoidable merge/conflict debt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui User interface and interaction design enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants