From bd64237625e99dcc5b9dbcff9382e2f1ea9d03f2 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc Date: Mon, 7 Sep 2026 08:48:39 +0200 Subject: [PATCH] Draft MEDUI-DEC-008: optional interaction and presentation profiles (Proposed) Distils MedUI #16. Both runtimes have grown divergent input, update and editing paths on top of a layout-only compiled screen (MEDUI-DEC-003). Records the direction - an optional versioned logical interaction profile with separately declared presentation profiles - with every behaviour marked a proposal for review, plus the questions a maintainer must settle. No allocated identifiers, no schema change; Status is Proposed. --- .../MEDUI-DEC-008-interaction-profiles.md | 65 +++++++++++++++++++ decisions/README.md | 1 + 2 files changed, 66 insertions(+) create mode 100644 decisions/MEDUI-DEC-008-interaction-profiles.md diff --git a/decisions/MEDUI-DEC-008-interaction-profiles.md b/decisions/MEDUI-DEC-008-interaction-profiles.md new file mode 100644 index 0000000..fc48fd7 --- /dev/null +++ b/decisions/MEDUI-DEC-008-interaction-profiles.md @@ -0,0 +1,65 @@ +# MEDUI-DEC-008: Optional interaction, data-binding and presentation profiles + +Status: Proposed + +Raised by [MedUI #16](https://github.com/Compliatory/MedUI/issues/16) from a comparison of the +MduX and TrustSC runtimes for [MduX #312](https://github.com/ambroise-leclerc/MduX/issues/312). +This record states a direction and open questions; it does not change an accepted contract, and +the behaviours below are proposals for review, not shared requirements. + +## Problem + +The compiled screen is locale-free layout data with no runtime behaviour (`MEDUI-DEC-003`). The +two implementations have each grown an input and update path anyway — hit testing, press/release +activation, focus and text editing, an event loop — and they differ: reverse-paint all-node +traversal versus a target list; caller-bound rendering values versus a bounded event batch and +character-indexed editing. The component dictionary and the closed action names do not pin any of +this, so "the same screen" behaves differently under interaction. + +## Direction + +Define an **optional, versioned logical interaction profile**, with presentation profiles +declared separately. A consumer that does not claim the profile keeps today's contract unchanged. +Proposed content, all open for review: + +1. **Coordinates and hit testing.** Normalize platform coordinates once into authored pixels; + specify clipping, scaling and integer rounding. Hit testing uses half-open rectangles, reverse + paint order and all-node occlusion. `Button` source and `CriticalButton` closed action are + distinct outputs, never executable callbacks. +2. **Press/release.** Press arms one control; release activates only that same eligible control + under the release coordinate. Focus loss, cancellation, removal and overflow clear armed + state. +3. **Event batch and update boundary.** One bounded ordered event batch with a host-supplied + capacity; one normalize-enqueue / consume-in-order / update / bind-one-snapshot / render / + capture boundary. Saturation and invalid input have observable outcomes; proposed overflow + policy is drop-newest with a saturating counter and cancellation of any pending activation. +4. **Editing.** Address Unicode scalar boundaries with a bounded accepted glyph set and length; + reject invalid encoding, disallowed glyphs and oversize edits with no partial mutation. + Establish repeat, paste, navigation and focus policy before scenario tooling depends on them. +5. **Dynamic inputs.** Normalize by screen and node plus declared source mapping, types, bounds + and snapshot identity. Clock input is injected for replay. State ordering, number formatting, + trace ordering and viewport rows are specified independently of any native storage. +6. **Presentation.** Widget appearance — face and label placement, pressed and focused states, + tint, caret — lives in declared presentation profiles. Equal source does not imply equal + pixels; an exact-pixel corpus case identifies profile, theme, fonts, assets, surface and + backend. + +## Open questions for the maintainer + +- Does an interaction profile belong in MedUI at all, or does the contract stay layout-only and + point at a separate runtime contract? +- Which of the proposed defaults are actually shared, versus a starting point for negotiation + between the two implementations? +- What is the smallest first profile — hit testing and press/release only — that both + implementations could pass without changing observable behaviour? +- How do capability and manifest schemas carry a profile claim, and under which minor? + +## Rollout + +`MEDUI-DEC-003` remains authoritative. This record feeds, and is fed by, +[MEDUI-DEC-007](MEDUI-DEC-007-rendered-check-profiles.md). Language-diagnostic and safety +ambiguities stay with MedUI #2, #3, #4 and #8. Adoption is a minor release with a candidate +corpus — edge coordinates, overlapping controls and non-controls, press/release cancellation, +overflow during activation, critical versus ordinary actions, Unicode edit limits, a consistent +update/capture order and injected time — passed by every implementation claiming the profile. +Nothing here infers a clinical workflow or hazard classification from an example screen. diff --git a/decisions/README.md b/decisions/README.md index 2c920ff..9fd8384 100644 --- a/decisions/README.md +++ b/decisions/README.md @@ -7,3 +7,4 @@ - [MEDUI-DEC-005](MEDUI-DEC-005-diagnostics-and-conformance.md) - [MEDUI-DEC-006](MEDUI-DEC-006-closed-named-values.md) - [MEDUI-DEC-007](MEDUI-DEC-007-rendered-check-profiles.md) +- [MEDUI-DEC-008](MEDUI-DEC-008-interaction-profiles.md)