Skip to content

Forms follow formatting and later values, dialog notes, cross-module and clock-driven fan-out - #1124

Merged
Yaraslaut merged 15 commits into
masterfrom
feat/batch-forms-dialogs-effects
Nov 16, 2026
Merged

Yaraslaut merged 15 commits into
masterfrom
feat/batch-forms-dialogs-effects

Conversation

@Yaraslaut

@Yaraslaut Yaraslaut commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Five library changes, plus a fix that makes the lims gallery fit Ubuntu's default font. One PR, because CI takes a while. Each change is its own commit, so any one can be dropped.

Closes #1116
Closes #1090
Closes #1107
Closes #1099
Closes #1101
Fixes #1089

What changes

  • A mounted form follows the session's formatting. A form used to read its numeric locale and date patterns once, at build time. It now follows Session::setFormat (ScreenCore::followFormatting).
  • An automatic form's saved field takes the record's later value. A field the user saved now picks up a value the record changes to afterwards. Each send takes a snapshot, and an echo check (FieldState::encodesLike) tells the server's echo of the user's own write from a real change.
  • Dialog and drawer head note, footer note and close control (ui/1 headNote, footerNote, closeButton).
    • The new fields go through DialogOptions, the document schema, the interpreter, the view tree, Qt Quick, the TUI and the recording backend.
    • dismissLabel now labels the close control too, so there is no second label field.
    • A Qt Quick restyle of a dialog must also declare the three new properties, just as it must declare description.
  • BRIDGE_ADD_EFFECTS. The code that composes two modules can add effects to one module's action that write another module's records.
    • The addition is unioned with the action's own declaration and can never remove an effect.
    • An addition naming an unregistered action or record is refused when effects are first read.
    • Two base declarations that differ are still refused.
    • lims's app declares that PostInvoice writes Ledger_Entry.
  • BRIDGE_REGISTER_CHANGES_AT. A model reports the next instant a record it serves changes by the clock alone.
    • The server owns an injectable clock (ServerConfig::clock, clockRecheck). At that instant it fans out a whole-type change through the same path action effects take, then asks the model again.
    • The model arms no timer.
    • lims reports its approval deadlines this way.
    • The screen harness's simulated server now delivers events.
  • lims gallery screens fit DejaVu Sans. CI renders with DejaVu, Ubuntu's default sans-serif, and four screens overflowed under it. The Qt Quick overflow check was correct about all four; qt_quick: the overflow check reports a width caught mid-layout, so the lims gallery render smoke fails intermittently #1123 has the measurements.
    • Worklist and sample list: the Priority column sizes to its tag instead of a fixed width.
    • Results: one column is wider, and the system-suitability row wraps.
    • Stability: the summary panel has a minimum width.

Specs updated:

  • docs/spec/forms/engine.md
  • docs/spec/ui/{document,author,view_tree,backend_contract}.md
  • docs/spec/qt_quick/backend.md
  • docs/spec/tui/frontend.md
  • docs/spec/core/{registry,backend}.md
  • docs/KEEPING-SCREENS-CURRENT.md

Verification (measured, clang linux-everything, Linux)

Tests on the final head:

  • ctest -LE "stress|ladder": 5666 of 5666 pass (QT_QPA_PLATFORM=offscreen).
  • ctest -L ladder -LE stress: all 844 pass, run in slices that together cover every test.

clang-tidy: run over every changed .cpp, plus a translation unit including each changed header. Findings were filtered to changed lines, as clang-tidy-diff filters them. The count went from 16 to 0, and one check was reported mid-fix and then fixed.

Hand mutations, each restored afterwards:

  • Dropping the BRIDGE_ADD_EFFECTS union fails the cross-module case and the accepted probe.
  • Dropping the server-side time fan-out fails the core [time] cases, the requisitions case and the inbox screen case.
  • No-op TUI overlay setters fail the TUI dialog test.
  • Dropping the interpreter's headNote binding fails the interpreter test.
  • Blanking the Qt footer note fails the overlay test.

lims gallery render smoke: under a DejaVu-only fontconfig it passed 10 of 10 runs, against 8 of 8 failing before the fix. With the default font it passed 3 of 3.

Not verified

  • gcc-debug and gcc-release -O3 builds. A local gcc-debug build is running alongside this CI run. Lane runs compiled only a few TUs with g++.
  • MSVC and clangcl, Doxygen, and the coverage allowlist; CI covers these.
  • clang-tidy and clang-format were run at version 23 locally. CI pins 22.
  • The gallery screens and the new dialog parts were checked by tests only, not by eye against the mockups.

Review notes

  • BRIDGE_ADD_EFFECTS has one call site so far, PostInvoice. Inventory's shared-transaction ReceiveGoods has the same gap, and test_goods_receipt.cpp still asserts the watcher is not told there. It can be declared the same way in a follow-up.
  • A time-derived change reaches only clients connected to a RemoteServer. A local-mode client should use refreshEvery, as KEEPING-SCREENS-CURRENT.md now says.
  • In test_cross_module_effects.cpp, the "ledger's own action is heard" control that runs after case (i) passes trivially, because heardOf is cumulative.

Fixes after the first CI run

  • ThreadSanitizer race in the deadline reporters. Every RemoteServer asked every reporter declared in the process, including ones whose model its own registry does not hold. The ask ran as a model-strand task reading the registry while the owning test destroyed it (test_action_log_phase2, test_ui_evaluate). A server now asks only the reporters its registry can run. The new test a_server_asks_only_the_reporters_its_registry_holds fails with the check reverted and passes with it.

  • clang-tidy 22: fixed the 6 findings CI reported. mountOverlay was over the complexity limit, so its note, close-button and label bindings moved into bindOverlayChrome.

  • ASan ladder timeout (also red on master): the ledger page parity test took 65 s in the plain ladder and passed the 120 s test limit under ASan. It is now four cases, each comparing every fourth query, so together they cover the same queries. On tmpfs locally the four parts take 13, 10, 3 and 3 s.

  • Coverage (also red on master since Bring the docs in line with the code, and rewrite the README around the essentials #1096): master measures include/morph/ui at 91.75%, below the 92% floor. The floor was set when the subsystem had 5,562 branch arms; it now has 17,204. The floor is re-baselined to 90% against the 91.75% measurement. This batch leaves the figure unchanged (master 15759/17176, this branch 15784/17204). Four drifted src/ui/document.cpp allowlist hints were moved, and the checker's own resolver now accepts all 20 entries.

  • The first run's ASan job lost contact with its runner during the build, and no log survives. If that recurs, it is the runner running out of memory.

  • Second run: both ladder jobs were shut down on their hosted runners (exit 143) while linking the ladder test binaries, four at a time. Ninja now runs at most two links at once (MORPH_LINK_JOBS, default 2, 0 for no limit); compiles keep full parallelism. That run's one clang-tidy finding (operator[] in the ledger slice) is fixed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj

Yaraslaut and others added 13 commits November 15, 2026 20:34
A form's session was built from a snapshot of the session's formatting, so a
later setDatePatterns or locale switch left its date inputs and number
encoding at the values read at mount. FormSession, WizardSession and
CollectionSession take setFormat, the screen applies it from an effect, and
the date input reads its pattern tracked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
A saved field of an automatic form stayed an edit forever, so a value
another client wrote never reached it. Success now ends the edit of a saved
scalar as in explicit mode, the snapshot a success is judged against is
taken when the submission goes out, and refill leaves a saved scalar alone
when the record's value encodes as the draft already does, so a typed 1 is
not rewritten as 1.000 under the cursor.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
DialogOptions, the ui/1 document, the view tree and the Qt Quick and TUI
backends take headNote, footerNote and closeButton on a dialog or a drawer.
dismissLabel labels the close control as well as a sheet's, so a drawer takes
it too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
The priority column of the worklist and the sample list now sizes to its
tag, the results table's evaluation column and the system-suitability row
no longer force the page wider than its window, and the stability summary
panel has a floor wide enough for its longest value.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
An action that writes a record of a module it cannot include has no way to
declare that effect, and the code that links both modules is refused a second
declaration. The spec adds an additive declaration unioned with the action's
own, refuses an unknown action or record in it, and never lets it remove an
effect.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
BRIDGE_ADD_EFFECTS adds effects to an action from code that links both the
action's module and the module that owns the record, which the action's own
module cannot include. The addition is unioned with the action's own
declaration, never removes an effect, and is refused on the first read when
its action or record is not registered. It expands to nothing under
MORPH_CLIENT_ONLY.

lims declares PostInvoice's write of Ledger_Entry in the app that composes
billing and the ledger, so an accountant watching the ledger hears a posting
made in the shared transaction.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
A record can change with no action behind it: an approval's scope moves at a
deadline. The spec has a model report the next such instant through a
registered read, and has the server, which owns an injectable clock, fan out
a whole-type change at that instant through the path an action's effects take
and then ask again. The model arms no timer and posts no work.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
A model registers an action that reports the next instant at which records it
serves change by time alone, with BRIDGE_REGISTER_CHANGES_AT. The server owns
the clock (ServerConfig::clock, with clockRecheck bounding each sleep, so a
test advances time without sleeping), fans out a whole-type change for those
records at that instant through the path an action's effects take, and asks
again. It also asks again after any fan-out that names one of the records.
The model arms no timer and posts no work.

lims reports its approval deadlines from billing and inventory. The approval
inbox screen test and the requisitions test now assert that the watcher is
told; the screen harness's simulated server opens a connection that takes
events, so the screen can be told at all.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
Bounds-checked access to the server's time facts, const where nothing is
moved, added effects taken by const reference, trailing commas, and a
NOLINT naming why the two new registration macros are macros.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
The reporter declarations are process-wide, and every server asked all of
them, so a server whose registry lacks a reporter's model left a model-strand
task reading a registry its owner may already be destroying (ThreadSanitizer
caught it in two unrelated suites).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
…e limit

The whole corpus in one case ran 65 s in the plain ladder and past the 120 s
test limit under ASan. Four cases, each comparing every fourth query, check
the same queries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
…ints

master measures include/morph/ui at 91.75% (15784 of 17204 arms) against a
92% floor set when the subsystem had 5562 arms; this batch leaves the figure
unchanged. Four src/ui/document.cpp hints had drifted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
Yaraslaut and others added 2 commits November 16, 2026 04:56
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
Both ladder jobs were shut down on their 16 GB hosted runners while linking
the ladder test binaries, which a build parallel to the core count links four
at a time. MORPH_LINK_JOBS (default 2, 0 for no limit) bounds the links and
leaves compiles at full parallelism.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1Nzo5wbYPDDynGBphgqj
@Yaraslaut
Yaraslaut merged commit dde92ec into master Nov 16, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment