Skip to content

Show shared command forms promptly and submit their confirm button - #1751

Merged
trissim merged 3 commits into
mainfrom
work/codex-parallel--P189--toad
Nov 13, 2026
Merged

trissim merged 3 commits into
mainfrom
work/codex-parallel--P189--toad

Conversation

@trissim

@trissim trissim commented Nov 12, 2026 •

Copy link
Copy Markdown

Show the form before discovery; one owner for submission

Focused real-app control: 1 collected, 1 passed, exit 0, 19.43 s.

The shared form now opens from the original command field declarations, before provider catalogs are prepared. The form's existing worker fills those catalogs afterward; Core #4658 retains each catalog at its serving root, preserving auth invalidation and failure retry.

Mouse and keyboard call the same complete confirmation method. Submission commits the focused editor, waits for current preparation, validates through the field declarations, checks the command's original confirmation contract, and returns the original arguments to the existing backend callback.

Catalog refresh and confirmation previews no longer write Apply.disabled. Those competing writers could disable the button between mouse-down (which commits Name on blur) and click, silently dropping the user's first gesture. Only active submission disables Apply, and every failed or cancelled attempt restores interaction. One validated_action method supplies the preview and submission; the copied catalog membership/default-equality rules are deleted.

Existing selectors, not replacement text fields

FormBridge #20 fixes the shared annotation reader: documentation strings do not declare a text editor. PreparedChoices inherits the shared labelled-choice metadata; Model uses the original searchable picker and Thinking uses the existing choice dropdown. The regression entered Toad in 4df2228 (#1748), where adding help text exposed that reader bug.

Evidence and limits

test_command_form_opens_before_preparation_and_first_mouse_confirm_submits uses the running Toad app and real catalog preparation held at its request boundary. It proves the form is mounted before discovery finishes, checks the exact existing Model/Thinking editor classes, then types Name and clicks Apply without pre-blurring. The callback receives that edited name on its first click.

This check proves form opening and completion, not actual backend thread creation or installed physical UI behavior. Those remain separate delivery checks; no fake-created thread is claimed. No broad suite, paid provider call, or live credential mutation.

FormBridge #20 and Core #4658 are merged. The earlier auth recovery is complete; it is not a remaining gate on this change.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

debt-src at 9f202b4 blocks on 9 lines:

grew BooleanChainTerms:src/toad/widgets/comms_command_dialog.py +4
grew BroadSwallow:src/toad/widgets/comms_command_dialog.py +1
grew LongBooleanChain +1
grew TypeErrors:src/toad/widgets/comms_command_dialog.py +2
found BooleanChainTerms:src/toad/widgets/comms_command_dialog.py at src/toad/widgets/comms_command_dialog.py:289 src/toad/widgets/comms_command_dialog.py:289 src/toad/widgets/comms_command_dialog.py:289 src/toad/widgets/comms_command_dialog.py:289
found BroadSwallow:src/toad/widgets/comms_command_dialog.py at src/toad/widgets/comms_command_dialog.py:340
found LongBooleanChain at src/toad/widgets/comms_command_dialog.py:289
found TypeErrors:src/toad/widgets/comms_command_dialog.py at src/toad/widgets/comms_command_dialog.py:21 (Module "python_introspect.choices" has no attribute "LabelledChoices"  [attr-defined]) src/toad/widgets/comms_command_dialog.py:295 (Argument 1 to "show_error" of "ThemedApp" has incompatible type "BaseException"; expected "Exception | str"  [arg-type])
introduced BroadSwallow:src/toad/widgets/comms_command_dialog.py at lines [340]
Warn-only, never blocks (4)
src/toad/thread_actions.py: LintFindings +3
src/toad/widgets/comms_command_dialog.py: LintFindings +5
found LintFindings:src/toad/thread_actions.py at src/toad/thread_actions.py:13 (F401 [*] `agent_comms.errors.RouteChangedError` imported but unused) src/toad/thread_actions.py:14 (F401 [*] `agent_comms.execution.native_failures.NativePiUnavailable` imported but unused) src/toad/thread_actions.py:16 (F401 [*] `agent_comms.transport.tools.sidebar.CommsPrepareTargetActionTool` imported but unused)
found LintFindings:src/toad/widgets/comms_command_dialog.py at src/toad/widgets/comms_command_dialog.py:2 (I001 [*] Import block is un-sorted or un-formatted) src/toad/widgets/comms_command_dialog.py:9 (F401 [*] `agent_comms.cli_verbs.cli_command.PreparedTargetAction` imported but unused) src/toad/widgets/comms_command_dialog.py:12 (F401 [*] `agent_comms.errors.RouteChangedError` imported but unused) src/toad/widgets/comms_command_dialog.py:14 (F401 [*] `agent_comms.execution.native_failures.NativePiUnavailable` imported but unused) src/toad/widgets/comms_command_dialog.py:312 (B023 Function definition does not bind loop variable `edited`)

@trissim
trissim force-pushed the work/codex-parallel--P189--toad branch from 37967fe to 9f202b4 Compare November 13, 2026 01:57
@trissim
trissim marked this pull request as ready for review November 13, 2026 01:58
Copilot AI balanced review requested due to automatic review settings November 13, 2026 01:58
@trissim
trissim merged commit 900e61f into main Nov 13, 2026
1 of 2 checks passed

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.

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