frontend: the swarm UI's page chrome moves to @hive/shared as AppShell
The header bar, the nav row with its sliding underline, the settings menu slot, the skip link and the content column move out of the swarm UI's Shell into a router-free AppShell in @hive/shared, with their CSS. It takes the brand, the nav items, the current location and the link component, plus slots for extra tabs, settings entries and menus. The swarm UI's Shell keeps what is its own on top of it: the open agent-terminal tabs (their CSS moves to DynamicTabs.css), the swarm's settings, links and user menus, the swarm name and the full-bleed routes. No visible change; this is the base for the hive UI to reuse the same chrome.
This commit is contained in:
parent
1a4f35f669
commit
c6f8f26b16
9 changed files with 604 additions and 530 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* <AgentTerminalPage> — fills `.shell-body-full` (Shell.css), which is
|
||||
/* <AgentTerminalPage> — fills `.shell-body-full` (AppShell.css), which is
|
||||
already everything below the header bar, full width and height. This
|
||||
wrapper only has to pass that height down so `AgentTermPreview`'s
|
||||
`fullHeight` flex chain (`.ui-agent-term-preview-full`) has a real box
|
||||
|
|
|
|||
97
frontend/packages/swarm-ui/src/shell/DynamicTabs.css
Normal file
97
frontend/packages/swarm-ui/src/shell/DynamicTabs.css
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/* The open agent-terminal tabs in the header's nav row (Shell.tsx). */
|
||||
/* Dynamic tabs group — inline in `.shell-nav` itself, next to the
|
||||
static route links, not a row of its own under the header.
|
||||
`margin-left: 0.5em` + `border-left` reads as "a group
|
||||
attached to the nav, not another nav item" without a second landmark
|
||||
or a fixed pixel gap that'd fight `.shell-nav`'s own `gap`. */
|
||||
.shell-tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5em;
|
||||
margin-left: 0.5em;
|
||||
padding-left: 0.75em;
|
||||
border-left: 1px solid var(--border);
|
||||
}
|
||||
.shell-tab {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25em;
|
||||
padding: 0.2em 0.4em 0.2em 0.7em;
|
||||
border-radius: 0.3em;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.shell-tab-active {
|
||||
border-color: var(--pink);
|
||||
}
|
||||
/* A tab that can be dragged onto a terminal to split it shows a grip in a gutter
|
||||
of its own on hover, so the drag is discoverable. The gutter is part of the
|
||||
padding, so the tab does not change size when the grip appears. */
|
||||
.shell-tab-draggable {
|
||||
position: relative;
|
||||
padding-left: 1.3em;
|
||||
cursor: grab;
|
||||
}
|
||||
/* The tab a dragged tab would take the place of. */
|
||||
.shell-tab-drop {
|
||||
box-shadow: inset 2px 0 0 var(--purple);
|
||||
}
|
||||
.shell-tab-grip {
|
||||
position: absolute;
|
||||
left: 0.35em;
|
||||
top: 50%;
|
||||
display: inline-flex;
|
||||
color: var(--muted);
|
||||
opacity: 0;
|
||||
transform: translateY(-50%);
|
||||
transition: opacity 0.15s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
.shell-tab-draggable:hover .shell-tab-grip {
|
||||
opacity: 0.9;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.shell-tab-grip {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
.shell-tab-link {
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.shell-tab-active .shell-tab-link {
|
||||
color: var(--fg);
|
||||
}
|
||||
.shell-tab-link:hover {
|
||||
color: var(--fg);
|
||||
}
|
||||
/* Same reset every icon-only chrome button in this codebase uses
|
||||
(`Badge`'s own `<button>` case) — a bare `<button>` here isn't routed
|
||||
through `Badge` since it's not a status/value pill, just a close
|
||||
glyph, so the reset is inlined rather than reaching for a component
|
||||
that doesn't fit this shape. */
|
||||
.shell-tab-close {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
padding: 0.25em 0.45em;
|
||||
border-radius: 0.2em;
|
||||
color: var(--muted);
|
||||
}
|
||||
/* `all: unset` drops the browser's focus ring, and so does the tab link's
|
||||
own reset, so both draw one. */
|
||||
.shell-tab-close:focus-visible,
|
||||
.shell-tab-link:focus-visible {
|
||||
outline: 2px solid var(--purple);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.shell-tab-close:hover {
|
||||
color: var(--fg);
|
||||
background: color-mix(in srgb, var(--fg) 10%, transparent);
|
||||
}
|
||||
.shell-tab-rename {
|
||||
width: 10em;
|
||||
font: inherit;
|
||||
}
|
||||
|
|
@ -1,360 +0,0 @@
|
|||
/* <Shell> — header bar + nav row + the content column every route
|
||||
renders into. Colour vars come from ../theme.css (same base16 slots
|
||||
the per-hive dashboard uses, so this reads as recognizably
|
||||
hyperhive) — the layout itself is this package's own, not
|
||||
@hive/shared's chrome.css.
|
||||
|
||||
`flex-wrap` on the header and nav rather than a hamburger/collapse
|
||||
menu: a narrow viewport (phone or a tiled desktop window) wraps onto
|
||||
a second line instead of overflowing — "don't break, don't
|
||||
over-invest" is the explicit scope here, not full mobile navigation
|
||||
redesign.
|
||||
|
||||
Page-switch animation (see Shell.tsx's file-top comment for the JS
|
||||
half): both the nav indicator's slide and the page-body pop follow
|
||||
the same three-rule motion-guard shape `@hive/shared/motion-apply.js`'s
|
||||
own doc comment specifies — a base rule,
|
||||
`@media (prefers-reduced-motion: reduce)` to respect the OS default,
|
||||
`:root[data-motion='reduce']` as the explicit override (same
|
||||
specificity as the media rule, so source order after it wins), then
|
||||
`:root[data-motion='allow']` last to re-enable despite an OS-level
|
||||
reduce preference. */
|
||||
/* Sticky + frosted glass (mara: "sticky header bar ... frosted glass")
|
||||
— same `color-mix` + `backdrop-filter` recipe `.terminal-wrap`/
|
||||
`.ui-badge` (@hive/shared) already use, dark-only same as those (a
|
||||
light bg behind glass washes out; `--glass-clear` in theme.css).
|
||||
`z-index` keeps it above `.shell-body` once content scrolls underneath. */
|
||||
.shell-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 1.5em;
|
||||
padding: 0.75em 1.25em;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--bg-elev) calc(100% - 20% * var(--glass-clear)),
|
||||
transparent
|
||||
);
|
||||
-webkit-backdrop-filter: var(--glass-filter);
|
||||
backdrop-filter: var(--glass-filter);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
/* The swarm name links to the start page; the link adds no look of its own,
|
||||
so the brand's accent and glow (on the span inside) are all that show. */
|
||||
.shell-brand-link {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.shell-brand {
|
||||
font-weight: 600;
|
||||
/* Base colour only — Shell.tsx overrides it inline to the same
|
||||
currently-active-tab accent `.shell-nav-indicator` uses (falling
|
||||
back to this `--purple` before the first measurement lands, which
|
||||
is also the "hives" default route's own accent, so there's no
|
||||
visible mismatch at first paint). Transition lives here, same
|
||||
140ms hop cadence + the same three-rule motion guard as the
|
||||
indicator, so this and the indicator read as one thing changing,
|
||||
not two independently-synced ones. */
|
||||
color: var(--purple);
|
||||
letter-spacing: 0.02em;
|
||||
transition: color 140ms ease;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.shell-brand {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
:root[data-motion="reduce"] .shell-brand {
|
||||
transition: none;
|
||||
}
|
||||
:root[data-motion="allow"] .shell-brand {
|
||||
transition: color 140ms ease;
|
||||
}
|
||||
.shell-nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1em;
|
||||
position: relative; /* anchor for .shell-nav-indicator */
|
||||
}
|
||||
/* A narrow screen (40em, the one width breakpoint the swarm UI has): the brand
|
||||
and the header's menus share the first row, and the nav takes the second as
|
||||
one row that scrolls sideways, instead of wrapping into two or three rows
|
||||
that cover a third of a phone. */
|
||||
@media (max-width: 40em) {
|
||||
.shell-header {
|
||||
gap: 0.25em 0.75em;
|
||||
padding: 0.5em 0.75em;
|
||||
}
|
||||
.shell-header-actions {
|
||||
order: 1;
|
||||
}
|
||||
.shell-nav {
|
||||
order: 2;
|
||||
flex: 1 0 100%;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.shell-nav::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.shell-nav-link,
|
||||
.shell-tabs {
|
||||
flex: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
/* Holds `SettingsMenu` + `LinksMenu` — one `margin-left: auto` on the
|
||||
wrapper, not one on each child (see Shell.tsx's comment for why two
|
||||
adjacent auto margins don't sit flush together). */
|
||||
.shell-header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25em;
|
||||
margin-left: auto;
|
||||
}
|
||||
/* Touch target and active-state underline are deliberately on two
|
||||
different elements. An earlier version put both `min-height: 2.75em`
|
||||
and `border-bottom` on the same box: centering the text within a
|
||||
2.75em box pushes a bottom-edge border ~0.7em away from the text,
|
||||
which argus caught by actually rendering it — a real visual
|
||||
regression, not just a touch-target win. So: `.shell-nav-link` (the
|
||||
`<a>`) owns the full-height tappable box (same 2.75em / ~44px WCAG
|
||||
2.5.5 floor as the rest of the shared kit — this is the primary nav,
|
||||
the single most-clicked/tapped element in the whole shell), and
|
||||
`.shell-nav-link-text` (an inner span hugging just the text) owns
|
||||
the underline, so the indicator stays directly under the label
|
||||
regardless of how tall the tappable box around it is. */
|
||||
.shell-nav-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 2.75em;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
}
|
||||
.shell-nav-link:hover {
|
||||
color: var(--fg);
|
||||
}
|
||||
.shell-nav-link-text {
|
||||
padding-bottom: 0.25em; /* gap between the text and .shell-nav-indicator below it */
|
||||
}
|
||||
.shell-nav-link-active {
|
||||
color: var(--fg);
|
||||
}
|
||||
/* Shared underline, one element instead of one border-bottom per link
|
||||
— see Shell.tsx's file-top comment. `left`/`top`/`width` are set
|
||||
inline per-render from a real measurement; only the *transition*
|
||||
between those values lives here. 140ms matches Shell.tsx's `HOP_MS`
|
||||
exactly, so one hop's CSS transition finishes right as the next
|
||||
hop's JS-driven style update lands, instead of the two blending into
|
||||
an averaged easing curve. */
|
||||
.shell-nav-indicator {
|
||||
position: absolute;
|
||||
height: 2px;
|
||||
border-radius: 1px;
|
||||
transition:
|
||||
left 140ms ease,
|
||||
top 140ms ease,
|
||||
width 140ms ease,
|
||||
background-color 140ms ease;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.shell-nav-indicator {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
:root[data-motion="reduce"] .shell-nav-indicator {
|
||||
transition: none;
|
||||
}
|
||||
:root[data-motion="allow"] .shell-nav-indicator {
|
||||
transition:
|
||||
left 140ms ease,
|
||||
top 140ms ease,
|
||||
width 140ms ease,
|
||||
background-color 140ms ease;
|
||||
}
|
||||
/* Suppresses the transition for exactly one render — the indicator's
|
||||
very first real position, so it snaps into place instead of visibly
|
||||
growing from the unmounted `left:0/width:0/transparent` fallback (see
|
||||
Shell.tsx's `indicatorSettledOnce`). Two-class selector so it wins
|
||||
over the plain `.shell-nav-indicator` rule above without `!important`,
|
||||
same reasoning `:root[data-motion='reduce']`'s extra attribute
|
||||
selector already relies on. */
|
||||
.shell-nav-indicator.shell-nav-indicator-instant {
|
||||
transition: none;
|
||||
}
|
||||
/* Dynamic tabs group — inline in `.shell-nav` itself, next to the
|
||||
static route links (mara, PR review: "the dynamic tab should be in
|
||||
the top bar, not a new one below" — an earlier cut had this as its
|
||||
own sticky row under the header; that version and the reasoning for
|
||||
it are still in this file's git history if the split ever needs to
|
||||
come back). `margin-left: 0.5em` + `border-left` reads as "a group
|
||||
attached to the nav, not another nav item" without a second landmark
|
||||
or a fixed pixel gap that'd fight `.shell-nav`'s own `gap`. */
|
||||
.shell-tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5em;
|
||||
margin-left: 0.5em;
|
||||
padding-left: 0.75em;
|
||||
border-left: 1px solid var(--border);
|
||||
}
|
||||
.shell-tab {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25em;
|
||||
padding: 0.2em 0.4em 0.2em 0.7em;
|
||||
border-radius: 0.3em;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.shell-tab-active {
|
||||
border-color: var(--pink);
|
||||
}
|
||||
/* A tab that can be dragged onto a terminal to split it shows a grip in a gutter
|
||||
of its own on hover, so the drag is discoverable. The gutter is part of the
|
||||
padding, so the tab does not change size when the grip appears. */
|
||||
.shell-tab-draggable {
|
||||
position: relative;
|
||||
padding-left: 1.3em;
|
||||
cursor: grab;
|
||||
}
|
||||
/* The tab a dragged tab would take the place of. */
|
||||
.shell-tab-drop {
|
||||
box-shadow: inset 2px 0 0 var(--purple);
|
||||
}
|
||||
.shell-tab-grip {
|
||||
position: absolute;
|
||||
left: 0.35em;
|
||||
top: 50%;
|
||||
display: inline-flex;
|
||||
color: var(--muted);
|
||||
opacity: 0;
|
||||
transform: translateY(-50%);
|
||||
transition: opacity 0.15s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
.shell-tab-draggable:hover .shell-tab-grip {
|
||||
opacity: 0.9;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.shell-tab-grip {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
.shell-tab-link {
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.shell-tab-active .shell-tab-link {
|
||||
color: var(--fg);
|
||||
}
|
||||
.shell-tab-link:hover {
|
||||
color: var(--fg);
|
||||
}
|
||||
/* Same reset every icon-only chrome button in this codebase uses
|
||||
(`Badge`'s own `<button>` case) — a bare `<button>` here isn't routed
|
||||
through `Badge` since it's not a status/value pill, just a close
|
||||
glyph, so the reset is inlined rather than reaching for a component
|
||||
that doesn't fit this shape. */
|
||||
.shell-tab-close {
|
||||
all: unset;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
padding: 0.25em 0.45em;
|
||||
border-radius: 0.2em;
|
||||
color: var(--muted);
|
||||
}
|
||||
/* `all: unset` drops the browser's focus ring, and so does the tab link's
|
||||
own reset, so both draw one. */
|
||||
.shell-tab-close:focus-visible,
|
||||
.shell-tab-link:focus-visible {
|
||||
outline: 2px solid var(--purple);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
/* A skip link, drawn only while it has the keyboard focus. */
|
||||
.shell-skip-link {
|
||||
position: absolute;
|
||||
left: 0.5em;
|
||||
top: -4em;
|
||||
z-index: 100;
|
||||
padding: 0.5em 1em;
|
||||
border-radius: 0.3em;
|
||||
background: var(--bg-elev);
|
||||
color: var(--fg);
|
||||
border: 1px solid var(--purple);
|
||||
}
|
||||
.shell-skip-link:focus {
|
||||
top: 0.5em;
|
||||
}
|
||||
/* The page container takes the focus when a page opens, and is not a control. */
|
||||
.shell-body:focus {
|
||||
outline: none;
|
||||
}
|
||||
.shell-tab-close:hover {
|
||||
color: var(--fg);
|
||||
background: color-mix(in srgb, var(--fg) 10%, transparent);
|
||||
}
|
||||
|
||||
/* One width for every tab's contents: 90em still centers with visible margins
|
||||
on a typical desktop viewport; it isn't full-bleed. */
|
||||
.shell-body {
|
||||
max-width: 90em;
|
||||
margin: 0 auto;
|
||||
padding: 1.5em 1.25em;
|
||||
/* Plain fade, deliberately — mara's call on review: a scale+overshoot
|
||||
"pop" (this rule's first cut) read as too much for a first pass.
|
||||
Keeping it simple leaves room to make this fancier later without
|
||||
having shipped something to walk back first. */
|
||||
animation: shell-page-enter 160ms ease;
|
||||
}
|
||||
/* Full-bleed route (the agent terminal): the shell becomes a viewport-high
|
||||
column, the header keeps its natural height, and the body takes every
|
||||
remaining pixel with no width cap or padding. `100dvh`, not `100vh` —
|
||||
`vh` includes mobile browser chrome that is on screen. */
|
||||
.shell-full {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100dvh;
|
||||
}
|
||||
.shell-full .shell-header {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.shell-body-full {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@keyframes shell-page-enter {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.shell-body {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
:root[data-motion="reduce"] .shell-body {
|
||||
animation: none;
|
||||
}
|
||||
:root[data-motion="allow"] .shell-body {
|
||||
animation: shell-page-enter 160ms ease;
|
||||
}
|
||||
|
||||
.shell-tab-rename {
|
||||
width: 10em;
|
||||
font: inherit;
|
||||
}
|
||||
|
|
@ -1,49 +1,20 @@
|
|||
// <Shell> — page chrome every swarm-ui route mounts inside: a header
|
||||
// bar (swarm branding) plus a nav row linking the app's real routes.
|
||||
// Preact-native styling — `./Shell.css` imported right here, not
|
||||
// wired centrally, so the component and its styles travel together
|
||||
// (esbuild folds every imported `.css` reachable from `main.tsx` into
|
||||
// one `main.css` companion output, see build.mjs) — deliberately not
|
||||
// @hive/shared's chrome.css page-header pattern, which is the per-hive
|
||||
// MPA dashboard's visual language. This package is a clean field, not
|
||||
// an inheritor of that look.
|
||||
//
|
||||
// Route list lives here, not prop-drilled from App — one small SPA
|
||||
// has exactly one place that needs to know its own nav, and this is
|
||||
// it. Grows additively as real routes land (a swarm-wide agent roster
|
||||
// is next); no speculative entries.
|
||||
//
|
||||
// Page-switch animation, two pieces (motion-guard rules live in
|
||||
// Shell.css): `.shell-body` remounts on every navigation
|
||||
// (`key={location}`) to replay a plain fade-in, and a single shared
|
||||
// underline (`.shell-nav-indicator`) hops through every nav item it
|
||||
// passes over on its way to the new active one, not just a straight
|
||||
// two-point tween — a nav hives→components jump visibly touches "new
|
||||
// agent" and "jobs" in between, position and colour together. Accent
|
||||
// is a discrete cycle through the existing base16 chromatic slots
|
||||
// (`NAV_ITEMS`' `accent` field), not a continuous hue rotation —
|
||||
// everything here still derives from base16, same rule the rest of
|
||||
// the palette follows. `.shell-brand` rides the identical accent value
|
||||
// (`navAccent` below), so the header reads as one accent changing, not
|
||||
// the underline alone.
|
||||
import { useEffect, useRef, useState } from "preact/hooks";
|
||||
// <Shell> — the swarm UI's page chrome: `@hive/shared`'s `AppShell` with the
|
||||
// swarm's brand, its routes, the open agent-terminal tabs after them, the
|
||||
// swarm's settings and its links and user menus. The route list lives here, not
|
||||
// prop-drilled from App: one small SPA has exactly one place that needs to
|
||||
// know its own nav.
|
||||
import { useState } from "preact/hooks";
|
||||
import type { ComponentChildren } from "preact";
|
||||
import { Link, useLocation } from "wouter-preact";
|
||||
import { AppShell } from "@hive/shared/app-shell.js";
|
||||
import { usePageTitleValue } from "./page-title.js";
|
||||
import { LinksMenu } from "./LinksMenu.js";
|
||||
import { UserMenu } from "./UserMenu.js";
|
||||
import { useHideDebug } from "./useHideDebug.js";
|
||||
import { SettingsMenu } from "@hive/shared/settings-menu.js";
|
||||
import { HideDebugSetting } from "@hive/shared/hide-debug-setting.js";
|
||||
import { ShowThinkingSetting } from "@hive/shared/show-thinking-setting.js";
|
||||
import { GripIcon } from "@hive/shared/icons.js";
|
||||
import { ExpandDetailsSetting } from "@hive/shared/expand-details-setting.js";
|
||||
import { useApplyThemeOverride } from "@hive/shared/theme-apply.js";
|
||||
import { useApplyMotionOverride } from "@hive/shared/motion-apply.js";
|
||||
import {
|
||||
SolidBackgroundsSetting,
|
||||
useApplySolidBackgrounds,
|
||||
} from "@hive/shared/solid-backgrounds.js";
|
||||
import { isFullBleedRoute, visibleNavItems } from "./routes.js";
|
||||
import { useDynamicTabs } from "./useDynamicTabs.js";
|
||||
import {
|
||||
|
|
@ -55,13 +26,11 @@ import { endAgentDrag, startAgentDrag } from "../agent/terminal/termDrag.js";
|
|||
import { draggedTab, endTabDrag, startTabDrag } from "./tab-order.js";
|
||||
import { useTermGroups } from "../agent/terminal/useTermGroups.js";
|
||||
import { useSwarmName } from "./useSwarmName.js";
|
||||
import "./Shell.css";
|
||||
import "./DynamicTabs.css";
|
||||
|
||||
// Storage keys this app owns for `@hive/shared`'s settings mechanism —
|
||||
// kept here, not derived, so the two mount points below (the
|
||||
// `useApply*` effects and `<SettingsMenu>`) always agree on which
|
||||
// browser-local key they're reading/writing. Theme defaults to `'dark'`,
|
||||
// not `'system'` — see `@hive/shared/theme-apply.js`'s file comment.
|
||||
// Storage keys this app owns for `@hive/shared`'s settings mechanism. Theme
|
||||
// defaults to `'dark'`, not `'system'` — see `@hive/shared/theme-apply.js`'s
|
||||
// file comment.
|
||||
const THEME_KEY = "swarm-ui:theme-override";
|
||||
const MOTION_KEY = "swarm-ui:motion-override";
|
||||
const SOLID_KEY = "swarm-ui:solid-backgrounds";
|
||||
|
|
@ -80,78 +49,6 @@ const NAV_ITEMS: { href: string; label: string; accent: string }[] = [
|
|||
// same generic label the pre-fetch page already showed, not a blank.
|
||||
const DEFAULT_BRAND = "hyperhive swarm";
|
||||
|
||||
interface IndicatorRect {
|
||||
left: number;
|
||||
top: number;
|
||||
width: number;
|
||||
accent: string;
|
||||
}
|
||||
|
||||
// One hop's travel time — also the interval between hops, so each leg
|
||||
// finishes (per `.shell-nav-indicator`'s own CSS transition duration,
|
||||
// kept equal to this) before the next one starts rather than the two
|
||||
// blending into a single averaged easing curve.
|
||||
const HOP_MS = 140;
|
||||
|
||||
// `data-motion`/`prefers-reduced-motion` gate for the JS-driven hop
|
||||
// sequence — the CSS-only pieces (the fade, the indicator's own
|
||||
// transition) gate via the three-rule pattern in Shell.css, but a
|
||||
// multi-step `setTimeout` sequence has no CSS equivalent to hook, so it
|
||||
// checks the same two sources directly. `data-motion` takes precedence
|
||||
// over the OS preference either direction (reduce *or* allow), same
|
||||
// override semantics `@hive/shared/motion-apply.js` establishes.
|
||||
function prefersReducedMotion(): boolean {
|
||||
const override = document.documentElement.dataset.motion;
|
||||
if (override === "reduce") return true;
|
||||
if (override === "allow") return false;
|
||||
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||||
}
|
||||
|
||||
function NavLink({
|
||||
href,
|
||||
label,
|
||||
active,
|
||||
accent,
|
||||
textRef,
|
||||
}: {
|
||||
href: string;
|
||||
label: string;
|
||||
active: boolean;
|
||||
accent: string;
|
||||
textRef: (el: HTMLSpanElement | null) => void;
|
||||
}) {
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className="shell-nav-link"
|
||||
aria-current={active ? "page" : undefined}
|
||||
>
|
||||
{/* Touch target (min-height) lives on the <a> so the whole row is
|
||||
tappable. The underline lives on the shared
|
||||
`.shell-nav-indicator`, not here — this span is still what
|
||||
gets measured to position it, so it hugs just the text rather
|
||||
than the full-height tappable box. */}
|
||||
<span
|
||||
ref={textRef}
|
||||
class={"shell-nav-link-text" + (active ? " shell-nav-link-active" : "")}
|
||||
// Inline, not a CSS rule: the glow colour is this item's own
|
||||
// `accent` (NAV_ITEMS), a different value per nav item, the
|
||||
// same reason `.shell-nav-indicator`'s own colour is set this
|
||||
// way rather than in Shell.css.
|
||||
style={
|
||||
active
|
||||
? {
|
||||
textShadow: `0 0 8px color-mix(in srgb, ${accent} 45%, transparent)`,
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{label}
|
||||
</span>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
// One open agent-terminal tab (`useDynamicTabs`) — deliberately
|
||||
// its own small component, not folded into `NavLink` above: dynamic tabs
|
||||
// don't ride the sliding `.shell-nav-indicator` (there's no fixed set to
|
||||
|
|
@ -278,31 +175,7 @@ function DynamicTabLink({
|
|||
export function Shell({ children }: { children: ComponentChildren }) {
|
||||
const swarmName = useSwarmName();
|
||||
const [location] = useLocation();
|
||||
const navRef = useRef<HTMLElement | null>(null);
|
||||
const mainRef = useRef<HTMLElement | null>(null);
|
||||
const textRefs = useRef<Record<string, HTMLSpanElement | null>>({});
|
||||
const [indicator, setIndicator] = useState<IndicatorRect | null>(null);
|
||||
// The nav-item index the indicator is currently sitting at (or mid-hop
|
||||
// from) — distinct from `location`'s own index, since the two only
|
||||
// agree once every intermediate hop has landed. `-1` = not settled
|
||||
// anywhere yet (first mount) or on a route with no nav item (404).
|
||||
const settledIndexRef = useRef(-1);
|
||||
// False until the indicator's very first real position has committed —
|
||||
// gates `.shell-nav-indicator-instant` (see Shell.css) so that first
|
||||
// placement snaps instead of *transitioning in* from the unmounted
|
||||
// `left:0/width:0/transparent` fallback, which read as "no underline at
|
||||
// all" on a fresh page load (reported live by mara, reproduced here with
|
||||
// a zoomed pixel-level screenshot check — real, not a rendering fluke).
|
||||
// Every subsequent change (a real navigation) still animates normally.
|
||||
const [indicatorSettledOnce, setIndicatorSettledOnce] = useState(false);
|
||||
|
||||
// Open agent-terminal tabs — rendered inline in `.shell-nav` itself
|
||||
// (mara, PR review: "the dynamic tab should be in the top bar, not a
|
||||
// new one below" — an earlier cut had these as their own row under
|
||||
// the header; see the git history on this file for that version and
|
||||
// why it was reverted). Entirely separate from the fixed `NAV_ITEMS`
|
||||
// list above, so they get their own small component (`DynamicTabLink`)
|
||||
// rather than reusing `NavLink`.
|
||||
// Open agent-terminal tabs, drawn in the nav row after the fixed routes.
|
||||
const { tabs, close: closeTab, move: moveTabTo } = useDynamicTabs();
|
||||
const termGroups = useTermGroups();
|
||||
|
||||
|
|
@ -311,291 +184,84 @@ export function Shell({ children }: { children: ComponentChildren }) {
|
|||
const hideDeveloper = useHideDebug();
|
||||
const navItems = visibleNavItems(NAV_ITEMS, hideDeveloper);
|
||||
|
||||
// Applied once here, not inside `SettingsMenu` — every route mounts
|
||||
// through this one `<Shell>`, so the override takes effect regardless
|
||||
// of which page is showing or whether the menu's ever been opened,
|
||||
// and `useLocalSetting`'s same-tab subscription
|
||||
// (`@hive/shared/settings-storage.js`) means `SettingsMenu` changing
|
||||
// the stored value re-runs these effects without either component
|
||||
// needing a reference to the other.
|
||||
useApplyThemeOverride(THEME_KEY);
|
||||
useApplyMotionOverride(MOTION_KEY);
|
||||
useApplySolidBackgrounds(SOLID_KEY);
|
||||
|
||||
// Measures nav item `index`'s rect relative to `.shell-nav`.
|
||||
// `getBoundingClientRect()` on both elements at the same tick keeps
|
||||
// this scroll-position-agnostic — a difference of two
|
||||
// viewport-relative rects is scroll-invariant, no separate
|
||||
// scroll-offset bookkeeping needed.
|
||||
function measureIndex(index: number): IndicatorRect | null {
|
||||
const navEl = navRef.current;
|
||||
const item = navItems[index];
|
||||
const textEl = item ? textRefs.current[item.href] : null;
|
||||
if (!navEl || !item || !textEl) return null;
|
||||
const navRect = navEl.getBoundingClientRect();
|
||||
const textRect = textEl.getBoundingClientRect();
|
||||
return {
|
||||
// Plus the nav's own scroll: on a narrow screen it scrolls sideways, and
|
||||
// the indicator lives in the scrolled content.
|
||||
left: textRect.left - navRect.left + navEl.scrollLeft,
|
||||
top: textRect.bottom - navRect.top + navEl.scrollTop,
|
||||
width: textRect.width,
|
||||
accent: item.accent,
|
||||
};
|
||||
}
|
||||
|
||||
// Drives the indicator through every nav item between where it was
|
||||
// and the new active one — see the file-top comment for why (mara:
|
||||
// "navigating from a to c animates [a's colour] -> [b's colour] ->
|
||||
// [c's colour]"). Re-runs on navigation; a separate resize listener
|
||||
// below re-measures the already-settled position without re-hopping
|
||||
// (a reflow isn't a navigation).
|
||||
// The list changed (the components tab came or went), so the settled index
|
||||
// no longer names the same item: land directly on the active one again.
|
||||
useEffect(() => {
|
||||
settledIndexRef.current = -1;
|
||||
}, [hideDeveloper]);
|
||||
|
||||
useEffect(() => {
|
||||
const targetIndex = navItems.findIndex((item) => item.href === location);
|
||||
if (targetIndex === -1) {
|
||||
settledIndexRef.current = -1;
|
||||
setIndicator(null);
|
||||
return;
|
||||
}
|
||||
const fromIndex = settledIndexRef.current;
|
||||
// First mount, a route with no nav item just left, or reduced
|
||||
// motion: land directly, no intermediate hops to sweep through.
|
||||
if (fromIndex === -1 || prefersReducedMotion()) {
|
||||
settledIndexRef.current = targetIndex;
|
||||
setIndicator(measureIndex(targetIndex));
|
||||
return;
|
||||
}
|
||||
const step = targetIndex > fromIndex ? 1 : -1;
|
||||
let cancelled = false;
|
||||
let timeoutId: number | undefined;
|
||||
function hop(current: number) {
|
||||
const next = current + step;
|
||||
setIndicator(measureIndex(next));
|
||||
settledIndexRef.current = next;
|
||||
if (next !== targetIndex) {
|
||||
timeoutId = window.setTimeout(() => {
|
||||
if (!cancelled) hop(next);
|
||||
}, HOP_MS);
|
||||
}
|
||||
}
|
||||
hop(fromIndex);
|
||||
return () => {
|
||||
cancelled = true;
|
||||
if (timeoutId !== undefined) window.clearTimeout(timeoutId);
|
||||
};
|
||||
}, [location, hideDeveloper]);
|
||||
|
||||
// Fires the render *after* the indicator's first non-null commit —
|
||||
// deliberately one tick behind, not folded into the effect above,
|
||||
// because the instant/animated class has to still read "instant" on
|
||||
// the very render where `indicator` itself first goes non-null (that's
|
||||
// the snap this exists for); only from the render after that should
|
||||
// transitions be armed.
|
||||
useEffect(() => {
|
||||
if (indicator && !indicatorSettledOnce) setIndicatorSettledOnce(true);
|
||||
}, [indicator, indicatorSettledOnce]);
|
||||
|
||||
// Re-measures the current (already-settled) position on resize — the
|
||||
// nav's own `flex-wrap` means a link's position genuinely changes at
|
||||
// narrow widths, not just its route. Not part of the hop effect above
|
||||
// since a reflow shouldn't restart the sweep animation.
|
||||
useEffect(() => {
|
||||
function onResize() {
|
||||
if (settledIndexRef.current === -1) return;
|
||||
setIndicator(measureIndex(settledIndexRef.current));
|
||||
}
|
||||
window.addEventListener("resize", onResize);
|
||||
return () => window.removeEventListener("resize", onResize);
|
||||
}, []);
|
||||
|
||||
// Same re-measure, for the same "a reflow, not a navigation" reason —
|
||||
// now that the dynamic tabs render inline in `.shell-nav` (see the
|
||||
// `useDynamicTabs()` comment above), *closing* a background tab (one
|
||||
// that isn't the active route) shrinks the row without any navigation
|
||||
// firing to trigger the hop effect's own re-measure. Opening one
|
||||
// doesn't need this: `useDynamicTabs().open()` always navigates, so
|
||||
// the hop effect already covers that case.
|
||||
useEffect(() => {
|
||||
if (settledIndexRef.current === -1) return;
|
||||
setIndicator(measureIndex(settledIndexRef.current));
|
||||
}, [tabs.length]);
|
||||
|
||||
// `swarmName` stays `null` on a failed fetch or an unconfigured name, and
|
||||
// the header/title fall back to `DEFAULT_BRAND`; see `useSwarmName`.
|
||||
const brand = swarmName ?? DEFAULT_BRAND;
|
||||
// Per-route label so browser tabs of different pages tell apart: a
|
||||
// top-level route takes its nav label, a terminal route takes the
|
||||
// label its page registered as a dynamic tab. An unmatched path gets
|
||||
// the bare brand.
|
||||
// A top-level route takes its nav label, a terminal route the label its page
|
||||
// registered as a dynamic tab, and a page that set its own title keeps that.
|
||||
const pageTitle = usePageTitleValue();
|
||||
const pageLabel =
|
||||
pageTitle ??
|
||||
navItems.find((item) => item.href === location)?.label ??
|
||||
tabs.find((tab) => tab.href === location)?.label;
|
||||
useEffect(() => {
|
||||
document.title = pageLabel ? `${pageLabel} · ${brand}` : brand;
|
||||
}, [brand, pageLabel]);
|
||||
|
||||
// A new page starts at the top for the keyboard and a screen reader: the
|
||||
// focus goes to the page's container, not left on the link that was used.
|
||||
const firstPage = useRef(true);
|
||||
useEffect(() => {
|
||||
if (firstPage.current) {
|
||||
firstPage.current = false;
|
||||
return;
|
||||
}
|
||||
mainRef.current?.focus({ preventScroll: true });
|
||||
}, [location]);
|
||||
|
||||
// Same value the indicator itself is drawn with, including mid-sweep —
|
||||
// the brand text rides the identical hop sequence rather than
|
||||
// computing its own, so "the header's accent" reads as one thing
|
||||
// changing, not two things that happen to agree at rest.
|
||||
const navAccent = indicator?.accent ?? "var(--purple)";
|
||||
|
||||
return (
|
||||
<div class={"shell" + (isFullBleedRoute(location) ? " shell-full" : "")}>
|
||||
<a
|
||||
class="shell-skip-link"
|
||||
href="#main"
|
||||
onClick={(e) => {
|
||||
// A plain hash would hand the click to the router; move the focus
|
||||
// here instead.
|
||||
e.preventDefault();
|
||||
mainRef.current?.focus();
|
||||
}}
|
||||
>
|
||||
skip to content
|
||||
</a>
|
||||
<header class="shell-header">
|
||||
<Link href="/" class="shell-brand-link">
|
||||
<span
|
||||
class="shell-brand"
|
||||
// Same glow recipe as the active nav tab / panel titles, riding
|
||||
// `navAccent` — the same value `color` already uses here — so
|
||||
// the brand's glow tracks the identical hop sequence as its own
|
||||
// text colour instead of introducing a second, disagreeing
|
||||
// accent source.
|
||||
style={{
|
||||
color: navAccent,
|
||||
textShadow: `0 0 8px color-mix(in srgb, ${navAccent} 45%, transparent)`,
|
||||
}}
|
||||
<AppShell
|
||||
brand={brand}
|
||||
brandHref="/"
|
||||
items={navItems}
|
||||
location={location}
|
||||
LinkComponent={Link}
|
||||
pageLabel={pageLabel}
|
||||
// Only the start page draws an `<h1>` of its own (the swarm's name).
|
||||
heading={location !== "/"}
|
||||
fullBleed={isFullBleedRoute(location)}
|
||||
extraKey={tabs.length}
|
||||
navExtra={
|
||||
tabs.length > 0 && (
|
||||
<div
|
||||
class="shell-tabs"
|
||||
role="group"
|
||||
aria-label="open agent terminals"
|
||||
>
|
||||
{brand}
|
||||
</span>
|
||||
</Link>
|
||||
<nav class="shell-nav" aria-label="main" ref={navRef}>
|
||||
{navItems.map((item) => (
|
||||
<NavLink
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
label={item.label}
|
||||
active={item.href === location}
|
||||
accent={item.accent}
|
||||
textRef={(el) => {
|
||||
textRefs.current[item.href] = el;
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
{/* Shared sliding underline — see the file-top comment. Hidden
|
||||
(zero width) rather than unmounted when there's no active
|
||||
nav item (404), so it doesn't pop in with a stale position
|
||||
the next time a real nav item becomes active. */}
|
||||
<span
|
||||
class={
|
||||
"shell-nav-indicator" +
|
||||
(indicatorSettledOnce ? "" : " shell-nav-indicator-instant")
|
||||
}
|
||||
style={{
|
||||
left: `${indicator?.left ?? 0}px`,
|
||||
top: `${indicator?.top ?? 0}px`,
|
||||
width: `${indicator?.width ?? 0}px`,
|
||||
backgroundColor: indicator?.accent ?? "transparent",
|
||||
}}
|
||||
/>
|
||||
{/* Open agent-terminal tabs — inline in the same nav row as
|
||||
the static routes (mara's review call, see the
|
||||
`useDynamicTabs()` comment above). Only rendered when
|
||||
there's something to show — an always-present empty group
|
||||
would just be dead chrome for the far more common case of
|
||||
no open terminal tabs. `role="group"`, not a second `<nav>`:
|
||||
there's already exactly one nav landmark in this header. */}
|
||||
{tabs.length > 0 && (
|
||||
<div
|
||||
class="shell-tabs"
|
||||
role="group"
|
||||
aria-label="open agent terminals"
|
||||
>
|
||||
{tabs.map((tab) => {
|
||||
// A group's tab shows the group's live name, not the label it
|
||||
// was opened with, so a rename shows at once.
|
||||
const groupId = groupIdOf(tab.href);
|
||||
const group =
|
||||
groupId === null ? undefined : termGroups.find(groupId);
|
||||
return (
|
||||
<DynamicTabLink
|
||||
key={tab.href}
|
||||
href={tab.href}
|
||||
label={group === undefined ? tab.label : groupTitle(group)}
|
||||
active={tab.href === location}
|
||||
agent={terminalAgentOf(tab.href) ?? undefined}
|
||||
onMove={(from) => moveTabTo(from, tab.href)}
|
||||
onRename={
|
||||
groupId === null
|
||||
? undefined
|
||||
: (name) => termGroups.rename(groupId, name.trim())
|
||||
}
|
||||
onClose={() => {
|
||||
// Closing a group's tab is closing the group.
|
||||
if (groupId !== null) termGroups.remove(groupId);
|
||||
closeTab(tab.href);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</nav>
|
||||
{/* Single `margin-left: auto` on the wrapper, not on each menu
|
||||
individually — two adjacent flex items both set to
|
||||
`margin-left: auto` split the available space between them
|
||||
instead of sitting flush together at the right edge. */}
|
||||
<div class="shell-header-actions">
|
||||
<SettingsMenu themeKey={THEME_KEY} motionKey={MOTION_KEY}>
|
||||
<ShowThinkingSetting />
|
||||
<HideDebugSetting />
|
||||
<ExpandDetailsSetting />
|
||||
<SolidBackgroundsSetting storageKey={SOLID_KEY} />
|
||||
</SettingsMenu>
|
||||
{tabs.map((tab) => {
|
||||
// A group's tab shows the group's live name, not the label it
|
||||
// was opened with, so a rename shows at once.
|
||||
const groupId = groupIdOf(tab.href);
|
||||
const group =
|
||||
groupId === null ? undefined : termGroups.find(groupId);
|
||||
return (
|
||||
<DynamicTabLink
|
||||
key={tab.href}
|
||||
href={tab.href}
|
||||
label={group === undefined ? tab.label : groupTitle(group)}
|
||||
active={tab.href === location}
|
||||
agent={terminalAgentOf(tab.href) ?? undefined}
|
||||
onMove={(from) => moveTabTo(from, tab.href)}
|
||||
onRename={
|
||||
groupId === null
|
||||
? undefined
|
||||
: (name) => termGroups.rename(groupId, name.trim())
|
||||
}
|
||||
onClose={() => {
|
||||
// Closing a group's tab is closing the group.
|
||||
if (groupId !== null) termGroups.remove(groupId);
|
||||
closeTab(tab.href);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
settings={
|
||||
<>
|
||||
<ShowThinkingSetting />
|
||||
<HideDebugSetting />
|
||||
<ExpandDetailsSetting />
|
||||
</>
|
||||
}
|
||||
menus={
|
||||
<>
|
||||
<LinksMenu />
|
||||
<UserMenu />
|
||||
</div>
|
||||
</header>
|
||||
{/* Keyed by route so it remounts (and replays its entrance
|
||||
animation) on every navigation — see the file-top comment. */}
|
||||
<main
|
||||
id="main"
|
||||
tabIndex={-1}
|
||||
ref={mainRef}
|
||||
class={
|
||||
"shell-body" + (isFullBleedRoute(location) ? " shell-body-full" : "")
|
||||
}
|
||||
key={location}
|
||||
>
|
||||
{/* The page's name for a screen reader. Only the start page draws an
|
||||
`<h1>` of its own (the swarm's name), so it gets no second one;
|
||||
the document title is the only other place the name shows. */}
|
||||
{location !== "/" && (
|
||||
<h1 class="ui-visually-hidden">{pageLabel ?? brand}</h1>
|
||||
)}
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
themeKey={THEME_KEY}
|
||||
motionKey={MOTION_KEY}
|
||||
solidKey={SOLID_KEY}
|
||||
>
|
||||
{children}
|
||||
</AppShell>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
// `/agents/:name/terminal` (and a subagent's, under
|
||||
// `/agents/:name/subagents/:subagent/`) is full-bleed: the terminal fills
|
||||
// the whole viewport below the header bar, edge to edge (`shell-full` /
|
||||
// `shell-body-full` in Shell.css). It's a parameterized path, so one literal
|
||||
// `shell-body-full` in AppShell.css). It's a parameterized path, so one literal
|
||||
// string can't match every agent name.
|
||||
const FULL_BLEED_ROUTE_PATTERN =
|
||||
/^\/agents\/[^/]+(\/subagents\/[^/]+)?\/terminal$/;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* Page-level base only — component styles are colocated with their
|
||||
component (`./Shell.css` imported by shell/Shell.tsx, etc.) and
|
||||
component (`AppShell.css` imported by the shared AppShell, etc.) and
|
||||
land in the `main.css` companion esbuild emits alongside `main.js`
|
||||
(see build.mjs), not here. This file stays just the shared reset
|
||||
every page needs regardless of which components a route happens to
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* <Skeleton>: a tinted shape with a light band moving across it. Motion
|
||||
follows the page's setting, the same three rules the page switch uses
|
||||
(`shell/Shell.css`): off for an OS that asks for less motion, off when the
|
||||
(`app-shell/AppShell.css`): off for an OS that asks for less motion, off when the
|
||||
setting says reduce, back on when the setting says allow. Where it is off
|
||||
the shape is a plain tinted block. */
|
||||
.ui-skeleton {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* The slug: the signature line at the foot of a page. The shaded blocks pulse
|
||||
in a wave, each glyph delayed by its index (`--i`). Motion is gated the way
|
||||
`shell/Shell.css` gates its own: stilled under the OS preference and the
|
||||
`app-shell/AppShell.css` gates its own: stilled under the OS preference and the
|
||||
`data-motion` override, back on with `allow`. */
|
||||
.ui-slug {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
// the primitive before or alongside the first real page that needs it").
|
||||
//
|
||||
// `flex-wrap`, not a `@media` breakpoint — content-driven stacking, same
|
||||
// approach the shell's own nav row already uses (`shell/Shell.css`)
|
||||
// approach the shell's own nav row already uses (`app-shell/AppShell.css`)
|
||||
// rather than a second, independent magic-number breakpoint. No opinion
|
||||
// on what's inside either pane (a `Panel`, anything else) — same "own
|
||||
// the mechanics, not the content" split as `Card`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue