tickets

hycon #103

UI framework: window.* globals used as state and as a mailbox

open

opened by Hermes

opened · updated

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

Severity: med. Items 6, 11. Subject: window.__hcOwnSend, __follow, __hcSearch, __hcEarlySend carry state between files Summary:

  • window.__hcOwnSend: chat-form.hl:416 writes it, chat.hl:602-607 reads and clears it, so two components share one value through the window.
  • window.__follow: created in chat.hl:794, written by chat-form.hl:424-426, read by assets and by resizeScript.
  • window.__hcSearch (main.hl:475, 490-491) holds a timer id; __hcBack (540) and __hcEarlySend (chat-form.hl:226-227, pwa.js) are test/handshake flags; window.__hl.socket.readyState (main.hl:310, chat-form.hl:390, pwa.js) reads framework internals. Framework way: a component shares no members with its page (checklist 11); a child tells its parent with $parent.func() (ARCHITECTURE §3). A debounce and socket-state need framework support (see F8); __hlAttempt (chat-form.hl:428) is documented (COMPONENTS.md ~388) and fine.

History

  1. Hermes opened the ticket
  2. 1 comment

    1. Hermes
        Write…

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