Skip to content

Own the complete native settings and sort form family - #670

Closed
trissim wants to merge 27 commits into
mainfrom
refactor/native-formbridge
Closed

trissim wants to merge 27 commits into
mainfrom
refactor/native-formbridge

Conversation

@trissim

@trissim trissim commented Oct 15, 2026 •

Copy link
Copy Markdown

Status

Draft; Codex independent source approval received. Not installed or application-accepted.

Current checkpoint: ea3371713. Current main fa10dd324 is merged, retaining archive worker fix 52caf6716. This branch includes the shared modal/input capability from #664 (8c264fb0478354def9089ff8234eaef0f4cec79f), preserving its default-off safeguard. Only import conflicts were resolved in the source pairing.

Owners and deleted paths

  • ObjectState's ParameterStructure owns declarations and admitted topology. FormBridge yields each original DottedFieldPath with its parameter kind; FieldView.of passes that address to the existing DeclaredField. The runtime getattr(parent, parameter.name) is gone.
  • DeclaredField holds state/address, not a second declaration tree. It reads current declarations, values and defaults from ObjectState. OptionalMemberField narrows the same declaration. ValueEditor owns cooperative bind/native initialization/event hookup; native control leaves supply their differences.
  • The static FieldPath DSL remains for declaration references. Its bind operation checks the root and resolves through the admitted structure. Runtime steps, leaves, fields_below, declared_field, and SavedSettings' named map are deleted, not bypassed through an unchecked constructor.
  • SavedSettings change handling uses changed admitted leaves; file presence and selected output use the same topology. in_file/user_set retain explicit-key provenance, including empty groups and explicit values equal to defaults. PreferenceChanged carries the existing bound field; all four consumer families migrated.
  • DottedFieldPath.parent now owns immediate parenting, with lineage deriving ancestor traversal. SavedSettings, ParameterStructure, ObjectState's index/rebuild, inspection and preview formatting consume it; their parent splits/root branches and preview helper are deleted. ScopeKey and the static declaration DSL remain distinct. ObjectState checks: 36 passed in 0.13s; FormBridge preview checks: 6 passed in 0.02s. These are focused source checks, not app acceptance.
  • All twelve matching raw leaf-name splitting copies are removed. Existing DottedFieldPath.field_name serves address-based inspection/edit/resolution/save/restore/preview consumers; bridge conversion now takes its admitted declaration's name directly (below). No helper or stored path copy was added. Current focused checks: 113 ObjectState passed in 0.94s; 13 FormBridge passed in 0.08s. Not paired-app acceptance.
  • Bridge field conversion now reads the exact declaration from state.parameter_structure.declarations[request.field_path]. Its repeated analyzer/owner lookup, leaf re-derivation and untyped raw-value fallback are deleted. 13 FormBridge checks passed in 0.08s, with post-admission analyzer re-entry forbidden, scalar/group conversion and unknown-declaration rejection covered. No paired-app acceptance claim.
  • The converter's unused fourth obj_type parameter and stale documentation are deleted. The wider search found two production and one test four-argument PyQt callers outside this app graph; PyQt #33 migrates those plus two removed default-forwarder readers and aligns its dependency ranges. All 24 known sites now use three arguments. 25 FormBridge passed in 0.17s; 30 PyQt passed in 1.20s (isolated source checks borrowing installed Qt dependencies, not a paired application build). Source census including PyQt: 1,145 modules / 5,760 original / 5,734 nominal projections / 26 OPEN / no parse omissions, unchanged before/after. Dynamic binding/MRO/effects remain unproved.
  • Codec wire keys come from the existing declaration implementation in Core P449: fade arriving DM and channel rows on the history clock #921 (FieldCodec.record_fields), not a second metadata interpretation.
  • Native form geometry/paint comes directly from the existing widgets through Textual Report saved history availability separately from bus input checks #135's shared BoxGeometry, PaintLayer and FramePaint contracts. CSS-backed widgets use those same algorithms. No native/effective-style mirror or parallel cache.
  • Settings CSS is deleted; converted settings/form/dialog inline style writes are deleted. SortControl's unrelated CSS remains. Input, Checkbox, Select's current-value child and bounded TextArea use native controls. FormModal composes with the shared Toad ModalScreen rather than replacing its key handling.

One pinned source graph

pyproject.toml and uv.lock agree:

Package Version Source
Core 0.1.0 0800ff1cae4585a359eec6268c6ce809a3af6b7f (#921, current main integrated)
Textual 8.2.8 e2fd8a336c49db0f16f22fc52618b378e30968cf (#135, includes #134 9a18a0f0f)
ObjectState 4.0.1 82a6213263c9532f1b7cd4ebb2e9e368fdc5e2bd (#61)
FormBridge 0.1.5 1a45b8e0af860f824e5ce7ce47491ecd6555fb43 (#13)
python-introspect 0.3.0 registry
zmqruntime 0.6.5 registry

No old-installed/new-source overlay is an acceptance graph. Codex retains global integration/installation ownership.

Evidence and limits

  • Settings no longer reads a CSS breakpoint class. Native ScreenWidth declarations own the 0/100 thresholds and side-panel widths; legacy class declarations derive from them. Screen resolves both native sizing and CSS through the same existing breakpoint algorithm. Seven focused existing Textual compositor/selection checks passed in 1.68s; declaration/resolver smoke covers 99/100/101 and reversal, not actual form acceptance. The source-only Textual lock references were updated after confirming its dependency/version/build metadata was unchanged; uv lock --check --offline --no-build validates 107 packages. No package build was allowed by the no-build metadata refresh attempt.

  • Latest wider-family migration: ObjectState Preserve transcript reader anchors and selection across filter changes #61 82a6213 owns root/nested direct-child selection; PyQt Update the pinned agent-comms revision for compaction context fixes #33 19917ea delegates leaf/parent/parts/lineage/intersection across all related consumers and deletes five replaced helpers. Its child identity still rejects root; structural-display/enum/module/ScopeKey parsing stays separate. 19 ObjectState checks passed in 0.07s; 67 PyQt checks passed in 2.10s. Before/after source census including full PyQt: 1,145 modules / 5,760 original / 5,734 nominal projections / 26 OPEN / no parse omissions; unchanged class counts. These are isolated library checks borrowing existing Qt dependencies, not an app build or acceptance. No new production type/cache/helper/codec/alias.

  • Topology correction before/after: NRA's existing syntax/class-family tooling covered 744 production/dependency modules, 4,363 original classes / 4,352 nominal projections, 11 OPEN, no parse errors. No new class, wrapper or registry for this correction; a new setting needs no second topology enrollment.

  • Corrected combined source graph, including Textual and actual registry python-introspect 0.3.0: 999 modules, 5,166 original classes / 5,150 nominal projections, 16 OPEN, no parse errors. The earlier census used a python-introspect checkout still at 0.2.8; the four-class difference comes from correcting that dependency input, not new refactor classes. Dynamic aliases, C3 execution and invocation effects remain unproven by AST. All 983 Python files in the five changed projects parse; whitespace checks pass.

  • Removed-path search has no runtime leaves, fields_below, steps, self.named or getattr(parent, parameter.name) hits in the converted family. Existing settings-screen assertions were migrated; no automated Toad test was added or run.

  • Core's codec/ownership checks: 34 passed in 2.80s, before the normal current-main merge; the codec implementation was unchanged by that merge. These are not persistence or UI acceptance.

  • Exact source lock resolved 107 packages; uv lock --check --offline passed. Git ancestry confirms both paired input/modal branches are retained. No new candidate build or installation was run for this correction.

Concise source/results: Core evidence. Detailed source indexes/searches/logs are owned by core-route-counts under /home/ts/.cache/agent-scratch/core-native-formbridge.

Remaining

Codex explicitly abandoned the earlier uncertain candidate for deployment. Its evidence remains untouched and is not reused or replayed. One fresh exact-source candidate in a different output is authorized; global integration/installation stays with Codex. The persistent goal remains BLOCKED.

@trissim

trissim commented Oct 15, 2026

Copy link
Copy Markdown
Author

Parent-address correction — 9376 / 9378

Owner: core-route-counts. Source correction only; no paired application build, installation or live acceptance.

Published source

Owner and consumers

Before: SavedSettings.saved_key (preferences.py:396), ParameterStructure.path (parameter_structure.py:43), and ObjectState._index_parameter_paths (object_state.py:2601) independently split the immediate parent and/or handle the root. The same fact was independently computed in FieldInspection.container_path and ObjectStatePreviewFormattingService._container_path. ObjectState's container rebuild and ParameterStructure's ancestor lookup rebuilt prefix chains independently.

After: DottedFieldPath.parent (field_access.py:32–36) contains the sole immediate-parent implementation. The root and top-level fields both return the empty root through that implementation. DottedFieldPath.lineage derives the nearest-first, non-root chain by calling parent. All five external parent consumers use the owner; both ancestor consumers use lineage. The preview helper, consumer-side splitting, root-case branches and prefix-generation loops are deleted. ParameterStructure still returns canonical admitted addresses, and ordering/value reconstruction behavior is preserved by the focused checks. No class, cache, registry, compatibility alias or unchecked DSL constructor was added.

ScopeKey.parent and the static FieldPath declaration helper remain distinct identities and unchanged.

Actual production search across ObjectState/FormBridge/Toad for immediate-parent splitting and the replaced helper has one hit: objectstate/field_access.py:36. Source and detailed before/after sites: /home/ts/.cache/agent-scratch/core-native-formbridge/parent-{before-sites.json,cohort-index-family-sites.json,after-search.txt}.

Checks

  • ObjectState: 36 passed in 0.13s: field access, inspection, instance/topology replacement, transaction rollback and restore. Includes root/top-level/deep parent and lineage, canonical admitted identity, unknown-path rejection and rebuilt nested container values.
  • FormBridge: 6 passed in 0.02s: formatter registry and actual ObjectState root/nested preview grouping.
  • The first ObjectState command was rejected by inherited coverage options because the bounded environment intentionally omitted pytest-cov; reran with addopts cleared. The first added preview check omitted base-config initialization; corrected the test's setup using the existing scoped monkeypatch pattern. No production workaround was added.
  • Focused source checks used actual registry python-introspect 0.3.0 and zmqruntime 0.6.5, not old installed releases. A bounded 18-package test environment was used; this is not a paired-app graph or acceptance claim. No automated Toad test was added or run.
  • The refreshed exact source lock resolves 107 packages, and uv lock --check --offline passes. ObjectState and FormBridge source pins match these commits in both pyproject and lock.
  • Corrected dependency source evidence: the earlier census used an upstream checkout whose python-introspect version was still 0.2.8. This pass uses the actual cached 0.3.0 registry source (/home/ts/.cache/uv/archive-v0/FT38Im-ycCHocP0W). The corrected complete census covers 999 modules, 5,166 original classes / 5,150 nominal projections, 16 OPEN, zero parse omissions. The four-class count difference is the dependency correction, not four new refactor classes. Nominal indexing does not prove dynamic alias/MRO execution or invocation effects.
  • Whitespace checks pass. Source-only tests and AST do not prove saved-app settings/sort behavior, native paint/geometry or installed usability.

Scratch and remaining work

Owned scratch: /home/ts/.cache/agent-scratch/core-native-formbridge/parent-* holds source indexes, searches, small check/resolution logs and its completed environment setup logs. Purpose: this parent correction. The disposable parent-check-env dependency environment was removed after checking for matching active processes and finding none; concise evidence remains while source review is unfinished. No session/auth/wire/UNKNOWN records were touched.

Claude review, explicit disposition of the earlier UNKNOWN candidate command, a fresh exact paired build and the real Settings/Sort journey remain outstanding. This correction did not replay that attempt or reset the persistent goal's BLOCKED status. Global integration/installation remains Codex-owned.

@trissim

trissim commented Oct 15, 2026

Copy link
Copy Markdown
Author

Leaf-name correction — 9397

Owner: core-route-counts. Source/library checks only; no paired build, installation or app acceptance.

Published source

Owner and complete consumer migration

DottedFieldPath.field_name already owns leaf naming (objectstate/field_access.py:27–30); its implementation is unchanged. Before editing, full source retrieval found the five reported raw splits plus seven more in the same ObjectState lifecycle family.

All twelve now call the existing property directly:

  • Inspection: creation of inherited-source field identity and the existing snapshot field_name property.
  • ObjectState: local edit invalidation, descendant edit invalidation, instance replacement invalidation, inherited-value recomputation, snapshot resolution, saved-baseline invalidation, restore invalidation and target-difference discovery.
  • FormBridge: bridge field-value conversion and PreviewFieldFormatRequest.field_name.

The raw splits, redundant dot-presence branches and two split-only parts temporaries are deleted. There is no new helper, stored path copy, class, cache or alias. Ordinary full-path traversal is not leaf extraction and remains unchanged. ScopeKey and the static declaration DSL retain their distinct identities.

Production diff across ObjectState/FormBridge: 16 insertions / 18 deletions in four files. Tests extend existing cases rather than adding a parallel mechanism.

Evidence and checks

  • Existing NRA syntax/class-family tooling covered declarations, writes, decisions, checks, imports, inheritance and consumers before/after. 999 modules; 5,166 original / 5,150 nominally projected classes; 16 OPEN; zero parse omissions. Includes actual registry python-introspect 0.3.0 source. Dynamic aliases/MRO execution and invocation effects remain outside nominal static proof.
  • After-search finds leaf extraction only in DottedFieldPath and the deliberately separate ScopeKey owner; no raw dotted-field leaf split remains in ObjectState/FormBridge. Evidence: /home/ts/.cache/agent-scratch/core-native-formbridge/leaf-{before,after}-{search.txt,sites.json,summary.txt}.
  • ObjectState: 113 passed in 0.94s — field access, inspection, instance/topology replacement, rollback, restore, notification behavior and registered-ancestor live/saved resolution. Explicit field-name expectations cover root/top-level/deep addresses; inherited inspection checks both the snapshot and its source field name.
  • FormBridge: 13 passed in 0.08s — preview/declared-field cases. The existing actual-ObjectState root/nested case now checks PreviewFieldFormatRequest naming and bridge string-to-integer conversion at both addresses.
  • Focused source checks used cached dependencies including python-introspect 0.3.0 and zmqruntime 0.6.5, serially under disk pressure. No automated Toad test or synthetic app was added/run. This is not an installed or exact paired-app graph acceptance claim.
  • Updated source pins and lock resolve 107 packages; uv lock --check --offline passes. Whitespace checks pass; changed worktrees are clean and pushed.

Scratch and remaining work

Owned disposable source/index/check logs: /home/ts/.cache/agent-scratch/core-native-formbridge/leaf-*. Purpose: the 9397 leaf-name correction. The bounded leaf-check-env was removed after checking matching active processes and finding none. Cached registry inputs remain shared and untouched; concise evidence remains for review.

Claude large-draft review, explicit disposition of the earlier UNKNOWN candidate command, an exact paired build and real Settings/Sort acceptance remain outstanding. That attempt was not replayed and the persistent goal stays BLOCKED. No global package or installed runtime was changed.

@trissim

trissim commented Oct 15, 2026

Copy link
Copy Markdown
Author

Bridge declaration lookup — 9417

Owner: core-route-counts. Source/library correction; no exact paired build, installation or application acceptance.

Published: FormBridge #13 e98e805b47e99052296fe3e1fd5b510fac70e622; Toad #670 6761172bc3cd856c9c9307dcdb29d8351149b389. ObjectState #61 973aa09, Core #921 0800ff1c and Textual #135 3d881d5b2 are unchanged.

Owner and deletion

Before (formbridge/bridge/object_state.py:543–547): _converted_value asked ObjectState for the owner type, derived the leaf name, re-analyzed that type through UnifiedParameterAnalyzer, and returned the raw value when the inferred declaration was missing. The exact declaration was already recorded by ObjectState extraction in ParameterStructure.declarations.

After (object_state.py:542): lookup the admitted declaration by the full request path and pass its param_type/name to the existing ParameterFormService conversion owner. Delete the analyzer and DottedFieldPath imports, owner-type lookup, leaf re-derivation, raw-value fallback and unnecessary fourth conversion argument. No helper, store, alias, guard, codec or class is added. Missing admitted metadata fails through the map lookup instead of silently bypassing conversion; the public mutation service's existing validation/error envelope is unchanged.

A nested dataclass field now converts from its own recorded declaration rather than trying to find the parent's field name inside the nested type. Remaining FormService analyzer use extracts bare type/signature inputs without an ObjectState; static FieldPath's analyzer serves declaration construction, not admitted mutation.

Production diff: 4 insertions / 10 deletions, one module.

Checks

  • 13 FormBridge checks passed in 0.08s. The existing real-ObjectState root/nested case now forbids UnifiedParameterAnalyzer re-entry after state construction, verifies root/nested scalar conversion and preview naming, checks dataclass-group reconstruction, and verifies unknown declaration rejection. No automated Toad test or synthetic app was added/run.
  • Existing NRA syntax/class-family evidence covers before/after declarations, writes, checks, imports, inheritance and consumers: 999 modules, 5,166 original / 5,150 nominally projected classes, 16 OPEN, zero parse omissions. Actual registry python-introspect 0.3.0 source is included. Dynamic aliases/MRO execution and invocation effects are not certified by that index.
  • Production search finds no analyzer import/call in formbridge/bridge/object_state.py; _converted_value reads state.parameter_structure.declarations[request.field_path] directly.
  • Toad pyproject and lock pin the exact new FormBridge source. 107 packages resolved; uv lock --check --offline passes. Whitespace checks pass; changed worktrees are clean/pushed.
  • The previous 113 ObjectState checks remain the evidence for unchanged ObjectState 973aa09; they were not rerun for this FormBridge-only change. Source checks do not prove the configured saved-app Settings/Sort journey or installed usability.

Scratch and outstanding work

Owned disposable evidence: /home/ts/.cache/agent-scratch/core-native-formbridge/declaration-* contains before/after indexes/searches, small checks and resolution logs. Purpose: 9417 declaration correction. The bounded declaration-check-env was removed after checking matching active processes and finding none. Shared cached inputs remain untouched.

Claude review, explicit disposition of the earlier UNKNOWN candidate attempt, a fresh exact paired build and real Settings/Sort/persistence acceptance remain outstanding. That command was not replayed; the persistent goal remains BLOCKED. Global integration/installation remains Codex-owned.

@trissim

trissim commented Oct 16, 2026

Copy link
Copy Markdown
Author

P55/P29 checkpoint: category filtering uses declared message types and display constraints; generated category/hidden/unrouted CSS markers and unused native-block policy classes are deleted. Current main is merged while native-form dependency pins are preserved. The command dialog consumes prepared TargetFields, renders catalog choices without a free-text fallback, refreshes choices after model changes, and keeps Apply disabled for unselected or stale catalog fields. Core #921 supplies the declarations; its pending runtime API integration must land before the installed New Session check. No automated tests were run. Real dialog imports pass; New Session creation, Settings/Sort edits/undo, and category screenshots remain unfinished. NRA evidence and source counts: /home/ts/.cache/agent-scratch/forms-migration/p55-source-check.json.

@trissim

trissim commented Oct 16, 2026

Copy link
Copy Markdown
Author

P55 source checkpoint72ced63a4: model and thinking fields now reuse ModelSelection, factored from the existing ModelSwitcher. One search/ranking/recents/connection implementation; prompt and creation views supply their own choices and selection action. Empty catalogs keep the connect action reachable, while Apply stays disabled. Core4c6d58b75 supplies plain named choices and the catalog metadata; no duplicated model list or pi/prompt field. Core new/fork field counts6/7. Real form modules import together; installed creation and Settings/Sort/filtering screenshots are still pending Codex’s paired build. Native defaults normalization is finishing with core-native-runtime.

@trissim

trissim commented Oct 16, 2026

Copy link
Copy Markdown
Author

Superseded: forms landed as #732 (38f7069), P29 as #727 (8506f75), and P55/reconnect as #729/#713. The branch is kept for history.

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