diff --git a/plans/hs-conformance-to-100.md b/plans/hs-conformance-to-100.md index cf6a3a0d..622cc391 100644 --- a/plans/hs-conformance-to-100.md +++ b/plans/hs-conformance-to-100.md @@ -50,7 +50,7 @@ Each cluster below is one commit. Order is rough — a loop agent may skip ahead 8. **[blocked: mock selection state needs setup the JS test does via createRange+setStart+setEnd+addRange; attempted generator pattern + window.getSelection()/createRange mock but result still empty — host-get textContent doesn't propagate through range.setStart stored arg. Would need deeper mock of DOM text nodes with propagation.] `select returns selected text`** (1 test, `hs-upstream-select`). Likely `select` command needs to return `window.getSelection().toString()` equivalent. Add host-call to selection API in mock. Expected: +1. -9. **[in-progress] `wait on event` basics** — `wait / can wait on event`, `on another element`, `waiting ... sets it to the event`, `destructure properties in a wait` (4 tests). Event-waiter suspension issue. Expected: +3-4. +9. **[done (+4)] `wait on event` basics** — `wait / can wait on event`, `on another element`, `waiting ... sets it to the event`, `destructure properties in a wait` (4 tests). Event-waiter suspension issue. Expected: +3-4. 10. **[pending] `swap` variable ↔ property** — `swap / can swap a variable with a property` (1 test). Swap command doesn't handle mixed var/prop targets. Expected: +1. @@ -158,6 +158,9 @@ Many tests are `SKIP (untranslated)` because `tests/playwright/generate-sx-tests (Reverse chronological — newest at top.) +### 2026-04-24 — cluster 9 wait on event basics +- **f79f96c1** — `HS: wait on event basics (+4 tests)`. Five parts: (a) `tests/hs-run-filtered.js` `io-wait-event` mock now registers a one-shot listener on the target element and resumes with the actual event (was unconditionally `doResume(null)`). (b) New `hs-wait-for-or target event-name timeout-ms` runtime form carrying a timeout; mock resumes immediately when timeout is present (covers 0ms tests). (c) `parser.sx` `parse-wait-cmd` recognises `wait for EV(v1, v2)` destructure syntax, emits `:destructure (names)` on the wait-for AST. (d) `compiler.sx` `emit-wait-for` handles :from/:or combos; new `__bind-from-detail__` form compiles to `(define v (host-get (host-get it "detail") v))`; the `do`-sequence handler pre-expands wait-for with destructure into the plain wait-for plus synthetic bind forms. (e) generator extracts `detail: ...` from CustomEvent option blocks. Suite `hs-upstream-wait`: 3/7 → 7/7. Smoke 0-195: 162/195 unchanged. + ### 2026-04-23 — cluster 16 send can reference sender - **ed8d71c9** — `HS: send can reference sender (+1 test)`. Three parts: (a) `emit-send` builds `{:sender me}` detail instead of nil for `send NAME target` and `send NAME`. (b) Parser parse-atom recognises `sender` keyword (previously swallowed as noise) and emits `(sender)`. (c) Compiler translates bare `sender` symbol and `(sender)` list head to `(hs-sender event)`, a new runtime helper that reads `detail.sender`. Suite hs-upstream-send: 7/8 → 8/8. Smoke 0-195: 162/195 unchanged.