From d76ee0595699a8ee39c44697458b31a146da01b0 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sun, 17 May 2026 15:02:21 +0200 Subject: [PATCH] =?UTF-8?q?docs(files):=20errata=20=E2=80=94=20script=20ta?= =?UTF-8?q?g=20lives=20in=20overlay=5Fdetail.html,=20not=20base.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit files-overlay.js is loaded from overlay_detail.html:285 (with defer), not base.html — the JS activates only when .files-manager exists, which is only on overlay detail for files-type overlays. Loading from base.html would pull it onto every page. The plan's first draft had this wrong in four places (step 1, step 4, step 10, critical files table). Following the plan verbatim would have moved the script tag to the wrong template — exactly the failure mode that feedback_validate_before_implementing memory warns about. Added an Errata section at the bottom of the plan documenting this. Also clarified that all new module script tags should use defer to match the existing pattern (the modules query the DOM at load and need the body parsed first). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../plans/2026-05-17-files-overlay-rewrite.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/superpowers/plans/2026-05-17-files-overlay-rewrite.md b/docs/superpowers/plans/2026-05-17-files-overlay-rewrite.md index fb7c02e..324d8fc 100644 --- a/docs/superpowers/plans/2026-05-17-files-overlay-rewrite.md +++ b/docs/superpowers/plans/2026-05-17-files-overlay-rewrite.md @@ -45,7 +45,7 @@ Direct-bind escape hatches (places we keep direct binding deliberately): Create the new directory. Move helpers (lines ~40-170 of the current file: `postJson`, `postForm`, `scheduleRefresh`, `parentOf`, `joinPath`, byte-count utility, manager-element detection, CSRF read). Add the file-row click delegation that currently lives at line 1054 — same selector match, but instead of switch-casing into local handlers, dispatch through a registry `window.__filesOverlay.handleAction(action, path, actionEl)` that feature modules register handlers into. Old `files-overlay.js` still has its own handlers for now — `core.js` dispatch is unused until subsequent steps wire features into it. -base.html: add `