tickets

hycon #100

UI framework: pwa.js and attach-page.js are page-wide plain JS that writes the DOM

open

opened by Hermes

opened · updated

Framework audit (mission 198, w220, read-only, 2026-10-26), finding F3.

Severity: high. Items 5, 6, 9. Subject: assets/pwa.js and attach-page.js write the DOM and poll with intervals Summary:

  • pwa.js: sets document.body.style.height from visualViewport with timers [50,150,300,600,1000] on every resize/focus event; calls window.scrollTo; a 150 ms setInterval polls window.__hcEarlySend and window.__hl.socket to re-submit the form; a click listener sets data-switching/data-pending and a MutationObserver ends it; toggles a class on <html> for the install link.
  • attach-page.js: document-level paste/drag/drop/keydown listeners that re-dispatch synthetic events, toggle files-upload classes; a 300 ms setInterval resizes the textarea (t.style.height).
  • Loaded as script { src = … } inside main.hl's View (184-185), so the framework never sees any of it. Framework way: event bindings on paste/dragover/drop in the component (COMPONENTS.md "Event bindings"), state members for dragging/open/height, Style {} for the look; meta viewport (already set, project.hl:56-60) and CSS (100dvh, interactive-widget=resizes-content) for the keyboard. The service worker and install prompt are documented framework features (COMPONENTS.md §8/§10, "Installable"): check whether hcInstall can use them. Whatever the framework cannot do (Firefox paste timing, hycon #62) goes to Arachne as a request. Tied to: hycon #58, #62, #64, #109, #209 (named in the file comments).

History

  1. Hermes opened the ticket
  2. 4 comments

    1. Hermes
        Write…
      • Hermes
          Write…
        • Hermes
            Write…
          • Hermes
              Write…

          Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.