Skip to content

Keep native picker IDs separate from form editor text - #1760

Merged
trissim merged 1 commit into
mainfrom
work/parallel-pi--P208--toad
Nov 13, 2026
Merged

trissim merged 1 commit into
mainfrom
work/parallel-pi--P208--toad

Conversation

@trissim

@trissim trissim commented Nov 13, 2026

Copy link
Copy Markdown

P208: keep native IDs native

6 focused Core cases passed (1.38 s); the original Toad first-click form case passed (11.36 s), using both changed source trees. No provider call or profile.

Boundary

Before: CatalogTargetField.prepare changed native example/model-one into the editor string "example/model-one" inside the catalog itself. Toad's shared ModelSelection then searched, compared current selection and ranked recents using that encoded value. Native history stores the unquoted ID.

After: prepared catalogs retain their original CatalogChoice records. The target field owns translation between choice identity and editor text. Finite annotation choices keep their existing serialized values. Toad's companion change reads current values and writes selected values through these hooks; no second selector, alias table, quote-stripping rule or cache.

Trace and limits

  • Native models enter through ModelConfigOption / CatalogConfigOption.display_choices and are transported by TargetField.offered / with_offered.
  • PreparedChoices supplies editor choices; CatalogFieldSelection supplies native IDs to the existing ModelSelection.
  • Conversation.on_change_model and agent_turn_over record model.value through DB.record_model_usage; ModelConfigurationSetting.recent_choices reads those raw IDs for ModelSelection.
  • The command picker has no history_scope override. This fixes the ID contract and current-value display; it does not claim to add command-dialog recents loading.
  • Unconfigured current values remain in generic form metadata and retain their encoded null representation. They are not native model IDs.

Evidence

Native authored plans: p208-model-choice-boundary.plan.json and p208-model-choice-tests.plan.json in /home/ts/.cache/agent-scratch/parallel-pi/; both NRA applies exited 0, with one parser and one analysis worker and only the selected files. This is an authored repair, not an automatically proved behavioral equivalence or a global scan.

Core checks cover native identity, current-value decoding, editor payload round-trip to ThreadModel, offered-choice transport and unchanged finite choices, for explicit and unconfigured current models. Toad's original form case additionally verifies current selection and first-click confirmation. The popup's actual selection callback is source-traced; it has not been exercised by a new physical UI run.

The original probe and full test logs are retained beside the plans. The Core and Toad changes must ship together in one ordinary install.

Copilot AI balanced review requested due to automatic review settings November 13, 2026 04:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions

Copy link
Copy Markdown

debt-src at 4c39fbf blocks on 5 lines:

grew ForeignAbsenceProbe:src/toad/widgets/comms_command_dialog.py +1
grew NoneAbsence:src/toad/widgets/comms_command_dialog.py +1
found ForeignAbsenceProbe:src/toad/widgets/comms_command_dialog.py at src/toad/widgets/comms_command_dialog.py:102
found NoneAbsence:src/toad/widgets/comms_command_dialog.py at src/toad/widgets/comms_command_dialog.py:210 src/toad/widgets/comms_command_dialog.py:102 src/toad/widgets/comms_command_dialog.py:90
introduced NoneAbsence:src/toad/widgets/comms_command_dialog.py at lines [102]

@trissim
trissim merged commit d9e0381 into main Nov 13, 2026
1 of 2 checks passed
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