Repository navigation
SELD-R2 PR 3: the interaction runtime (rt-interaction.ts), the per-assignment interaction table and its host check - #237
Conversation
…ted-subset root (R1, R6, R8, R15) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019gAHotrCwxo86PAgtrhRUT
…reference with the R16 hook, the host check, and rt-interaction as a translated root with its corpus suite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019gAHotrCwxo86PAgtrhRUT
…ompiler core imports @dragon/layout for types only); one onChange and at most one R16 event per step, naming both (app, state) pairs; every trace group must reach an element Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019gAHotrCwxo86PAgtrhRUT
|
Generated by Claude Code |
|
Generated by Claude Code |
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated to a fixed point, then pnpm regen --only tw-sweep (macos-26). Base: 5f6b6b9 Run: https://github.com/compiled-run/dragoncss/actions/runs/37907827785
…8058 (SetFocused) as a class A reference Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019gAHotrCwxo86PAgtrhRUT
…on-runtime-evd0n6: GitHub reported the PR conflicting; no source conflicts, generated files regenerate on CI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019gAHotrCwxo86PAgtrhRUT
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated to a fixed point, then pnpm regen --only tw-sweep (macos-26). Base: 4489cf5 Run: https://github.com/compiled-run/dragoncss/actions/runs/37916744596
…on-runtime-evd0n6: GitHub reported the PR conflicting; no source conflicts, generated files regenerate on CI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019gAHotrCwxo86PAgtrhRUT
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated to a fixed point, then pnpm regen --only tw-sweep (macos-26). Base: fe49574 Run: https://github.com/compiled-run/dragoncss/actions/runs/37928077369
Requested by Jack · project thread
SELD-R2 PR 3, the interaction runtime (binding spec
docs/goals/milestone-2-proof/notes/T064-seld-r2-spec.mdR6, R7, R8, R12, R15, R16). Based onmaster, not stacked. PR 1 (#136, the compiler part) is on master; the runtime parts never landed.Before:
:hover,:active,:focusand:focus-visiblecompile to per-assignment interaction states, but nothing can select a state on a device, so every interaction rule is refused on iOS and Android.After: the runtime that selects them exists as one translated implementation (TypeScript reference, Swift and Kotlin from the translator), with the per-assignment interaction table and a host check proving every state lands on its per-case program. No support claim and no profile row change: the native refusal stays until PR 4 adds the UIKit/Android glue and the device-traces lane. Nothing on device runs it yet.
What changed
packages/layout/src/rt-interaction.ts(new, translated root, R12): the R6 event rules over compiled tables. Pointer move/exit, mouse press/release (focus at press), touch press/release/cancel (a tap never hovers, R1; focus at release; a control that consumes the touch changes no focus, P7), keys (a non-meta key turns focus-visible on, P9; keyboard focus for P6e), the Android hover-exit deferral (R15), app-setter remaps and layout re-hits (P11), andCSS.forcePseudoState.interactionCombo/interactionStateare the R7 index arithmetic. Eleven plants, all inInteractionFaults.packages/dragon/src/lower/interaction-program.ts(new, R7): per app assignment, the tables from its partition plus oneStateDeltaper interaction state over the state program's base. The states are a second level, never more assignments in the 64-cap table. It imports@dragon/layoutfor types only, asua.testrequires of the compiler core.packages/parity/src/interaction-runtime.ts(new):InteractionRuntime, the TypeScript reference the generated runtime will follow. It callsonChangeafter each committed change andonInteractionChange(fromApp, from, toApp, to)at most once per step, when (app, state) changed (R16, ANIM-b2's style-change hook).internal.ts: exports, plusinteractionLevelInput(per element:touchConsumesTapforinput[type=range],keyboardInputfor text fields and textarea, R8).packages/parity/src/interaction-cases.ts(new): the host check. For every interaction fixture, direction and backend:InteractionRuntimewith rt-hit on the live program;focusTargetOf, not from rt-interaction.ts;generate.ts,corpus.ts, newcorpus-interaction.ts,harness.ts): rt-interaction is an engine root, and a newinteractioncorpus suite followsanimator. It has 21 lines and 732 steps over three synthetic table sets: hand scripts per rule plus seeded walks. The suite is built in code, so it has no committed input.native-swift/native-kotlintake the suite list from the corpus.parity/src/targets.ts: onecorpusSuitesline declaringp1/interaction.Outside the spec
packages/translate/test/p1-floor.json:interactionappended toorder, with count 21 (append-only floor).packages/translate/test/translate.test.ts: the suite-list comment only.Plants
tapSetsHover,hoverWithoutAncestors,forcedSetsAncestors,focusOnNonFocusable,activeWithoutAncestors,activeStaysAfterReleaseandhoverExitOnPressare each caught.packages/layout/test/rt-interaction.test.tscatches all eleven on synthetic tables. That includesfocusVisibleOnPointer,focusAtTouchPress,rangeTapFocusesandhoverNotRecomputedAfterLayout, which no compiled fixture can reach before FORM-a: no focusable element or range compiles yet.Left for PR 4
UIKit and Android glue, the generated native machine's second-level table (the
emit/runtime/state.tshunk waits for #203, #214, #196 and #231, which all edit that file), the Chrome trace capture and report (R2, R14), the device-traces lane, profile rows, and liftingnativeInteractionRefusals.What passed
All on the final head
4a41f7ecc, which is the regen commit on top of the master mergefe4957438(#232, #233):checksworkflow green.pnpm ci:test-files --once(run 37940112467) PASSED. Results:pnpm ci:regenonly (run 37928077369). Nothing was regenerated locally.pnpm typecheck,pnpm layout:subset, and the platform-free testsrt-interaction,ua, dragonregistry-claimsandinteraction.(fromApp, from, toApp, to).The Low notes are covered under Plants and Outside the spec.
ua.test: the runtime moved out of the compiler core;chrome-ports: theelement.ccrange was registered indocs/ports.json.🤖 Generated with Claude Code
https://claude.ai/code/session_019gAHotrCwxo86PAgtrhRUT
Generated by Claude Code