From 1ba9c5aa77ea315b4dd87ae9aa149169e0948d95 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 9 Jun 2026 05:21:00 -0500 Subject: chore(todo): close theme-studio refactor Stage 5; mark 1-5 done --- todo.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'todo.org') diff --git a/todo.org b/todo.org index 6337c2e6..2b2c6239 100644 --- a/todo.org +++ b/todo.org @@ -180,6 +180,8 @@ Keep #seedtest, #selftest, the default-on-open check, the dupre-revised round-tr Examined 2026-06-09. generate.py is 1378 lines, ~1300 of them a single triple-quoted string holding the whole app (CSS + HTML + ~1000+ lines of JS). That string is the root of every refactor here: the app logic can't be unit-tested (only =colormath.js= is, because it is the one extracted module); backslash-doubling in the string caused real bugs this session (the multi-line export strip, the =#deltatest= regex); and there is no lint, highlight, or brace-check until Chrome runs it. The rest of the directory is healthy: =colormath.js= (pure, 100/96 tested) and =build-theme.el= (13 small functions) are the model. Run the whole set in NO-APPROVALS mode: TDD per stage (characterization hash tests before each behavior-preserving move; node unit tests as extraction makes logic importable), commit + push at each green stage. Tooling committed at c7518d6f before starting. Order: + +PROGRESS (2026-06-09): Stages 1-5 DONE + pushed (origin/main tip 89d079fe). The keystone extraction (app.js / styles.css) and all the dedup (dropdowns, table helpers, sort, clear-unlocked + effFg) are landed, with two new permanent characterization gates added along the way: =#locktest= and =#sorttest=. Remaining: Stage 6 (optional, lower priority — works today) and Stage 7 (the test-surface payoff — make app.js importable and node-unit-test the now-extractable logic; this is a distinct effort, best done fresh). *** 2026-06-09 Tue @ 05:01:11 -0500 Stage 1 — #locktest net + extracted styles.css/app.js Added the =#locktest= browser gate first (commit d04f44dd): it pins, across all three tiers, that mkLockCell disables a row's control (syntax swatch div via data-locked, UI select via .disabled) and that clear-unlocked wipes unlocked rows while skipping locked ones. Proved it goes red when a lock guard is removed. @@ -196,8 +198,8 @@ Deliberately NOT done: the syntax bold/italic buttons (2 buttons, BOLD/ITALIC di Verified behavior-preserving by diffing the runtime-rendered DOM (Stage 2 page vs Stage 3 page in headless Chrome): the only differences are inside the inline =