Skip to content

feat(ui): select model effort in compare and review dialogs - #250

Merged
astyfx merged 1 commit into
mainfrom
fix/review-and-compare
Jul 27, 2026
Merged

feat(ui): select model effort in compare and review dialogs#250
astyfx merged 1 commit into
mainfrom
fix/review-and-compare

Conversation

@astyfx

@astyfx astyfx commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

Compare and Review let you choose a model but never a reasoning effort, so both surfaces always ran at the provider's configured tier. This adds a shared effort axis to the model picker, brings Compare onto the same searchable selector Review uses, reworks the Review focus list, and fixes the Compare textarea background.

Changes

Features

  • providers: new src/lib/providers/model-effort.ts owns supported effort values per provider/model, settings-derived defaults, cross-model clamping, and the claudeEffort / codexReasoningEffort runtime-override mapping
  • ui: ModelSelector gains an opt-in effort axis — the trigger reads model · effort and the search dialog gets an effort row
  • review: local change review sends the selected effort as a runtime override for that turn only
  • compare: each candidate and the independent judge pick model + effort through the searchable ModelSelector instead of the provider/model dropdown pair
  • compare: candidate effort flows into the task runtime overrides, judge effort into the judge runtime options, and both are shown in the compare result panel
  • review: focus list expands from 5 to 7 (adds UI & accessibility and Error handling) and each item now carries a one-line description explaining what it instructs the reviewer to do

Fixes

  • compare: drop the hardcoded bg-surface on the shared-brief and review-contract textareas so they match the Review dialog in every theme

Refactors / Chores

  • review: focus labels, descriptions, and prompt instructions now come from one module (src/lib/local-change-review.ts) so they cannot drift
  • store: launchCompareRunVariants takes a runtime-override patch instead of a bare model string, keeping the provider branch out of app.store.ts

Breaking Changes

Test Evidence

bun run typecheck                  # clean
bun run check:max-lines-ratchet    # passed (4 files)
bun run check:switch-exhaustiveness# clean
bun run check:reliability-gates    # passed (6 gates)

bun test tests/model-effort.test.ts tests/model-selector-effort.test.tsx \
  tests/compare-runs.test.ts tests/compare-run-store.test.ts \
  tests/local-change-review.test.ts tests/custom-theme.test.ts
# 66 pass, 0 fail

New coverage: tests/model-effort.test.ts (clamping, provider override mapping), tests/model-selector-effort.test.tsx (trigger renders the effort suffix only when opted in), plus compare/review cases for effort persistence, judge runtime options, and the expanded focus prompt.

A full bun test run also surfaces 11 pre-existing parallel flakes (provider binary discovery, PR-diff timeouts) that pass when their files run individually — unrelated to this change.

Notes

  • Effort defaults follow the existing per-model runtime preference, so behavior is unchanged until a user picks a different tier.
  • Unsupported carry-over values are repaired rather than sent: a Codex tier steps down to the nearest supported one (Luna ultramax), and a value with no ladder on the target provider is dropped so the provider's configured effort applies.
  • Theme guardrails: no new semantic tokens; the effort row and focus cards reuse existing primary / muted / border tokens, and the textarea fix removes a hardcoded surface instead of adding one.
  • Visual verification of the two dialogs was not run in-app; validation is typecheck, repo gates, and the tests above.

Compare and Review could pick a model but never a reasoning effort, so
both always ran at the provider's configured tier.

- add src/lib/providers/model-effort.ts as the single source for
  supported effort values, settings-derived defaults, cross-model
  clamping, and provider runtime-override mapping
- give ModelSelector an opt-in effort axis so the trigger reads
  "model · effort" and the search dialog gains an effort row
- replace the Compare provider/model dropdown pair with the searchable
  ModelSelector, per candidate and for the independent judge
- carry candidate effort into task runtime overrides and judge effort
  into the judge runtime options, dropping values a model rejects
- expand review focuses to seven with per-item descriptions sourced
  from the same module that builds the prompt instructions
- drop the hardcoded bg-surface on the Compare textareas so they match
  the Review dialog in every theme

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@astyfx
astyfx enabled auto-merge (squash) July 27, 2026 07:37

@heath-s heath-s left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved

@astyfx
astyfx merged commit aae02f5 into main Jul 27, 2026
4 checks passed
@astyfx
astyfx deleted the fix/review-and-compare branch July 27, 2026 07:43
@astyfx astyfx mentioned this pull request Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants