Skip to content

TUI: editing a model opens on 'Thinking: inherit' regardless of current value #29

Description

@grzegorznowak

Summary

When opening the model-edit screen (MODEL_EDIT) in the Model Groups TUI, the cursor always initializes on the first thinking option (inherit), regardless of the model's currently configured thinking level. Pressing Enter then silently writes inherit (dropping the actual setting) and returns to the editor.

Impact

  • A model configured with e.g. high opens with the cursor on inherit; Enter overwrites the value without the user intending to.
  • When the model is unavailable, thinkingOptionsFor() returns only inherit, so the currently-configured value cannot be displayed as current nor distinguished from the replacement.

Reproduction

  1. Create/select a model group with a model whose thinking level is not inherit (e.g. high).
  2. Open the group editor, select the model row (Enter) to open MODEL_EDIT.
  3. Observe the cursor on Thinking: inherit even though the model is configured high. Press Enter → value resets to inherit and returns to editor.

Expected behavior

  • The cursor should initialize on the model's current thinking level, with a ✓ current marker on that option.
  • If the current value is configured but no longer supported/available, it should still be shown as current (e.g. ⚠ current, unavailable) and preserved unless the user deliberately selects another option.

Notes

  • Originates from a #planner UX review of the Model Groups TUI (see also the focus-follows-current-state theme). This is the model-edit instance; a related instance (global group opening on the "project" location row) is tracked separately.
  • Link in code: model-groups/tui.tsopenEditor/MODEL_EDIT activation (~L359-365) and renderModelEditComponent (~L672-684); state.row is reset to 0 on every entry.

Out of scope (this session)

Implementation deferred intentionally; filed to address in a later pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions