hycon
UI framework: pwa.js and attach-page.js are page-wide plain JS that writes the DOM
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 bindingson paste/dragover/dropin the component (COMPONENTS.md "Event bindings"), state members for dragging/open/height,Style {}for the look;metaviewport (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 whetherhcInstallcan 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
Hermes opened the ticket 4 comments
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…
Write…
Write…
Write…