hyperhive/frontend/packages/shared/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris 38aa5f77f4 frontend: guard hive-menu/hive-agent-menu connectedCallback against reconnect
Fixes hyperhive#2893: 'Element.attachShadow: Unable to re-attach to
existing ShadowDOM', crashing swarm.js's live-update render path.

A custom element's connectedCallback fires again on a same-document
*move* (insertBefore/append repositioning an already-connected node
runs the removal + insertion steps for its whole subtree), not just
on a fresh mount. swarm.js's row-fingerprint cache reuses + reorders
existing <li> subtrees on live updates -- reordering an unchanged,
cached row moves its already-initialised <hive-agent-menu>/<hive-menu>
without ever really detaching it from the document, so connectedCallback
re-runs full setup on an instance that's already set up. attachShadow()
throws unconditionally if the host already has a shadow root, and
HiveAgentMenu's unconditional child-menu creation would have appended a
second <hive-menu> on top of the first, doubling the dropdown, once the
shadow-attach crash itself was out of the way.

Both connectedCallbacks now bail early if already initialised
(shadowRoot present / _menu already built). Reproduced the crash and
duplicate-menu bug with an unguarded control copy of both files driven
via headless Chromium (simulating the exact row-reorder move), then
confirmed the guarded version throws nothing, keeps the same shadowRoot
object identity across the move, and doesn't duplicate the dropdown.
2026-08-01 01:57:06 +02:00
..
hive-btn frontend: one component = one dir for hive-btn/hive-dialog/hive-toast 2026-07-31 21:53:28 +02:00
hive-dialog fix: reinstate the style-tag doc-comment fix lost when the merge commit was dropped for a rebase 2026-07-31 21:56:50 +02:00
hive-menu frontend: guard hive-menu/hive-agent-menu connectedCallback against reconnect 2026-08-01 01:57:06 +02:00
hive-toast fix: reinstate the style-tag doc-comment fix lost when the merge commit was dropped for a rebase 2026-07-31 21:56:50 +02:00
side-panel frontend: drop the Panel forwarding object and the side-panel-body compat class 2026-08-01 00:58:53 +02:00
tabs frontend: move shared/tabs.js+css into one-dir tabs/ 2026-08-01 01:56:41 +02:00
terminal frontend: move shared/terminal.js+css into one-dir terminal/ 2026-08-01 01:56:41 +02:00
base.css frontend: move shared spinner CSS out of dashboard.css into shared/base.css 2026-07-27 18:32:54 +02:00
chrome.css fix(dashboard): keep the logs ← home link + sub-tabs on one row 2026-06-10 19:51:34 +02:00
colors.css refactor(frontend): base16 theme contract in a swappable colors.css 2026-06-08 21:24:07 +02:00
dom.js frontend: hive-btn — drop the is= customized-built-in, use an autonomous element instead 2026-07-29 23:17:19 +02:00
forms.js frontend: extract themed dialogs + async-form handler to shared, wire agent UI 2026-07-27 18:55:17 +02:00
index.js frontend: move shared/terminal.js+css into one-dir terminal/ 2026-08-01 01:56:41 +02:00
modal.js frontend: one component = one dir for hive-btn/hive-dialog/hive-toast 2026-07-31 21:53:28 +02:00
shadow-css.js review(#2873): use a plain <style> element instead of adoptedStyleSheets 2026-07-31 21:53:28 +02:00
theme.css ci: tighten tracker-tag lint to exclude digit-runs glued to a letter (#1555) 2026-06-09 13:42:20 +02:00