#406 (split app.js → tabs/flow/common) closed; the migration is done — the 'moved to ./flow.js' / 'pre-step-2 this wiring lived in the broker-terminal IIFE' commentary is git-history, not present-state docs. #408 (split flow messages from main sse) also closed; the 'will give /index.html its own stream' line was forward-looking design that didn't ship that way. Comments tightened to describe what the code does today; the section headers, behaviour notes, and reconnect-rationale all stay intact.
This commit is contained in:
parent
266b8d243d
commit
3c2fffabdf
1 changed files with 8 additions and 16 deletions
|
|
@ -1210,9 +1210,7 @@ window.marked = marked;
|
|||
function renderQuestions() {
|
||||
const root = $('questions-section');
|
||||
// #questions-section only lives on /index.html (Y3R C4LL tab);
|
||||
// no-op when missing (#406 step 3 — only /index.html loads
|
||||
// tabs.js, but kept as belt-and-suspenders for any future page
|
||||
// adding it without that section). `question_added` /
|
||||
// no-op when the section is missing. `question_added` /
|
||||
// `question_resolved` SSE events route through here.
|
||||
if (!root) return;
|
||||
root.innerHTML = '';
|
||||
|
|
@ -1423,8 +1421,6 @@ window.marked = marked;
|
|||
});
|
||||
}, 1000);
|
||||
|
||||
// Operator-inbox derived store moved to ./flow.js (#406 step 2).
|
||||
|
||||
const APPROVAL_TAB_KEY = 'hyperhive:approvals:tab';
|
||||
// Derived approval state — cold-loaded from /api/state, then mutated
|
||||
// live by `approval_added` / `approval_resolved` dashboard events.
|
||||
|
|
@ -3166,13 +3162,10 @@ window.marked = marked;
|
|||
NOTIF.bind();
|
||||
Panel.bind();
|
||||
|
||||
// ─── live updates: dashboard event stream (#406 step 3) ────────────────
|
||||
// ─── live updates: dashboard event stream ──────────────────────────────
|
||||
// The dashboard subscribes to /dashboard/stream for live mutation
|
||||
// events so the SW4RM / Y3R C4LL / SYST3M panes update without an
|
||||
// operator action triggering a refreshState. Pre-step-2 this wiring
|
||||
// lived inside the broker-terminal IIFE which only fired on /flow.html
|
||||
// — meaning /index.html only updated on cold load + after async-form
|
||||
// submits.
|
||||
// operator action triggering a refreshState.
|
||||
//
|
||||
// Bare `EventSource` (no terminal infrastructure needed — the
|
||||
// dashboard doesn't render broker rows). Each event's `kind` is
|
||||
|
|
@ -3182,9 +3175,9 @@ window.marked = marked;
|
|||
// lost during the disconnect window (same pattern as flow.js's
|
||||
// onStreamOpen).
|
||||
//
|
||||
// `#408` will give /index.html its own stream that omits the
|
||||
// broker traffic the dashboard never uses; for now both pages
|
||||
// subscribe to `/dashboard/stream` and filter client-side.
|
||||
// Both /index.html and /flow.html subscribe to `/dashboard/stream`
|
||||
// and filter client-side — the dashboard ignores broker traffic
|
||||
// and the inbox ignores mutation events.
|
||||
const MUTATION_HANDLERS = {
|
||||
approval_added: applyApprovalAdded,
|
||||
approval_resolved: applyApprovalResolved,
|
||||
|
|
@ -3315,7 +3308,6 @@ window.marked = marked;
|
|||
refreshTabCounts();
|
||||
setInterval(refreshTabCounts, 1000);
|
||||
|
||||
// Flow-specific IIFEs moved to ./flow.js (#406 step 2): inbox-pill
|
||||
// wiring, the broker terminal init, and the @-mention composer.
|
||||
// /index.html no longer loads them — only /flow.html does.
|
||||
// Flow-specific code (inbox-pill wiring, broker terminal init, the
|
||||
// @-mention composer) lives in ./flow.js — loaded only by /flow.html.
|
||||
})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue