refactor(fe): trim impl-history and duplicated-docs prose from comments
Remove or shorten comment blocks that: - explain where code used to live (impl history) - duplicate rationale already in docs/web-ui.md - contain speculative/future-work notes Changes: - tabs.js: drop "SYST3M tab used to render this" history; keep badge purpose - schedules.js: drop "used to be a card layout" history + speculative nit note - stream-worker.js: replace 10-line problem-statement with docs pointer (rationale already in docs/web-ui.md SSE multiplexing section); trim future-work parenthetical from subscription-tracking comment - system-sections.css: drop extraction-history prose; keep what it does - core.css: drop move-history prose; keep what it imports and why Part of issue cleanup per operator feedback.
This commit is contained in:
parent
c7c4a40e49
commit
878aade8fa
5 changed files with 9 additions and 59 deletions
|
|
@ -1,21 +1,6 @@
|
|||
/* ─── /core.html — C0R3 page ───────────────────────────────────────
|
||||
Standalone page for kept state (tombstones) and container load.
|
||||
Same minimal-chrome pattern as /logs.html (a `← home` back-link +
|
||||
a createTabStrip sub-tab strip; base tab + page-header styling comes
|
||||
from @hive/shared via common.css, linked by core.html).
|
||||
|
||||
The section renderers (kept state, container load) emit the same
|
||||
class names as before. Those section-internal rules live in
|
||||
system-sections.css (shared with dashboard.css and builds.css, which
|
||||
references `.rqe-source*` from the schedules view). The
|
||||
`.hive-stats-table` the container-load table reuses lives in
|
||||
common.css, linked directly by core.html. Importing just the section
|
||||
rules keeps the C0R3 bundle small instead of dragging in all of
|
||||
dashboard.css.
|
||||
|
||||
Rebuild queue + meta inputs have moved to /builds.html; the
|
||||
`.rebuild-live-log-*` styles that used to live here have moved to
|
||||
system-sections.css so builds.css can share them via @import. */
|
||||
Kept state (tombstones) and container load. Section rules imported
|
||||
from system-sections.css (shared with dashboard.css + builds.css). */
|
||||
@import "./system-sections.css";
|
||||
|
||||
body.core-shell {
|
||||
|
|
|
|||
|
|
@ -683,11 +683,7 @@ function renderScheduleRow(s, agents) {
|
|||
|
||||
tr.append(el('td', { class: 'meta' }, s.owner));
|
||||
|
||||
// Body cell — truncates with ellipsis; full body + description (if
|
||||
// any) on hover. Description used to be a separate visible block on
|
||||
// the card layout; the table compresses it into the title to keep
|
||||
// row height tight. Mara nit-flag candidate if she actually wants
|
||||
// it visible in-table.
|
||||
// Body cell — truncates with ellipsis; full body + description on hover.
|
||||
const bodyCell = el('td', { class: 'schedules-table-body-cell' });
|
||||
const bodyText = s.body || '';
|
||||
bodyCell.title = (s.description ? s.description + '\n\n' : '') + bodyText;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
// SharedWorker that holds ONE EventSource per stream URL and fans
|
||||
// every server-sent event out to every connected tab via MessagePort.
|
||||
//
|
||||
// Problem this solves: every dashboard / agent tab opens its own
|
||||
// `EventSource('/api/dashboard/stream')`. Browsers cap concurrent
|
||||
// connections per host (~6), and Firefox throttles / disconnects
|
||||
// background tabs when many are open. The result: tabs silently
|
||||
// drop the SSE, fall behind, and only catch up on focus.
|
||||
//
|
||||
// Centralising the connection in a SharedWorker means N tabs share
|
||||
// ONE backend EventSource regardless of focus state — way under the
|
||||
// per-host cap, immune to per-tab throttling, and the worker survives
|
||||
// any individual tab being suspended.
|
||||
// Design rationale: docs/web-ui.md (SSE multiplexing paragraph).
|
||||
//
|
||||
// Wire protocol (port.postMessage payloads):
|
||||
//
|
||||
|
|
@ -42,8 +32,7 @@
|
|||
// signal to the client).
|
||||
//
|
||||
// Subscriptions are tracked per (port, url): a single port can
|
||||
// subscribe to multiple URLs (today only one is in use but the shape
|
||||
// stays open for the per-agent /events/stream multiplexing follow-up).
|
||||
// subscribe to multiple URLs (only one is in use today).
|
||||
// Unsubscribing the last port for a URL closes the EventSource so we
|
||||
// don't keep idle streams open.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,7 @@
|
|||
/* ─── SYST3M/BU1LDS section panels — shared by dashboard, /core.html,
|
||||
and /builds.html ──────────────────────────────────────────────────
|
||||
The rebuild queue, meta inputs, kept state, and container-load panels
|
||||
render on /core.html; rebuild queue + meta inputs + live-log also
|
||||
render on /builds.html (the build lifecycle hub). These
|
||||
section-internal rules used to live in dashboard.css and were pulled
|
||||
in by /core.html via a wholesale `@import "./dashboard.css"`, which
|
||||
dragged the entire ~39kb dashboard stylesheet into the bundle.
|
||||
|
||||
They now live here and are `@import`ed by core.css, dashboard.css,
|
||||
and builds.css. Each page gets only this small file instead of all
|
||||
of dashboard.css; the dashboard keeps the rules (a couple are still
|
||||
referenced from dashboard JS — `.rqe-source*` by the schedules view,
|
||||
and `.hive-stats-table`, which already lives in common.css and is
|
||||
loaded by all pages). Behaviour-preserving: identical rules, same
|
||||
custom properties from colors.css / theme.css / common.css.
|
||||
|
||||
The selectors here are uniquely named to these panels and are not
|
||||
redefined elsewhere, so the cascade is unaffected by the move. */
|
||||
Rebuild queue, meta inputs, kept state, and container-load panels.
|
||||
Imported by core.css, dashboard.css, and builds.css. */
|
||||
|
||||
/* ─── meta inputs panel ────────────────────────────────────────────── */
|
||||
.meta-inputs {
|
||||
|
|
|
|||
|
|
@ -129,13 +129,8 @@ window.marked = marked;
|
|||
if (containersState.delete(ev.name)) renderContainersFromState();
|
||||
}
|
||||
|
||||
// Derived rebuild queue state — cold-loaded from
|
||||
// `/api/state.rebuild_queue`, then mutated live by the
|
||||
// `rebuild_queue_changed` snapshot event. The SYST3M tab that used to
|
||||
// render this list moved to the standalone /core.html page; the
|
||||
// dashboard keeps the STATE because it drives the "building…" /
|
||||
// "meta-updating…" badges on the SW4RM agent cards (see
|
||||
// inFlightOpsByAgent + docs/web-ui.md::Container row).
|
||||
// Rebuild queue state — drives "building…" / "meta-updating…" badges on
|
||||
// SW4RM agent cards (see inFlightOpsByAgent + docs/web-ui.md::Container row).
|
||||
let rebuildQueueState = [];
|
||||
function syncRebuildQueueFromSnapshot(s) {
|
||||
rebuildQueueState = (s.rebuild_queue || []).slice();
|
||||
|
|
|
|||
Loading…
Reference in a new issue