Watch
0
0
Fork
You've already forked hyperhive
0

hive ui: the dashboard wears the swarm UI's chrome, and its own header, tab strip and menu mounts go

The dashboard mounts @hive/shared's AppShell, the header, nav and settings menu the swarm UI has, from a new shell.js: the hive's name for the brand, the tabs agents, rebuild queue and kept state routed by the URL hash, the theme, motion and solid-background settings in this page's own browser storage, and the shared links and user menus. The three tab panes stay plain DOM, kept hidden in index.html and moved into the shell's content column by shell.js. The tabs, the hash-to-tab parse and the menu entries sit in shell-routes.js, which npm test covers (the dashboard package gets a test script). The old header, the createTabStrip tabbar, the leet tab names, the identity headline and title code, the sticky-top wrapper, the links-menu.js and user-menu.js mounts and their CSS are removed. The docs say the plain tab names and the new chrome.
This commit is contained in:
iris 2026-11-21 10:21:21 +01:00
commit 7707a257e9

View file

@ -9,17 +9,20 @@
@import "@hive/shared/jobq-graph.css";
@import "@hive/shared/user-menu.css";
@import "@hive/shared/links-menu.css";
@import "@hive/shared/app-shell.css";
@import "@hive/shared/icon-button.css";
@import "@hive/shared/settings-menu.css";
@import "@hive/shared/solid-backgrounds.css";
/* ─── tabbed dashboard chrome ──────────────────────────────────────
Top-of-page sticky header with banner + tab strip. SSE stays
alive across tab switches. See docs/4-implementation/web-ui/dashboard.md::Chrome header + Tab strip for the
routing model. */
/* ─── the dashboard page ───────────────────────────────────────────
The chrome (header, nav, settings) is `@hive/shared`'s AppShell, drawn by
shell.js; SSE stays alive across tab switches. See
docs/4-implementation/web-ui/dashboard.md::Chrome header + Tab strip. */
body.dashboard-shell {
/* Full-bleed body (no horizontal gutter). The 1.5em side gutter lives
on the inner `.page-content` wrapper (see common.css), so the sticky
chrome bar and the footer span the full
width edge-to-edge with no negative-margin breakout. `padding-bottom`
in the shell's content column, so the footer spans the full width
edge-to-edge with no negative-margin breakout. `padding-bottom`
keeps a little breathing room above the viewport edge (overridden to
clear the selection bar via `.has-selection` below). No max-width cap
— wide screens use the full width rather than empty side margins. */
@ -27,40 +30,6 @@ body.dashboard-shell {
padding-bottom: 1.5em;
}
.dashboard-chrome {
/* Pages menu + tab strip share one row (flex). The chrome owns the
horizontal gutter and the single full-width bottom divider; its
children drop their own side padding / border so they sit inline. */
display: flex;
align-items: center;
gap: 0.75em;
/* Stickiness lives on the `.sticky-top` wrapper (common.css) that
common.js wraps this chrome in. */
background: color-mix(
in srgb,
var(--bg) calc(100% - 14% * var(--glass-clear)),
transparent
);
-webkit-backdrop-filter: var(--glass-filter);
backdrop-filter: var(--glass-filter);
border-bottom: 1px solid var(--purple-dim);
padding: 0.3em 1em;
margin: 0 0 1em;
}
/* The pages menu and the profile menu, together at the right end of the
chrome. Their own looks are `@hive/shared/links-menu.css`'s and
`@hive/shared/user-menu.css`'s. */
.dashboard-chrome-actions {
display: flex;
align-items: center;
gap: 0.25em;
flex: none;
margin-left: auto;
}
.links-menu-slot,
.user-menu-slot {
flex: none;
}
.banner-thin {
text-align: center;
margin: 0;
@ -73,52 +42,8 @@ body.dashboard-shell {
text-overflow: ellipsis;
}
.tabbar {
display: flex;
flex-wrap: nowrap;
align-items: center;
gap: 0.2em;
/* On one row with the chrome's menus; the chrome owns the gutter +
the bottom divider, so no outer padding / border here. */
}
/* Shares the flat-pill aesthetic of the shared `.hive-tab` (sub-tabs on
the standalone pages) so the chrome reads as one family. Kept a touch
weightier than bare `.hive-tab` — larger font, bold labels, count
pills — since this is the dashboard's primary nav, not a sub-strip. */
.tabbar .tab {
display: inline-flex;
align-items: center;
gap: 0.5em;
flex-shrink: 0;
padding: 0.4em 0.95em;
color: var(--muted);
font-family: inherit;
font-size: 0.92em;
letter-spacing: 0.06em;
text-decoration: none;
border: 0;
border-radius: 4px;
cursor: pointer;
transition:
color 0.15s ease,
background 0.15s ease;
}
.tabbar .tab:hover {
color: var(--fg);
background: var(--border);
}
.tabbar .tab.hive-tab--active {
color: var(--purple);
background: var(--border);
}
.tab-label {
font-weight: bold;
white-space: nowrap;
}
/* Tab pane visibility — createTabStrip (@hive/shared/tabs.js) sets the
`hidden` attribute on every inactive pane (resolved from the URL hash;
default — no hash — is 4G3NTS). Only the active pane stays visible. */
/* Tab pane visibility: shell.js sets the `hidden` attribute on every pane but
the one the URL hash names. */
.tab-pane[hidden] {
display: none;
}