HS-plan: log cluster 27 landed (0c31dd27, worktree re-apply)

This commit is contained in:
2026-04-24 10:44:43 +00:00
parent 0c31dd2735
commit 4cc2e82091
2 changed files with 9 additions and 6 deletions

View File

@@ -103,7 +103,7 @@ Orchestrator cherry-picks worktree commits onto `architecture` one at a time; re
26. **[done (+3)] resize observer mock + `on resize`** — 3 tests. Add a minimal `ResizeObserver` mock to `hs-run-filtered.js`, plus parse/compile `on resize`. Expected: +3.
27. **[pending] intersection observer mock + `on intersection`** — 3 tests. Mock `IntersectionObserver`; compile `on intersection` with margin/threshold modifiers. Expected: +3.
27. **[done (+3)] intersection observer mock + `on intersection`** — 3 tests. Mock `IntersectionObserver`; compile `on intersection` with margin/threshold modifiers. Expected: +3.
28. **[pending] `ask`/`answer` + prompt/confirm mock** — `askAnswer` 4 tests. **Requires test-name-keyed mock**: first test wants `confirm → true`, second `confirm → false`, third `prompt → "Alice"`, fourth `prompt → null`. Keyed via `_current-test-name` in the runner. Expected: +4.
@@ -175,6 +175,9 @@ Many tests are `SKIP (untranslated)` because `tests/playwright/generate-sx-tests
(Reverse chronological — newest at top.)
### 2026-04-24 — cluster 27 intersection observer (worktree re-apply)
- **0c31dd27** — `HS: intersection observer mock + on intersection (+3 tests)`. Worktree agent `ad6e17cb…` produced the logical change but its commit's reformatted compiler/runtime bodies conflicted with cluster 26's landing of resize-observer state in `tests/hs-run-filtered.js` and `runtime.sx`; straight cherry-pick hit markers on `.sx` files that can't be Edit'd. Reapplied surgically via sx-tree: (a) parser `parse-on-feat` now collects `having margin X threshold Y` clauses between `from` and body, packaging them in `:having {"margin" M "threshold" T}`; (b) compiler `scan-on` threads a new `having-info` param and, when event-name is `"intersection"`, wraps `(hs-on target "intersection" fn)` with `(do on-call (hs-on-intersection-attach! target margin threshold))`; (c) runtime adds `hs-on-intersection-attach!` which constructs an `IntersectionObserver` with `{rootMargin, threshold}` opts and a callback that dispatches an `intersection` DOM event carrying `{intersecting, entry}` detail; (d) runner adds `HsIntersectionObserver` stub that fires the callback synchronously on `observe()` with `isIntersecting=true`. Suite hs-upstream-on: 33/70 → 36/70. Smoke 0-195 unchanged at 165.
### 2026-04-24 — cluster 26 resize observer (worktree agent cherry-pick)
- **304a52d2** (from worktree `worktree-agent-a8983e935d0d7a870` / `aea5f7d2`) — `HS: resize observer mock + on resize (+3 tests)`. `tests/hs-run-filtered.js`: `El.style` becomes a `Proxy` that fires a synthetic `resize` DOM event (detail carries `{width, height}` parsed from the current inline style) whenever `width`/`height` is written via direct property assignment OR `setProperty`. `ResizeObserver` no-op stub replaced by `HsResizeObserver` maintaining a per-element callback registry in `globalThis.__hsResizeRegistry`; added `ResizeObserverEntry` stub. `on resize` needs no parser/compiler work — `parse-compound-event-name` already accepts it and `hs-on` binds via `dom-listen`. Generator: new pattern translates `(page.)?evaluate(() => { document.(getElementById|querySelector)(...).style.PROP = 'VAL'; })` into `(host-set! (host-get TARGET "style") "PROP" "VAL")`. Suite hs-upstream-resize: 0/3 → 3/3. Smoke 0-195 unchanged at 165/195.