11# Self-Drawn Platform Host Architecture
22
3- Status: H0 complete; H1 atomic frame orchestration and presentation lifecycle
4- in progress. Portable input/reducer routing and real desktop OS shells are not
5- implemented yet.
3+ Status: H0 complete; H1 atomic frames, presentation lifecycle, and portable
4+ input/reducer routing implemented. The real Graphics raw-surface presenter and
5+ desktop OS shells are not implemented yet.
66
77Updated: 2026-08-02
88
@@ -44,15 +44,15 @@ The repository currently contains three distinct layers:
4444 system-service records; atomic revision transactions; a recording host; and
4545 executable dependency/source firewalls.
4646
47- The first H1 layer now connects committed Native IR, layout, scene, hit-region,
48- and accessibility state to the new host contract. It also owns transactional
49- scene preparation/publication plus resize, scale, damage, occlusion, redraw ,
50- delayed acknowledgement, and surface-loss replay. Portable hit/focus/action
51- routing is the next H1 slice . Production H2-H4 hosts must then attach Graphics
52- to real top-level surfaces and return OS services without constructing content
53- controls. The old control backends are frozen until this replacement passes
54- its gates. They are migration inputs, not the target architecture and not a
55- base for new TSX work.
47+ The shared H1 layer connects committed Native IR, layout, scene, hit-region,
48+ interaction, and accessibility state to the new host contract. It owns
49+ transactional scene preparation/publication; resize, scale, damage, occlusion,
50+ redraw, delayed acknowledgement, and surface-loss replay; and stable-id raw
51+ pointer, keyboard, focus, wheel, action, and reducer routing . Production H2-H4
52+ hosts must next attach Graphics to real top-level surfaces and return OS
53+ services without constructing content controls. The old control backends are
54+ frozen until this replacement passes its gates. They are migration inputs, not
55+ the target architecture and not a base for new TSX work.
5656
5757## Target Pipeline
5858
@@ -207,18 +207,21 @@ tests/platform_host_firewall.rs
207207src/platform_runtime/
208208|- frame.rs committed Native IR/layout/scene/a11y snapshot
209209|- runtime.rs atomic candidate preparation and host commit
210- |- events.rs resize, scale, occlusion, redraw, and ack lifecycle
210+ |- events.rs lifecycle plus ordered input/reducer dispatch
211+ |- interaction_tree.rs stable path index, hit testing, and focus order
212+ |- interaction.rs portable state, actions, changes, and event context
213+ |- input.rs pointer capture, hover, press, and cancellation
214+ |- keyboard_input.rs keyboard activation, Tab focus, and wheel routing
211215|- presenter.rs raw-surface prepare/publish contract and recorder
212216|- reference_presenter.rs
213217| transactional software Graphics evidence
214218|- accessibility.rs stable layout-path semantic projection
215- `- tests.rs atomicity, no-op , recovery, and identity gates
219+ `- tests.rs atomicity, input, reducer , recovery, and identity gates
216220
217221tests/platform_runtime_firewall.rs
218222examples/self_drawn_calculator.rs
219223
220224Planned next:
221- src/platform_runtime/interaction.rs
222225src/platform_host/macos/
223226src/platform_host/windows/
224227src/platform_host/linux/
@@ -325,7 +328,8 @@ Evidence:
325328
326329### H1 - Shared self-drawn window runtime
327330
328- Status: in progress; atomic frame and presentation-lifecycle slice landed.
331+ Status: in progress; atomic frame, presentation lifecycle, and portable
332+ input/reducer slices landed. The raw-surface presenter remains.
329333
330334Deliverables:
331335
@@ -347,16 +351,22 @@ Landed evidence:
347351 changes commit accessibility without presenting identical pixels
348352- resize, fractional scale, damage, occlusion, redraw, delayed acknowledgements,
349353 dropped frames, and surface loss replay the retained scene deterministically
350- - 14 focused runtime/software tests and three recursive feature/source
354+ - raw pointer, keyboard, Tab-focus, hover, press, cancellation, and wheel input
355+ route through committed hit regions and stable ` PlatformElementId ` paths;
356+ ordered action batches retain frame revision, event sequence, bubbling
357+ target, input context, and static action payload
358+ - reducer errors restore the staged interaction state and sequence before the
359+ event is exposed as successful; successful frame reconciliation preserves
360+ focused stable ids, while rejected frames do not touch them
361+ - 20 focused runtime/software tests and three recursive feature/source
351362 firewall tests pass without any legacy renderer or OS toolkit dependency
352- - ` self_drawn_calculator ` commits the existing 410x620 shared Native IR and
353- reproduces layout fingerprint ` 16529597026056060935 ` , scene fingerprint
354- ` 2100550662756266801 ` , and deterministic RGBA pixels
363+ - ` self_drawn_calculator ` reproduces layout fingerprint
364+ ` 16529597026056060935 ` , scene fingerprint ` 2100550662756266801 ` , and
365+ deterministic RGBA pixels, then routes eight fake-host events through four
366+ reducers and reaches display value ` 10 `
355367
356368Remaining before H1 is complete:
357369
358- - route raw host input through portable hit testing, focus, interaction state,
359- action selection, and the application reducer without a legacy widget plan
360370- implement the Graphics raw-surface presenter used by H2-H4; the landed
361371 presenter contract and software implementation deliberately expose no raw
362372 handle to components or common host records
@@ -505,8 +515,8 @@ or dependency-boundary evidence.
505515
506516## First Reviewable Commit Sequence
507517
508- 1 . Finish H1 portable hit/focus/reducer routing and bind its presenter contract
509- to the Graphics raw-surface edge .
518+ 1 . Finish the H1 Graphics raw-surface presenter edge using the landed portable
519+ hit/focus/reducer routing .
5105202 . Present the rectangle-only shared calculator through the Windows host.
5115213 . Present the same rectangle-only calculator through the macOS host.
5125224 . Present it through Wayland, then add the separately gated X11 fallback.
0 commit comments