User-requested addition to the JSON Note dialog (SF #795 umbrella / #796 phase 1, native
OP_NOTEJSON type + freeform cJSON validate/format editor, shipped 2026-09-15). The freeform
text box + Validate/Format buttons work, but there's no assisted way to add/edit/delete a
simple name-value pair without hand-typing JSON syntax directly. Requested purpose, in the
user's own words: a simple UI to properly format any changes -- a formatting aid, not a
schema or structure editor.
Proposed UI (one row + a button row, matching the existing Validate/Format PD_BUTTON/
PDO_DLGHORZ pattern):
Deliberately out of scope, per the user's own framing ("more complex is still a user
function"): arrays, nested-object creation, and any value more complex than a JSON scalar --
those stay text-box-only.
Three design decisions already made (full reasoning in the implementation plan doc, section
1a):
Implementation detail (widget constants, dialog height, exact function signature) and a
draft doxygen comment documenting the above contract/limits are in
.claude/json-note-implementation-plan-2026-09-15-v1.md, section "1a. JSON Note dialog --
structured field editor (addendum, proposed 2026-09-16, not started)".
Scope: GTK3V2MAIN only (same as the rest of JSON Note -- depends on Layer Groups/PARAMVERSION
13). Touches only app/bin/jsonnoteui.c and its .ui file; no MCP-side or file-format changes.
Deliberately deferred: not blocking, lower priority than in-flight feature work (Layer
Groups / Reports / JSON Note Phase B schemas and the MCP refactor). Pick up whenever that
work allows -- this is a usability nicety on an already-shipped dialog, not fixing a defect.
Anonymous
Implemented and pushed for review: git PR #203 (https://github.com/adbyrne/XTrkCAD/pull/203), Hg bug branch bug-798-jsonnote-structured-editor-gtk3 (forked from bug-796-json-note-phase1-gtk3 tip r7325, same Layer Groups PARAMVERSION-13 dependency as the rest of JSON Note -- cannot merge to Hg mainline until Layer Groups own branch does).
Object dropdown + Name/Value entries + Save/Delete button row, added below the existing freeform text box. Live-tested via Xvfb: add/update/delete scalar fields, correct string/number/bool type inference, one-level-deep nested-object targeting, empty-Name rejection. Full design/reasoning in the PR description and the implementation plan doc section 1a.
Two real wlib-level bugs found and fixed during live testing (FormFetchData() needed explicitly before reading button-triggered field values; a focus-out-handler race that could silently leave stale text in a cleared field) -- both detailed in the PR description in case they help anyone touching similar structured-editor UI elsewhere in the app.
Follow-up commit pushed (git 5ffc38eb, Hg r7329, same PR #203): leaving Value blank on Save now creates an empty nested object instead of an empty string, since Save already re-syncs the Object dropdown on success this makes it immediately selectable for filling in further fields. Also added the structured field editor'''s first help-page documentation (drawm.dox cmdJsonNote) -- it had shipped with none. Both found/confirmed via live click-testing this session. Also filed SF #800 for a larger follow-on redesign of the Notes Report'''s Kind filter raised during that same testing -- not part of this ticket'''s scope.
PR #203 merged into git GTK3V2MAIN (8d2bb891a29f). Hg bug branch pushed to SF (both hops) -- status set to needs-review, matching #796/#797's precedent: cannot merge into Hg GTK3V2MAIN mainline until Layer Groups' own Hg branch (#782/#787/#789) does, since this branch forks from that lineage for the PARAMVERSION-13 dependency.