From 19e148d930758cd3c07daacd5aeecb92631be661 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 23 Apr 2026 21:29:01 +0000 Subject: [PATCH] =?UTF-8?q?HS-plan:=20log=20element=E2=86=92HTML=20via=20o?= =?UTF-8?q?uterHTML=20done=20+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plans/hs-conformance-to-100.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plans/hs-conformance-to-100.md b/plans/hs-conformance-to-100.md index 24add5fe..407ae6a2 100644 --- a/plans/hs-conformance-to-100.md +++ b/plans/hs-conformance-to-100.md @@ -36,7 +36,7 @@ Each cluster below is one commit. Order is rough — a loop agent may skip ahead 1. **[done (+4)] fetch JSON unwrap** — `hs-upstream-fetch` 4 tests (`can do a simple fetch w/ json` + 3 variants) got `{:__host_handle N}`. Root: `hs-fetch` in `runtime.sx` returns raw host Response object instead of parsing JSON body. Fix: when format is `"json"`, unwrap via `host-get "_json"` and `json-parse`. Expected: +4. -2. **[in-progress] element → HTML via outerHTML** — `asExpression / converts an element into HTML` (1 test) + unlocks response fetches. Mock DOM `El` class in `tests/hs-run-filtered.js` has no `outerHTML` getter. Add a getter computed from `tagName` + `attributes` + `children` (recurse). Expected: +1 direct, + knock-on in fetch. +2. **[done (+1)] element → HTML via outerHTML** — `asExpression / converts an element into HTML` (1 test) + unlocks response fetches. Mock DOM `El` class in `tests/hs-run-filtered.js` has no `outerHTML` getter. Add a getter computed from `tagName` + `attributes` + `children` (recurse). Expected: +1 direct, + knock-on in fetch. 3. **[pending] Values dict insertion order** — `asExpression / Values | FormEncoded` + `| JSONString` (2 tests) — form fields come out `lastName, phone, firstName, areaCode`. Root: `hs-values-absorb` in `runtime.sx` uses `dict-set!` but keys iterate in non-insertion order. Investigate `hs-gather-form-nodes` walk — the recursive `kids` traversal silently fails when `children` is a JS Array (not sx-list), so nested inputs arrive via a different path. Fix: either coerce children to sx-list at the gather boundary OR rewrite gather to explicitly use sx-level iteration helpers. Expected: +2. @@ -158,6 +158,9 @@ Many tests are `SKIP (untranslated)` because `tests/playwright/generate-sx-tests (Reverse chronological — newest at top.) +### 2026-04-23 — cluster 2 element→HTML via outerHTML +- **e195b5bd** — `HS: element → HTML via outerHTML (+1 test)`. Added an `outerHTML` getter on the mock `El` class in `tests/hs-run-filtered.js`. Merges `.id`/`.className` (host-set! targets) with `.attributes`, falls back to `innerText`/`textContent`. Suite hs-upstream-expressions/asExpression: 27/42 → 28/42. Smoke 0-195: 162/195 unchanged. + ### 2026-04-23 — cluster 1 fetch JSON unwrap - **39a597e9** — `HS: fetch JSON unwrap (+4 tests)`. Added `hs-host-to-sx` helper in `runtime.sx` that converts raw host-handle JS objects/arrays to proper SX dicts/lists via Object.keys/Array walks. `hs-fetch` now calls it on the result when format is `"json"`. Detects host-handle dicts by checking `(host-get v "_type") == "dict"` — genuine SX dicts have the marker, host handles don't. Suite hs-upstream-fetch: 11/23 → 15/23. Smoke 0-195: 162/195 unchanged.