Skip to content

[Obsidian review blockers] - Step 4: Keep default effort visible - #2793

Merged
logancyang merged 1 commit into
codex/issue-285-08-review-gatefrom
codex/fix-opencode-default-effort-layout
Aug 9, 2026
Merged

[Obsidian review blockers] - Step 4: Keep default effort visible#2793
logancyang merged 1 commit into
codex/issue-285-08-review-gatefrom
codex/fix-opencode-default-effort-layout

Conversation

@logancyang

Copy link
Copy Markdown
Owner

Relates to logancyang/obsidian-copilot-preview#285

Why

In Settings → Copilot → Basic → Agents → opencode, switching between models with and without effort levels removes and recreates the Default effort row. That makes the model list jump vertically while the user is toggling models.

What

The Default effort row now keeps its place whenever the default-model setting is visible. Models with effort levels keep the existing selectable options; models without them show a disabled Not supported select. Choosing the agent-native default shows the same stable row in its disabled Agent default state.

Non goal

This PR does not change model discovery, effort-capability detection, default-model persistence, session behavior, or CSS.

Screenshot

Unavailable — the full component-gallery build is blocked on the base branch by existing SVG-loader and Node-builtin bundling errors. The exact supported and unsupported states are included as focused gallery stories and covered by deterministic component tests.

Risk

Low

Criterion Status Reason
No behavior change, or a cosmetic/copy/docs/config change visible where it renders, or deterministic tests cover the changed behavior Component tests cover the supported → unsupported → supported transition, stable row identity, disabled state, labels, and value mapping
A defect would fail CI or be obvious on first use The regression test fails if the row unmounts or the disabled state is wrong
A revert fully restores prior state, including persisted data Rendering changes only; no stored settings or vault files are written differently
No auth, permissions, secrets, or input-handling surface changes The change is limited to an existing settings select
No public API, plugin API, message, or on-disk contract changes All existing runtime and persistence contracts are unchanged
No core-path concurrency, async-lifecycle, or state-machine changes Capability results are rendered synchronously from the existing model catalog
No hot-path behavior lacks deterministic coverage This settings-only path has direct transition and presentation coverage
No new dependency Dependency manifests are unchanged
Human-only behavior stays in one feature area and surfaces quickly Any layout or disabled-state regression is visible immediately in the OpenCode settings row

Review: skim Why and What, run Verification steps 2–4, confirm CI is green, and merge without reading the diff.

Verification

  1. Build and load this branch in the documented test vault, then open Settings → Copilot → Basic → Agents → opencode.
  2. Select an enabled OpenCode model that offers effort levels and confirm Default effort is enabled with its normal options.
  3. Select a model that does not offer effort levels and confirm the same row remains in place, its select is greyed out with Not supported, and the model list below does not shift.
  4. Switch back to the first model and confirm the select becomes enabled again without the row or model list moving.

@logancyang
logancyang marked this pull request as ready for review August 9, 2026 18:37
@logancyang
logancyang merged commit 3e257cb into codex/issue-285-08-review-gate Aug 9, 2026
2 checks passed
@logancyang
logancyang deleted the codex/fix-opencode-default-effort-layout branch August 9, 2026 18:37
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.

1 participant