Skip to content

Remove repeated scans while building configuration choices - #1749

Merged
trissim merged 1 commit into
mainfrom
hotfix/p181-choice-enumeration
Nov 12, 2026
Merged

trissim merged 1 commit into
mainfrom
hotfix/p181-choice-enumeration

Conversation

@trissim

@trissim trissim commented Nov 12, 2026

Copy link
Copy Markdown

Enumerate labels and values together

P181 introduced an N-squared dropdown path: ChoicesEditor asked for every label separately, and AdvertisedChoices rebuilt/scanned the whole advertisement for each label.

AnnotationChoices now supplies a one-pass labelled_choices boundary for generic consumers. LabelledChoices supplies inherited value/label operations for sources that already own paired data; Toad's advertisement metadata implements only that original pair enumeration. The shared editor consumes the pairs directly, with no second registry or cache. Reverse-label decoding also enumerates once.

Native application and source review; one direct SDK-advertisement check covers pair order, values, labels and reverse lookup. No suite or profiling. Paired python-introspect and Toad source changes ship together through the ordinary tracked-main installer.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 21:59

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.

@trissim
trissim merged commit f98bdbb into main Nov 12, 2026
1 of 2 checks passed
@github-actions

Copy link
Copy Markdown

debt-src at c2bffc1 blocks on 4 lines:

grew TypeErrors:src/toad/acp/agent_configuration.py +1
grew TypeErrors:src/toad/forms/editors.py +1
found TypeErrors:src/toad/acp/agent_configuration.py at src/toad/acp/agent_configuration.py:21 (Module "python_introspect.choices" has no attribute "LabelledChoices"  [attr-defined])
found TypeErrors:src/toad/forms/editors.py at src/toad/forms/editors.py:289 ("AnnotationChoices" has no attribute "labelled_choices"  [attr-defined])
Warn-only, never blocks (2)
src/toad/acp/agent_configuration.py: LintFindings +1
found LintFindings:src/toad/acp/agent_configuration.py at src/toad/acp/agent_configuration.py:2 (I001 [*] Import block is un-sorted or un-formatted)

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