hyperhive/frontend/packages
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris b201f6be88 frontend: fix hive-btn crashing every themed dialog — customized built-ins can't host shadow DOM
Element.attachShadow() throws NotSupportedError unconditionally for a
customized built-in (<button is="hive-btn">): the spec only allows
autonomous custom elements or a fixed list of native tags to host a
shadow root, and explicitly excludes any is=-upgraded built-in
regardless of which tag it upgrades. button isn't on that list either
way. This made every themed dialog (any confirm/prompt, since openDialog
always renders at least one button) throw and fail to render in a real
browser, though it passed CI since nothing there exercises actual
browser DOM.

hive-dialog and hive-toast are unaffected — both are genuine autonomous
custom elements (extends HTMLElement, no is= upgrade), which are valid
shadow hosts.

Fix: hive-btn no longer calls attachShadow. Styles adopt onto document
once (module-level guard) instead of per-instance shadow root, scoped
via the [is="hive-btn"] attribute selector instead of :host — same
light-DOM approach the rest of the app's .btn consumers already use.
Native button behaviour is untouched, only the styling mechanism
changed. Build clean.
2026-07-29 22:51:54 +02:00
..
agent frontend: move shadow-DOM component CSS to real .css files, not JS strings 2026-07-29 12:55:54 +02:00
dashboard frontend: add <hive-btn> component, use it for dialog buttons 2026-07-29 12:55:54 +02:00
shared frontend: fix hive-btn crashing every themed dialog — customized built-ins can't host shadow DOM 2026-07-29 22:51:54 +02:00