feat: persist model and reasoning selections

✅ merged · #383 · open-legal-products/mike ← open-legal-products/mike · opened 13d ago by willchen96 · merged 12d ago by willchen96 · self · +5,240-980 across 94 files · ↗ on GitHub

From the PR description

Summary

Persist model and reasoning selections as soon as users change the shared model control across web, tabular review chat, and Word chat surfaces.

What changed

  • Added the keyboard-accessible reasoning slider to the shared model toggle and exposed only supported reasoning levels, including GPT-5.6 Max while removing Minimal.
  • Persisted the profile last-selected model/reasoning and each existing chat selection immediately instead of waiting for message submission.
  • Added independent model and reasoning columns for tabular review chats, with migrations and fresh-install schema updates.
  • Reused the shared ChatInput in tabular review chat and kept each tabular chat model separate from the review execution model.
  • Kept tabular chat model/reasoning metadata synchronized in memory when navigating between chats.
  • Added model-specific reasoning normalization and a provider-error fallback before streaming.
  • Updated the BYOK explanation and model-source presentation behavior.
  • Reduced copy icon sizing across chat response surfaces and updated tabular chat liquid-glass/layout styling.

Why

Selections must survive refreshes and chat navigation, must not briefly show profile fallbacks while chat settings load, and must never send reasoning values rejected by the selected provider model.

Testing performed

  • npm run build --prefix backend
  • npm test --prefix backend - 816 passed, 25 skipped
  • npm run build --prefix frontend
  • npm run lint --prefix frontend - no errors
  • Focused frontend suites - 28 passed
  • Full frontend suite - 639 passed; one unrelated local timezone-sensitive history calendar assertion failed
  • npm run typecheck --prefix word-addin
  • Word production build reached webpack but requires REACT_APP_WEB_APP_URL in the local environment
  • Applied and verified all three new migrations against the local Supabase database
  • git diff --check

Our analysis

Persist chat model selections immediately — read the full analysis →

Think the analysis missed something the PR description covers?

Capture this PR into my fork

Download a Markdown prompt that tells Claude how to port every commit in this PR into your working tree. Run it via claude -p < capture-pull-383.md from inside the repo you want the changes in.

⬇ Download capture-pull-383.md