Commit Graph

73 Commits

Author SHA1 Message Date
eb587bb3d0 plan: progress log — session 3 continued, 100/cat scoreboard 114/300 2026-04-24 09:57:17 +00:00
9da43877e8 HS-plan: document parallel-worktree protocol 2026-04-24 09:44:53 +00:00
3b5f16088b HS-plan: log url interpolation done +1 (cb37259d) 2026-04-24 09:42:33 +00:00
cb37259d10 HS-gen: string-aware line-comment stripping (+1 test)
process_hs_val stripped `//…` line comments with a naïve regex,
which devoured `https://yyy.xxxxxx.com/…` inside a backtick template
— the 'properly interpolates values 2' fixture was landing with
the HS source truncated at `https:`.

New helper _strip_hs_line_comments walks char-by-char and only
strips `//` / leading-whitespace `--` when not inside `'…'`, `"…"`,
or backticks; respects `\\`-escapes inside strings.

Suite hs-upstream-core/regressions: 11/16 → 12/16.
Smoke 0-195: 163/195 → 164/195.
2026-04-24 09:42:19 +00:00
ade87c0744 HS-plan: log closest parent done +1 (0d38a75b) 2026-04-24 09:33:45 +00:00
0d38a75b21 HS: closest parent <sel> traversal (+1 test)
parse-trav recognises `parent` as an ident modifier after the
`closest` keyword — consumes it and re-invokes with kind
`closest-parent`, producing AST `(closest-parent "div" (me))` instead
of the generic trailing-ident-as-unit shape
`(string-postfix (closest "*" (me)) "parent")`.

Compiler translates `(closest-parent sel target)` to
`(dom-closest (host-get target "parentElement") sel)` so `me` is
skipped and only strict ancestors match. `closest-parent` also
joined the `put X into <trav>` inner-html shortcut alongside
next/previous/closest.

Suite hs-upstream-core/regressions: 10/16 → 11/16.
Smoke 0-195: 162/195 → 163/195.
2026-04-24 09:33:32 +00:00
c22f553146 plan: update progress log with session 3 summary, Math 39.6% wide 36.4% 2026-04-24 09:08:15 +00:00
d74344ffbd HS-plan: scoreboard to +34, bucket E design-done
Cherry-picked select (d862efe8) + reflecting loop-agent
completed clusters (unless 14, transition 15, throw 18,
possessive 21) and blocked (tell 17, window-fallback 22).
All 5 bucket E design docs now tracked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:17:11 +00:00
d862efe811 HS: select returns selected text (+1 test)
Runtime gains hs-get-selection: prefers window.__test_selection stash,
falls back to real getSelection().toString(). Compiler rewrites
`(ref "selection")` to `(hs-get-selection)`. Generator detects the
createRange + setStart/setEnd + addRange block and emits a single
host-set! on __test_selection with the text slice; sidesteps the need
for a fully propagating DOM range/text-node mock.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:13:28 +00:00
c4da069815 HS-plan: log window global fn fallback blocked
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:09:44 +00:00
87cafaaa3f HS-design: E37 Tokenizer-as-API
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:08:02 +00:00
3587443742 HS-design: E36 WebSocket + socket + RPC proxy
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:08:02 +00:00
6b7559fcaf HS-design: E40 real fetch + before-fetch + non-2xx
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:08:02 +00:00
67d4b9dae5 HS-design: E38 SourceInfo API
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:08:02 +00:00
df8913e9a1 HS-design: E39 WebWorker plugin
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:08:02 +00:00
4ee748bf42 HS-plan: link bucket E design docs + fix E36 shape
All five subsystems now have design docs pending review on per-subsystem
worktree branches. Correcting E36: upstream uses `socket NAME URL ... end`
with implicit `.rpc` Proxy, not `with proxy { send, receive }`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:07:31 +00:00
320e948224 HS-plan: claim window global fn fallback
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:02:05 +00:00
1b4b7effbd HS-plan: log possessive done +1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:01:53 +00:00
a15c1d2cfb HS-plan: claim possessive
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:55:06 +00:00
3c4d68575c HS-plan: log throw respond done +2
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:54:50 +00:00
00bb21ca13 HS-plan: claim throw respond
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:50:58 +00:00
a82050e819 HS-plan: log tell semantics blocked
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:50:21 +00:00
c532dd57f1 HS-plan: claim tell semantics
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:45:15 +00:00
bb64e42570 HS-plan: log transition done +2 partial
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:45:03 +00:00
e155c21798 HS-plan: add scoreboard + require loop agent to maintain it
plans/hs-conformance-scoreboard.md is the at-a-glance ledger
(baseline 1213, merged 1240, +2 pending on worktree). Added rule 11
to hs-conformance-to-100.md so the loop agent bumps it per commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:44:20 +00:00
860549c1db HS-plan: claim transition
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:35:59 +00:00
0e22779fe0 HS-plan: log toggle multi-class done +2 partial
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:35:48 +00:00
9502d56a38 HS-plan: claim toggle multi-class
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:30:43 +00:00
0474514e59 HS-plan: log show multi-element done +2
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:30:33 +00:00
1774a900aa HS-plan: claim show multi-element
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:26:26 +00:00
dc1aaac35a HS-plan: log hide strategy done +3 partial
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:26:16 +00:00
20a1a81d15 HS-plan: claim hide strategy
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:16:31 +00:00
ae999e3362 HS-plan: log swap variable prop done +1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:16:21 +00:00
bf78f2ecc8 HS-plan: claim swap variable prop
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:06:28 +00:00
fda8846376 HS-plan: log wait on event basics done +4
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:06:18 +00:00
e8a89a6ce2 HS-plan: claim wait on event basics
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 05:48:17 +00:00
fe6cadd268 plan: update progress log with final Math scoreboard 2026-04-23 23:42:08 +00:00
64e53518ae plan: js-on-sx progress log update 2026-04-23 23:35:01 +00:00
1459f7a637 js-on-sx: callable Number/String/Boolean/Array + Array.sort
Builtin constructors now have :__callable__ slot. js-call-plain
and js-function? detect dicts with __callable__ and dispatch
through it. Number('42')===42, String(true)==='true', Boolean(0)
===false, Array(3) builds length-3 list.

Array.prototype.sort(comparator?): bubble sort via js-list-sort-
outer!/-inner!. Default lex order, custom comparator supported.

Wide scoreboard committed: 259/5354 (4.8%) from earlier runtime.

438/440 unit (+11), 148/148 slice unchanged.
2026-04-23 22:53:13 +00:00
067c0ab34a HS-plan: log send can reference sender done +1 2026-04-23 22:37:36 +00:00
15c310cdc1 js-on-sx: object + array destructuring
Parser: jp-parse-vardecl handles {a, b} obj pattern and [a, , c]
arr pattern (with hole support) in addition to plain idents.
Emits (js-vardecl-obj names rhs) and (js-vardecl-arr names rhs).

Transpile: js-vardecl-forms dispatches on tag. Destructures emit
(define __destruct__ rhs) then (define name (js-get-prop __destruct__
key-or-index)) for each pattern element. Array holes (nil) are skipped.

418/420 unit (+4), 148/148 slice unchanged.
2026-04-23 22:32:24 +00:00
dd6375af18 HS-plan: claim send can reference sender 2026-04-23 22:29:57 +00:00
8268010a0a HS-plan: mark unless modifier blocked 2026-04-23 22:29:48 +00:00
ccf59a9882 HS-plan: claim unless modifier 2026-04-23 22:19:57 +00:00
5e682b01c6 HS-plan: mark select returns selected text blocked 2026-04-23 22:19:48 +00:00
41d0c65874 HS-plan: claim select returns selected text 2026-04-23 22:11:22 +00:00
216c3c5e9d HS-plan: log put hyperscript reprocessing partial +1 2026-04-23 22:11:02 +00:00
4800246b23 js-on-sx: spread ... in array literals and call args
Parser: jp-array-loop and jp-call-args-loop detect punct "..."
and emit (js-spread inner).

Transpile: when any element is spread, build array/args via
js-array-spread-build with (list "js-value" v) and (list
"js-spread" xs) tags.

Runtime: js-array-spread-build walks items, appending values or
splicing spreads via js-iterable-to-list (handles list/string/dict).

Works in arrays, call args, variadic fns (Math.max(...arr)),
and string spread ([...'abc']).

414/416 unit (+5), 148/148 slice unchanged.
2026-04-23 22:10:15 +00:00
6fb65464ed HS-plan: claim put hyperscript reprocessing 2026-04-23 21:53:20 +00:00
5fe1c2c7d5 HS-plan: log string template done +2 2026-04-23 21:53:12 +00:00