Skip to content

Build wire export and thread import from the existing native form owners - #683

Draft
trissim wants to merge 3 commits into
checkpoint/native-form-kinds-9930from
refactor/transfer-native-forms
Draft

trissim wants to merge 3 commits into
checkpoint/native-form-kinds-9930from
refactor/transfer-native-forms

Conversation

@trissim

@trissim trissim commented Oct 16, 2026 •

Copy link
Copy Markdown

Transfer forms: existing owners, no selector dispatch

Uninstalled dependent draft. Its temporary ancestry is the Forms owner's WIP checkpoint cc91178; that ancestry is not a build recipe or a promotion-ready foundation. The consumer's supported interface target is ea33717 with its matching pins: Textual e2fd8a336, ObjectState82a62132, FormBridge1a45b8e0. Codex owns current-main integration of that foundation and the complete reviewed graph before publication. Do not bring cc91178's unfinished ParameterInfo migration merely by merging this branch.

Consumer source head a4751c0f2; functional fix fa6c82c78. Final consumer diff changes only src/toad/widgets/comms_transfer.py. The agent-authored CLAUDE.md line was reverted separately; no project-instruction diff remains.

Ownership and deletion

  • Dialog Fields dataclasses own draft declarations and boundary conversion. Existing ObjectState/FormBridge/FormView own editing, validation, field discovery and focus. TransferDialog finishes edits and constructs the original typed request.
  • Existing FormPart/FormModal/InlineFormView own native geometry, paint and theme lifecycle. The fields scroll; actions retain their own horizontal layout outside that viewport. The CSS block is deleted, not translated into a stylesheet wrapper.
  • Button references/listeners and declared FieldPath bindings replace IDs, queries and selector event handlers.
  • Scope input declarations own target-text conversion; Core still owns scope semantics and wire encoding. Format choices derive from the original family/enum. Wire labels use Core's codec through the existing FamilyChoices capability; no alternate registry or codec.
  • Existing export/import operations and cancellation remain. Text export's default suffix is now its declared .text, not the previous hard-coded .txt; custom destinations are retained.

Before/after evidence

Against this PR's parent cc91178, one complete consumer family:

Production sites Before After
Class writes 0 0
String selector queries 14 0
Selector event handlers 4 0
DEFAULT_CSS blocks 1 0
Requested rg matching lines 15 0

Before: IDs and handler selectors in both dialog constructors, mount/focus, field collection and validation. After: TransferDialog.__init__ retained references, native form field bindings, and the two Fields.request implementations. No field-value collection through the DOM remains. Do not credit this PR with its parent's unrelated Forms deletions or combine its global count with the main-based #682 count.

Reused audit.Package parsing: Toad 282 modules, native Textual254, Forms Toad284, FormBridge92, ObjectState30; zero parse omissions. Relevant declarations, imports, inheritance, writes, lookups, conversion and lifecycle consumers were read. Dynamic family discovery is not whole-program behavioral proof.

Real application results, not installed acceptance

Plain st on isolated :278, existing saved toad-ui-2 session, no provider input or export/import operation:

  1. 8b858a6 was broken. Opening Export crashed because RegisteredClassChoices requires a registry-key protocol that Core's family does not implement. fa6c82c replaces that wrong metadata with the existing FamilyChoices discovery and Core-owned labels; it also declares the horizontal native action layout.
  2. fa6c82c source preview on reviewed Core0800ff1c passed the requested dialog checks: both dialogs opened, native Tab traversed fields, 1050x800 and720x600 kept the action row accessible while the form scrolled, required-field errors appeared, format/scope selection worked, default text suffix updated, and native Settings changed wal→ansi-light while Import stayed retained underneath. Export reopened in the changed theme. Sources: Toad basecc91178e3, nativee2fd8a336, ObjectState82a62132, FormBridgedc5d21e4. Screens/OWNER: /home/ts/.cache/agent-scratch/toad-ui-2-transfer-native-layout/.
  3. The source cohort's saved-thread backdrop showed an old BreathingSweep.scaled API failure. This was sent to the theme owner as 36fd060bdce8; it is not a save-path error and did not block the dialog checks.
  4. Old-Core reader retired: frontend1293864/st1293848, all tracked children and owned Xvfb1293846 closed; original session/participant/UNKNOWN preserved.
  5. Normal installed launcher rechecked on current760d3c944/Core46ee4a206 (successor of requested24751e904). No source overlay. Both legacy dialogs opened, native Tab and theme switching worked. But at720x600 both action areas are clipped, so installed sizing is broken. Raw failures export-narrow.png and import-narrow.png plus receipts: /home/ts/.cache/agent-scratch/toad-ui-2-transfer-installed-760d/. This installed package still contains the old CSS/query dialogs, not this PR. Its foreground, ACP/pools and owned display were also closed after checking.

Precise integration gap

Not merged, installed or accepted against current Core. The demonstrated source cohort is not the Forms parent's pinned build: cc91178 pins FormBridge 1a45b8e0, while the dialog run used dc5d21e4. That revision changes field selection and deletes two service implementations. The passing checks do not validate 1a45b8e0 or an interchangeable build. The actual source-overlay heads are listed above; its immutable launcher/dependency baseline is the af76d3b/Core21136feca runtime recorded by the run, with reviewed Core0800ff1c overlaid. No new build was produced.

A standalone UI-only import against installed Core46ee4a206 failed in the old parent at toad/acp/status.py:4 importing removed NativeTool. Codex's later trial merge of current main removes that import cleanly; no compatibility repair is needed. His Textual trial also preserves the current hint implementation. The remaining promotion blocker is the unfinished optional Forms work and a reviewed, complete dependency graph—not that stale import. Current Core already provides record_fields.

The foundation owner additionally confirmed cc91178 has an internally mismatched manifest: ValueView.shows expects ParameterInfo to be a class, while pinned FormBridge1a45b8e0 defines ParameterInfo as a union. Source comparison ea33717→cc91178e3 shows only that internal import/selection substitution across the consumed form_view/field_path/presentation/declared_views files; the consumer-facing FormView constructor/finish, InlineFormView, FieldPath.bind and FormPart/FormModal contracts are unchanged. #683 uses those ea33717 interfaces and requires no WIP ParameterInfo API. No foundation implementation was copied or patched. The ea33717+1a45b8e0 target has not received the older dc5d21e4 run's acceptance by implication.

Core-route-counts retains foundation/nullable Forms ownership; Codex retains current-main integration and paired publication; UI2 retains this consumer and dialog verification. #683 remains uninstalled and is not promotion-ready.

No compatibility alias, Core overlay against the new runtime, installation, goal reset or UNKNOWN replay attempted. Raw startup/choice failures retained. Source imports (original cohort), syntax/count inspection and whitespace checks were used; no automated tests/fixtures and no performance claim.

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