@hanzo/app 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/App.js CHANGED
@@ -280,5 +280,5 @@ function Window({ bar, betas }) {
280
280
  // scrolls inside, collapsed to its border (Projects drew blank). The rest of the row
281
281
  // beside the rail and the sidebar, never width 100%: a View does not shrink, so at the
282
282
  // row's full width again the pane stood past the window's edge.
283
- flex: 1, minW: 0, minH: 0, marginInlineStart: closed || alone ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, pb: `max(var(--pane-gap), ${FOOT})` }, children: [bar ? null : _jsx(Bar, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open, onChat: toChat, onDev: toDev }), _jsx(XStack, { "data-slot": "panes", flex: 1, display: "grid", gridTemplateColumns: "minmax(0, 1fr)", gridTemplateRows: "minmax(0, 1fr)", minW: 0, minH: 0, children: mode === 'chat' ? (_jsx(Split, { framed: true, children: _jsx(Chat, {}) })) : mode === 'tabs' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Hosted, { id: at.id, go: move }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflowY: "auto", overflowX: "hidden", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6' }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsx(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden' }), flex: 1, minW: 0, minH: 0, children: plans ? null : _jsx(Builder, { host: host, rail: false }) })) })] })] }), drawer.state === 'shut' ? null : (_jsx(Layer, { drawer: drawer, top: bar ? BAR : 0, children: _jsxs(XStack, { flex: 1, minH: 0, children: [_jsx(YStack, { "data-slot": "drawer-rail", shrink: 0, pt: "$2", children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), _jsx(YStack, { flex: 1, minW: 0, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar }) })] }) })), finding ? _jsx(Search, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null] }) }) }) }) }));
283
+ flex: 1, minW: 0, minH: 0, marginInlineStart: closed || alone ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, pb: `max(var(--pane-gap), ${FOOT})` }, children: [bar ? null : _jsx(Bar, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open, onChat: toChat, onDev: toDev }), _jsx(XStack, { "data-slot": "panes", flex: 1, display: "grid", gridTemplateAreas: '"pane side"', gridTemplateColumns: "minmax(0, 1fr) auto", gridTemplateRows: "minmax(0, 1fr)", minW: 0, minH: 0, children: mode === 'chat' ? (_jsx(Split, { framed: true, children: _jsx(Chat, {}) })) : mode === 'tabs' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(Suspense, { fallback: null, children: _jsx(Hosted, { id: at.id, go: move }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflowY: "auto", overflowX: "hidden", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6' }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsx(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden' }), flex: 1, minW: 0, minH: 0, children: plans ? null : _jsx(Builder, { host: host, rail: false }) })) })] })] }), drawer.state === 'shut' ? null : (_jsx(Layer, { drawer: drawer, top: bar ? BAR : 0, children: _jsxs(XStack, { flex: 1, minH: 0, children: [_jsx(YStack, { "data-slot": "drawer-rail", shrink: 0, pt: "$2", children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), _jsx(YStack, { flex: 1, minW: 0, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar }) })] }) })), finding ? _jsx(Search, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null] }) }) }) }) }));
284
284
  }
package/dist/Chat.js CHANGED
@@ -41,7 +41,7 @@ import { Face, brief as castBrief, join, roleOf, castTurn, roster as rosterLine,
41
41
  import { cleanForSpeech, speakAgent } from "./speech.js";
42
42
  import { AgentMaker, HOUSE, useAgentShelf, useCrew } from "./crew.js";
43
43
  import { called } from "./team.js";
44
- import { Anchor, Box, Button, Switch, Text, View, XStack, YStack } from "@hanzo/ui";
44
+ import { Anchor, Box, Button, Text, Tooltip, TooltipContent, TooltipTrigger, View, XStack, YStack } from "@hanzo/ui";
45
45
  import { useMedia } from "@hanzo/gui";
46
46
  import { given, tidy } from "./lib/title.js";
47
47
  import { useIam, useIamToken } from "@hanzo/iam/react";
@@ -73,7 +73,7 @@ import { enter, LOGIN } from './lib/destination.js';
73
73
  import { first } from './lib/first.js';
74
74
  import { BAD } from "./lib/mix.js";
75
75
  import { brand } from './where.js';
76
- import { BAND } from './ground.js';
76
+ import { BAND, HEAD, TOUCH_HEAD, inPane } from './ground.js';
77
77
  import { UsageControl } from './Usage.js';
78
78
  import { shared, useChatPreferences } from './lib/chatPreferences.js';
79
79
  import { handleHint } from './hint.js';
@@ -1491,7 +1491,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1491
1491
  : undefined
1492
1492
  : undefined,
1493
1493
  };
1494
- return (_jsxs(YStack, { display: "grid", gridTemplateRows: "auto minmax(0, 1fr)", width: "100%", height: "100%", minH: 0, position: "relative", "data-slot": "conversation",
1494
+ return (_jsxs(YStack, { width: "100%", height: "100%", minH: 0, position: "relative", "data-slot": "conversation",
1495
1495
  // A LINK IN AN ANSWER OPENS IN A TAB beside the conversation when the tab
1496
1496
  // can show it — a site or preview we host — and in a browser tab of its
1497
1497
  // own otherwise, as a modified click always does.
@@ -1533,77 +1533,82 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
1533
1533
  }, children: [_jsx(Schedule, { open: plan !== null, onOpenChange: (open) => {
1534
1534
  if (!open)
1535
1535
  setPlan(null);
1536
- }, prompt: plan ?? "", model: model, models: models.map((m) => ({ id: m.id, name: nameOf(m.id, listed) })) }), dragging ? (_jsx(YStack, { "aria-hidden": true, position: "absolute", t: 0, r: 0, b: 0, l: 0, z: 10, items: "center", justify: "center", bg: "var(--surface-scrim)", borderWidth: 2, borderStyle: "dashed", borderColor: "$borderColor", rounded: "var(--pane-round)", pointerEvents: "none", children: _jsxs(XStack, { items: "center", gap: "$2", px: "$4", py: "$2.5", rounded: "$10", bg: "$background", borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Paperclip, { size: 15, "aria-hidden": true }), _jsx(Text, { fontSize: "$4", color: "$ink", children: t("Drop files to attach") })] }) })) : null, _jsxs(XStack, { "data-slot": "conversation-head", height: BAND, display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto", items: "center", gap: "$3", paddingInlineStart: "$4", paddingInlineEnd: "$2", shrink: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, "$max-md": !mine && !cast.length ? { display: 'none' } : undefined, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, children: [mine ? (_jsx(Text, { fontSize: 15, lineHeight: 20, color: "$ink", numberOfLines: 1, shrink: 1, minW: 0, children: tidy(mine.title) })) : null, cast.length ? (_jsx(XStack, { role: "list", "aria-label": t("Agents in this chat"), items: "center", gap: "$1.5", minW: 0, overflowX: "auto", "$platform-web": { scrollbarWidth: "none" }, children: cast.map((name) => (_jsxs(XStack, { role: "listitem", items: "center", gap: "$1.5", paddingInlineStart: "$1", paddingInlineEnd: "$0.5", py: "$0.5", rounded: 999, borderWidth: 1, borderColor: "$borderColor", shrink: 0, children: [_jsx(Face, { src: faces[name]?.avatar ?? (name === withWhom ? portrait : undefined), emoji: faces[name]?.emoji ?? (name === withWhom ? persona?.emoji : undefined), name: name, size: 22 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$color", numberOfLines: 1, display: "none", $sm: { display: "flex" }, children: name }), _jsx(Box, { render: "button", onClick: () => openAgent(name), "aria-label": t("Remove {name} from this chat", { name }), title: t("Remove {name}", { name }), width: 24, height: 24, rounded: 999, items: "center", justify: "center", hoverStyle: { bg: "$hover" }, children: _jsx(X, { size: 13, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }) })] }, name))) })) : null] }), _jsxs(XStack, { "data-slot": "conversation-controls", "data-tauri-drag-region": "false", items: "center", gap: 4, shrink: 0, children: [free ? (_jsxs(Button, { size: "xs", variant: "outline", "data-slot": "header-upgrade", gap: "$1.5", px: "$2.5", py: "$1", rounded: "$4", cursor: "pointer", hoverStyle: { bg: 'var(--white-10)' }, onPress: () => window.location.assign(payUrl('/cart', { org: org(), returnUrl: window.location.href })), "aria-label": t("Upgrade plan"), children: [_jsx(Sparkles, { size: 13, color: "var(--primary)", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Upgrade plan") })] })) : null, open ? _jsx(Share, { thread: open }) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, { children: _jsx(ThreadMore, { t: currentThread }) }) })) : (_jsxs(XStack, { render: "button", "data-slot": "header-private-chat", "aria-label": t("Private chat mode"), "aria-pressed": forgetful, ...{ title: forgetful ? t("Private chat enabled: messages will not be saved") : t("Private chat: forgetful mode") }, items: "center", gap: "$1.5", px: "$2", py: "$1", height: 28, rounded: "$3", cursor: "pointer", borderWidth: 1, borderColor: forgetful ? 'var(--primary)' : '$borderColor', bg: forgetful ? 'var(--primary-10, var(--white-10))' : 'transparent', hoverStyle: { bg: forgetful ? 'var(--primary-15, var(--white-15))' : '$hover' }, onPress: () => setForgetful(!forgetful), children: [_jsx(Ghost, { size: 13, strokeWidth: 1.75, color: forgetful ? 'var(--primary)' : 'var(--soft, var(--muted-foreground))', "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: forgetful ? '600' : '500', color: forgetful ? 'var(--primary)' : '$soft', children: t("Private") }), _jsx(Switch, { size: "sm", checked: forgetful, pointerEvents: "none" })] })), _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Summary, { sections: sections, onOpen: () => setPanel(true), label: t("Summary") }) }), _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }) })] })] }), wide && aside !== null ? (_jsx(Side, { children: _jsx(Panel, { side: deck, kinds: NONE, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) })) : null, !wide && panel ? _jsx(Panel, { side: deck, kinds: NONE, sheet: true, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) : null, _jsx(ChatSurface, { ...chat, messages: shown, send: guarded,
1537
- // THE COMPOSER IS FIXED TO THE FOOT, on a laptop and on a phone, empty or
1538
- // not: while nothing has been said the opening (the heading) stands at the
1539
- // foot of the height above it; once a turn exists the transcript scrolls
1540
- // under it. Over the keyboard, from the first moment.
1541
- // AS IT WAS WRITTEN. The package renders a turn's words plainly and
1542
- // says so — it ships no markdown pipeline because the plugin set is the
1543
- // surface's to choose — so an answer arrived here reading "```ts" with
1544
- // the backticks on screen. `Prose` is the site's one renderer, reading
1545
- // with the same `marked` the legal pages parse with and drawing every
1546
- // token in gui elements, and the shared view draws through it too.
1547
- body: (turn) => {
1548
- if (String(turn.id).startsWith(`${FAILED}:`)) {
1549
- const question = shown.find((one) => one.id === String(turn.id).slice(FAILED.length + 1));
1550
- return question ? failure(question) : null;
1551
- }
1552
- // A QUESTION THAT CARRIED PICTURES draws them beside its words.
1553
- if (turn.role === "user" && Array.isArray(turn.content)) {
1554
- const parts = partsOf(turn.content);
1555
- const asked = parts.flatMap((p) => (p.type === "text" ? [p.text] : [])).join("\n");
1556
- return (_jsxs(YStack, { gap: "$1", children: [_jsx(Parts, { parts: parts, prose: (text) => _jsx(Prose, { text: text }) }), !anonymous && asked ? _jsx(Plan, { onPress: () => setPlan(asked) }) : null] }));
1557
- }
1558
- const said = typeof turn.content === "string" ? turn.content : "";
1559
- // A QUESTION THAT CARRIED FILES draws its words and the files' chips;
1560
- // the passages it handed the model are the model's to read, not ours.
1561
- if (turn.role === "user" && said) {
1562
- const read = told(said);
1563
- if (read.carried)
1564
- return (_jsxs(YStack, { gap: "$1", children: [_jsx(Carried, { text: read.text, attached: read.carried.attached, reused: read.carried.reused, onOpen: openFile, onSave: anonymous ? undefined : (url, id, f) => keepOne(url, id, f.name, f.type) }), !anonymous && read.text ? _jsx(Plan, { onPress: () => setPlan(read.text) }) : null] }));
1565
- }
1566
- // WHILE THE ANSWER HAS NO WORDS YET: who is answering (the agents the
1567
- // question addresses, or the whole cast when it names nobody), and the
1568
- // model's reasoning as it streams (`reasoning` on the turn), dimmed and
1569
- // cut to its last lines.
1570
- const thought = turn.role === "assistant" && !said && chat.streaming ? (turn.reasoning ?? "").trim() : "";
1571
- if (turn.role === "assistant" && !said && chat.streaming && (cast.length || thought)) {
1572
- const q = [...shown].reverse().find((one) => one.role === "user");
1573
- const whom = cast.length ? addressed(words(q?.content), cast) : [];
1574
- return (_jsxs(YStack, { gap: "$1", "data-slot": "thinking", children: [_jsx(Text, { fontSize: "$2", color: "$soft", children: whom.length
1575
- ? whom.length > 1
1576
- ? thought
1577
- ? t("{names} are thinking…", { names: join(whom, t) })
1578
- : t("{names} are answering…", { names: join(whom, t) })
1579
- : thought
1580
- ? t("{names} is thinking…", { names: join(whom, t) })
1581
- : t("{names} is answering…", { names: join(whom, t) })
1582
- : t("Thinking…") }), thought ? (_jsx(Text, { fontSize: "$2", color: "$soft", opacity: 0.72, "data-slot": "thought", children: thought.length > THOUGHT ? `…${thought.slice(-THOUGHT).replace(/^\S*\s/, "")}` : thought })) : null] }));
1583
- }
1584
- // A CAST'S ANSWER IS SEVERAL PEOPLE'S. Each opens a line with their
1585
- // name, as the brief asks, so each is drawn under their own face and
1586
- // read in their own voice. A reply that names nobody is drawn whole.
1587
- const parts = turn.role === "assistant" ? speakers(said, known) : null;
1588
- if (parts && parts.some((part) => part.who)) {
1589
- // Asked and silent: an agent the question addressed who has no part
1590
- // in this reply.
1591
- const at = shown.findIndex((one) => one.id === turn.id);
1592
- const q = shown.slice(0, at).reverse().find((one) => one.role === "user");
1593
- const silent = cast.length > 1 && !(chat.streaming && at === shown.length - 1)
1594
- ? addressed(words(q?.content), cast).filter((name) => !parts.some((part) => part.who?.toLowerCase() === name.toLowerCase()))
1595
- : [];
1596
- return (_jsxs(YStack, { gap: "$3", children: [parts.map((part, i) => (_jsxs(YStack, { gap: "$1", children: [part.who ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Face, { src: faces[part.who]?.avatar, emoji: faces[part.who]?.emoji, name: part.who, size: 20 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: part.who })] })) : null, _jsx(Prose, { text: part.text }), part.text ? _jsx(Reply, { text: part.text, listen: listen(part.who ?? withWhom ?? undefined), onOpen: opener(part.text) }) : null] }, i))), silent.length ? (_jsx(Text, { fontSize: "$2", color: "$soft", children: t("No answer from {names} in this reply.", { names: join(silent, t) }) })) : null, byline(turn.id)] }));
1597
- }
1598
- return (_jsxs(YStack, { gap: "$1", children: [_jsx(Prose, { text: said }), turn.role === "assistant" && said ? _jsx(Reply, { text: said, listen: listen(withWhom ?? undefined), onOpen: opener(said) }) : null, turn.role === "assistant" && said ? byline(turn.id) : null, turn.role === "user" && said && !anonymous ? _jsx(Plan, { onPress: () => setPlan(said) }) : null] }));
1599
- },
1600
- // The page's ONE heading, and it belongs to the empty transcript rather
1601
- // than to a signed-out branch — the branch is gone, and the heading went
1602
- // with it when it did. `Ask` passes its own, because the page embedding
1603
- // it already has an `<h1>` and a second is the defect that took the
1604
- // landings off /chat and /dev.
1605
- empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", display: "grid", gridTemplateRows: "1fr auto", items: "center", width: "100%", height: "100%", pt: "$6", pb: "$2", children: [cast.length > 1 ? (_jsx(XStack, { items: "center", justify: "center", mb: "$4", children: cast.map((name, i) => (_jsx(Box, { marginInlineStart: i ? -16 : 0, rounded: 40, borderWidth: 2, borderColor: "$background", z: cast.length - i, children: _jsx(Face, { src: faces[name]?.avatar, emoji: faces[name]?.emoji, name: name, size: 72 }) }, name))) })) : portrait ? (_jsx(Box, { width: 160, height: 160, rounded: 24, overflow: "hidden", borderWidth: 2, borderColor: "var(--white-15)", boxShadow: "0 10px 24px color-mix(in srgb, var(--pure-black) 70%, transparent)", mb: "$4", bg: "var(--neutral-900)", children: _jsx(View, { render: _jsx("img", { src: portrait, alt: withWhom }), width: "100%", height: "100%", objectFit: "cover" }) })) : null, cast.length === 1 && !portrait ? (_jsx(Box, { mb: "$3", children: _jsx(Face, { emoji: mate?.emoji ?? persona?.emoji, name: withWhom, size: 72 }) })) : null, _jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$7", fontWeight: "700", color: "$ink", text: "center", mb: "$1", children: join(cast, t) || heading || (firstName ? t("What’s up, {name}?", { name: firstName }) : t("What’s up?")) }), cast.length === 1 && (mate?.description ?? persona?.description) ? (_jsx(Text, { fontSize: "$3", color: "$soft", text: "center", maxW: 500, mb: "$4", lineHeight: "$4", children: mate?.description ?? persona?.description })) : null] })),
1606
- // The transcript reads at the same measure. `Thread` defaults to 768
1607
- // itself; handing it the column here is what lets Width reach it.
1608
- column: { maxW: MEASURE }, composer: composer }), _jsx(AgentMaker, {}), carry.dialog, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
1536
+ }, prompt: plan ?? "", model: model, models: models.map((m) => ({ id: m.id, name: nameOf(m.id, listed) })) }), dragging ? (_jsx(YStack, { "aria-hidden": true, position: "absolute", t: 0, r: 0, b: 0, l: 0, z: 10, items: "center", justify: "center", bg: "var(--surface-scrim)", borderWidth: 2, borderStyle: "dashed", borderColor: "$borderColor", rounded: "var(--pane-round)", pointerEvents: "none", children: _jsxs(XStack, { items: "center", gap: "$2", px: "$4", py: "$2.5", rounded: "$10", bg: "$background", borderWidth: 1, borderColor: "$borderColor", children: [_jsx(Paperclip, { size: 15, "aria-hidden": true }), _jsx(Text, { fontSize: "$4", color: "$ink", children: t("Drop files to attach") })] }) })) : null, _jsxs(XStack, { "data-slot": "conversation-head",
1537
+ // On the rail's line from a tablet up (HEAD, less the pane's edge); a phone's own bar is BAND.
1538
+ height: BAND, $md: { height: inPane(HEAD) }, $touchable: { height: inPane(TOUCH_HEAD) }, display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto", items: "center", gap: "$3", paddingInlineStart: "$4", paddingInlineEnd: "$2", shrink: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, "$max-md": !mine && !cast.length ? { display: 'none' } : undefined, children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, children: [mine ? (_jsx(Text, { fontSize: 15, lineHeight: 20, color: "$ink", numberOfLines: 1, shrink: 1, minW: 0, children: tidy(mine.title) })) : null, cast.length ? (_jsx(XStack, { role: "list", "aria-label": t("Agents in this chat"), items: "center", gap: "$1.5", minW: 0, overflowX: "auto", "$platform-web": { scrollbarWidth: "none" }, children: cast.map((name) => (_jsxs(XStack, { role: "listitem", items: "center", gap: "$1.5", paddingInlineStart: "$1", paddingInlineEnd: "$0.5", py: "$0.5", rounded: 999, borderWidth: 1, borderColor: "$borderColor", shrink: 0, children: [_jsx(Face, { src: faces[name]?.avatar ?? (name === withWhom ? portrait : undefined), emoji: faces[name]?.emoji ?? (name === withWhom ? persona?.emoji : undefined), name: name, size: 22 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$color", numberOfLines: 1, display: "none", $sm: { display: "flex" }, children: name }), _jsx(Box, { render: "button", onClick: () => openAgent(name), "aria-label": t("Remove {name} from this chat", { name }), title: t("Remove {name}", { name }), width: 24, height: 24, rounded: 999, items: "center", justify: "center", hoverStyle: { bg: "$hover" }, children: _jsx(X, { size: 13, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }) })] }, name))) })) : null] }), _jsxs(XStack, { "data-slot": "conversation-controls", "data-tauri-drag-region": "false", items: "center", gap: 4, shrink: 0, children: [free ? (_jsxs(Button, { size: "xs", variant: "outline", "data-slot": "header-upgrade", gap: "$1.5", px: "$2.5", py: "$1", rounded: "$4", cursor: "pointer", hoverStyle: { bg: 'var(--white-10)' }, onPress: () => window.location.assign(payUrl('/cart', { org: org(), returnUrl: window.location.href })), "aria-label": t("Upgrade plan"), children: [_jsx(Sparkles, { size: 13, color: "var(--primary)", "aria-hidden": true }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Upgrade plan") })] })) : null, open ? _jsx(Share, { thread: open }) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, { children: _jsx(ThreadMore, { t: currentThread }) }) })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "data-slot": "header-private-chat", "aria-label": t("Private chat"), "aria-pressed": forgetful, width: 32, height: 32, items: "center", justify: "center", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: "var(--ring)" }, onPress: () => setForgetful(!forgetful), children: _jsx(Ghost, { size: 16, strokeWidth: 1.75, color: forgetful ? "var(--foreground)" : "var(--muted-foreground)", fill: forgetful ? "currentColor" : "none", "aria-hidden": true }) }) }), _jsx(TooltipContent, { children: forgetful ? t("Private chat is on: this conversation is not saved") : t("Private chat") })] })), _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Summary, { sections: sections, onOpen: () => setPanel(true), label: t("Summary") }) }), _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }) })] })] }), wide && aside !== null ? (_jsx(Side, { children: _jsx(Panel, { side: deck, kinds: NONE, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) })) : null, !wide && panel ? _jsx(Panel, { side: deck, kinds: NONE, sheet: true, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) : null, _jsx(YStack, { "data-slot": "talk", flex: 1, minH: 0, children: _jsx(ChatSurface, { ...chat, messages: shown, send: guarded,
1539
+ // WHILE NOTHING HAS BEEN SAID, from a tablet up, the opening and the
1540
+ // composer are one pair centred in the pane (`center`: rows `1fr auto auto
1541
+ // 1fr`), so the heading reads close above the field and nothing stands at
1542
+ // the window's foot (owner, 2026-10-30). A phone keeps the composer at the
1543
+ // foot, over the keyboard, from the first moment; once a turn exists every
1544
+ // width does, and the transcript scrolls under it.
1545
+ center: media.md,
1546
+ // AS IT WAS WRITTEN. The package renders a turn's words plainly and
1547
+ // says so — it ships no markdown pipeline because the plugin set is the
1548
+ // surface's to choose — so an answer arrived here reading "```ts" with
1549
+ // the backticks on screen. `Prose` is the site's one renderer, reading
1550
+ // with the same `marked` the legal pages parse with and drawing every
1551
+ // token in gui elements, and the shared view draws through it too.
1552
+ body: (turn) => {
1553
+ if (String(turn.id).startsWith(`${FAILED}:`)) {
1554
+ const question = shown.find((one) => one.id === String(turn.id).slice(FAILED.length + 1));
1555
+ return question ? failure(question) : null;
1556
+ }
1557
+ // A QUESTION THAT CARRIED PICTURES draws them beside its words.
1558
+ if (turn.role === "user" && Array.isArray(turn.content)) {
1559
+ const parts = partsOf(turn.content);
1560
+ const asked = parts.flatMap((p) => (p.type === "text" ? [p.text] : [])).join("\n");
1561
+ return (_jsxs(YStack, { gap: "$1", children: [_jsx(Parts, { parts: parts, prose: (text) => _jsx(Prose, { text: text }) }), !anonymous && asked ? _jsx(Plan, { onPress: () => setPlan(asked) }) : null] }));
1562
+ }
1563
+ const said = typeof turn.content === "string" ? turn.content : "";
1564
+ // A QUESTION THAT CARRIED FILES draws its words and the files' chips;
1565
+ // the passages it handed the model are the model's to read, not ours.
1566
+ if (turn.role === "user" && said) {
1567
+ const read = told(said);
1568
+ if (read.carried)
1569
+ return (_jsxs(YStack, { gap: "$1", children: [_jsx(Carried, { text: read.text, attached: read.carried.attached, reused: read.carried.reused, onOpen: openFile, onSave: anonymous ? undefined : (url, id, f) => keepOne(url, id, f.name, f.type) }), !anonymous && read.text ? _jsx(Plan, { onPress: () => setPlan(read.text) }) : null] }));
1570
+ }
1571
+ // WHILE THE ANSWER HAS NO WORDS YET: who is answering (the agents the
1572
+ // question addresses, or the whole cast when it names nobody), and the
1573
+ // model's reasoning as it streams (`reasoning` on the turn), dimmed and
1574
+ // cut to its last lines.
1575
+ const thought = turn.role === "assistant" && !said && chat.streaming ? (turn.reasoning ?? "").trim() : "";
1576
+ if (turn.role === "assistant" && !said && chat.streaming && (cast.length || thought)) {
1577
+ const q = [...shown].reverse().find((one) => one.role === "user");
1578
+ const whom = cast.length ? addressed(words(q?.content), cast) : [];
1579
+ return (_jsxs(YStack, { gap: "$1", "data-slot": "thinking", children: [_jsx(Text, { fontSize: "$2", color: "$soft", children: whom.length
1580
+ ? whom.length > 1
1581
+ ? thought
1582
+ ? t("{names} are thinking…", { names: join(whom, t) })
1583
+ : t("{names} are answering…", { names: join(whom, t) })
1584
+ : thought
1585
+ ? t("{names} is thinking…", { names: join(whom, t) })
1586
+ : t("{names} is answering…", { names: join(whom, t) })
1587
+ : t("Thinking…") }), thought ? (_jsx(Text, { fontSize: "$2", color: "$soft", opacity: 0.72, "data-slot": "thought", children: thought.length > THOUGHT ? `…${thought.slice(-THOUGHT).replace(/^\S*\s/, "")}` : thought })) : null] }));
1588
+ }
1589
+ // A CAST'S ANSWER IS SEVERAL PEOPLE'S. Each opens a line with their
1590
+ // name, as the brief asks, so each is drawn under their own face and
1591
+ // read in their own voice. A reply that names nobody is drawn whole.
1592
+ const parts = turn.role === "assistant" ? speakers(said, known) : null;
1593
+ if (parts && parts.some((part) => part.who)) {
1594
+ // Asked and silent: an agent the question addressed who has no part
1595
+ // in this reply.
1596
+ const at = shown.findIndex((one) => one.id === turn.id);
1597
+ const q = shown.slice(0, at).reverse().find((one) => one.role === "user");
1598
+ const silent = cast.length > 1 && !(chat.streaming && at === shown.length - 1)
1599
+ ? addressed(words(q?.content), cast).filter((name) => !parts.some((part) => part.who?.toLowerCase() === name.toLowerCase()))
1600
+ : [];
1601
+ return (_jsxs(YStack, { gap: "$3", children: [parts.map((part, i) => (_jsxs(YStack, { gap: "$1", children: [part.who ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Face, { src: faces[part.who]?.avatar, emoji: faces[part.who]?.emoji, name: part.who, size: 20 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: part.who })] })) : null, _jsx(Prose, { text: part.text }), part.text ? _jsx(Reply, { text: part.text, listen: listen(part.who ?? withWhom ?? undefined), onOpen: opener(part.text) }) : null] }, i))), silent.length ? (_jsx(Text, { fontSize: "$2", color: "$soft", children: t("No answer from {names} in this reply.", { names: join(silent, t) }) })) : null, byline(turn.id)] }));
1602
+ }
1603
+ return (_jsxs(YStack, { gap: "$1", children: [_jsx(Prose, { text: said }), turn.role === "assistant" && said ? _jsx(Reply, { text: said, listen: listen(withWhom ?? undefined), onOpen: opener(said) }) : null, turn.role === "assistant" && said ? byline(turn.id) : null, turn.role === "user" && said && !anonymous ? _jsx(Plan, { onPress: () => setPlan(said) }) : null] }));
1604
+ },
1605
+ // The page's ONE heading, and it belongs to the empty transcript rather
1606
+ // than to a signed-out branch — the branch is gone, and the heading went
1607
+ // with it when it did. `Ask` passes its own, because the page embedding
1608
+ // it already has an `<h1>` and a second is the defect that took the
1609
+ // landings off /chat and /dev.
1610
+ empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", items: "center", justify: "flex-end", width: "100%", height: "100%", pt: "$6", pb: "$2", children: [cast.length > 1 ? (_jsx(XStack, { items: "center", justify: "center", mb: "$4", children: cast.map((name, i) => (_jsx(Box, { marginInlineStart: i ? -16 : 0, rounded: 40, borderWidth: 2, borderColor: "$background", z: cast.length - i, children: _jsx(Face, { src: faces[name]?.avatar, emoji: faces[name]?.emoji, name: name, size: 72 }) }, name))) })) : portrait ? (_jsx(Box, { width: 160, height: 160, rounded: 24, overflow: "hidden", borderWidth: 2, borderColor: "var(--white-15)", boxShadow: "0 10px 24px color-mix(in srgb, var(--pure-black) 70%, transparent)", mb: "$4", bg: "var(--neutral-900)", children: _jsx(View, { render: _jsx("img", { src: portrait, alt: withWhom }), width: "100%", height: "100%", objectFit: "cover" }) })) : null, cast.length === 1 && !portrait ? (_jsx(Box, { mb: "$3", children: _jsx(Face, { emoji: mate?.emoji ?? persona?.emoji, name: withWhom, size: 72 }) })) : null, _jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$7", fontWeight: "700", color: "$ink", text: "center", mb: "$1", children: join(cast, t) || heading || (firstName ? t("What’s up, {name}?", { name: firstName }) : t("What’s up?")) }), cast.length === 1 && (mate?.description ?? persona?.description) ? (_jsx(Text, { fontSize: "$3", color: "$soft", text: "center", maxW: 500, mb: "$4", lineHeight: "$4", children: mate?.description ?? persona?.description })) : null] })),
1611
+ // The transcript reads at the same measure. `Thread` defaults to 768
1612
+ // itself; handing it the column here is what lets Width reach it.
1613
+ column: { maxW: MEASURE }, composer: composer }) }), _jsx(AgentMaker, {}), carry.dialog, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
1609
1614
  }
@@ -8,6 +8,16 @@ export interface OrganizationItem {
8
8
  role?: string;
9
9
  isPersonal?: boolean;
10
10
  }
11
+ /**
12
+ * The organizations a person belongs to (the account's and IAM's, merged by
13
+ * id), the one this page works in, and how to choose another. The dropdown and
14
+ * the rooms' org rail read the same list.
15
+ */
16
+ export declare function useOrgList(): {
17
+ orgs: OrganizationItem[];
18
+ active: string;
19
+ choose: (id: string) => void;
20
+ };
11
21
  export declare function OrgSwitcherDropdown({ open, onClose, activeOrgId, onSelect, align, side, triggerRef, }: {
12
22
  open: boolean;
13
23
  onClose: () => void;
@@ -30,3 +40,11 @@ export declare function OrgSwitcherDropdown({ open, onClose, activeOrgId, onSele
30
40
  * IAM answered, which is also the id a press would have switched to.
31
41
  */
32
42
  export declare function TopOrgSelector(): import("react").JSX.Element;
43
+ /**
44
+ * The organizations as tiles down the far left, as a team chat draws them:
45
+ * each its logo, or its initial in its own hue (@hanzo/ui `Avatar` seeded on its
46
+ * id, as the org chooser and the landing's preview draw it), the one this page
47
+ * works in ringed, and "+" under them for the chooser, where another is made or
48
+ * joined. A press works in that organization.
49
+ */
50
+ export declare function Tiles(): import("react").JSX.Element;
@@ -5,10 +5,10 @@ import { useI18n } from '@hanzo/i18n/react';
5
5
  import { Check, ChevronDown, Plus, Settings } from 'lucide-react';
6
6
  import { HanzoMark } from '@hanzogui/shell';
7
7
  import { useOrganizations } from '@hanzo/iam/react';
8
- import { Button } from '@hanzo/ui';
8
+ import { Avatar, Button } from '@hanzo/ui';
9
9
  import { useAccount } from './lib/account.js';
10
10
  import { iam } from './lib/api.js';
11
- import { pick } from './lib/session.js';
11
+ import { CHOOSE, pick } from './lib/session.js';
12
12
  import { Text, View, XStack, YStack } from '@hanzo/gui';
13
13
  import { site } from './where.js';
14
14
  import { settings } from './lib/host.js';
@@ -16,10 +16,46 @@ import { settings } from './lib/host.js';
16
16
  const FLOOR = 10;
17
17
  /** A row at the foot of the menu that leaves for another page: a ghost Button, label at the start. */
18
18
  const LINK = { variant: 'ghost', size: 'sm', width: '100%', justify: 'flex-start' };
19
+ /**
20
+ * The organizations a person belongs to (the account's and IAM's, merged by
21
+ * id), the one this page works in, and how to choose another. The dropdown and
22
+ * the rooms' org rail read the same list.
23
+ */
24
+ export function useOrgList() {
25
+ const { organizations: iamOrgs, switchOrg, currentOrg, currentOrgId } = useOrganizations() || {};
26
+ const { organizations: accountOrgs, switchOrganization, currentOrganization } = useAccount() || {};
27
+ const orgs = useMemo(() => {
28
+ const map = new Map();
29
+ for (const o of [...(accountOrgs ?? []), ...(iamOrgs ?? [])]) {
30
+ const item = o;
31
+ const id = item.id || item.name;
32
+ if (id && !map.has(id)) {
33
+ map.set(id, {
34
+ id,
35
+ name: item.name || id,
36
+ displayName: item.displayName || item.name || id,
37
+ logo: item.logo || item.avatar,
38
+ role: item.role || 'member',
39
+ isPersonal: Boolean(item.isPersonal),
40
+ });
41
+ }
42
+ }
43
+ return Array.from(map.values());
44
+ }, [accountOrgs, iamOrgs]);
45
+ const current = (currentOrganization || currentOrg);
46
+ const active = current?.name || current?.id || currentOrgId || '';
47
+ const choose = (id) => {
48
+ pick(id);
49
+ if (switchOrg)
50
+ switchOrg(id);
51
+ if (switchOrganization)
52
+ switchOrganization(id);
53
+ };
54
+ return { orgs, active, choose };
55
+ }
19
56
  export function OrgSwitcherDropdown({ open, onClose, activeOrgId, onSelect, align = 'left', side = 'below', triggerRef, }) {
20
57
  const { t } = useI18n();
21
- const { organizations: iamOrgs, switchOrg } = useOrganizations() || {};
22
- const { organizations: accountOrgs, switchOrganization } = useAccount() || {};
58
+ const { orgs, choose } = useOrgList();
23
59
  const menuRef = useRef(null);
24
60
  useEffect(() => {
25
61
  if (!open)
@@ -45,40 +81,6 @@ export function OrgSwitcherDropdown({ open, onClose, activeOrgId, onSelect, alig
45
81
  document.removeEventListener('keydown', handleKeyDown);
46
82
  };
47
83
  }, [open, onClose, triggerRef]);
48
- const orgs = useMemo(() => {
49
- const map = new Map();
50
- // Add detected account orgs
51
- for (const o of (accountOrgs ?? [])) {
52
- const item = o;
53
- const id = item.id || item.name;
54
- if (id) {
55
- map.set(id, {
56
- id,
57
- name: item.name || id,
58
- displayName: item.displayName || item.name || id,
59
- logo: item.logo || item.avatar,
60
- role: item.role || 'member',
61
- isPersonal: Boolean(item.isPersonal),
62
- });
63
- }
64
- }
65
- // Add detected IAM orgs
66
- for (const o of (iamOrgs ?? [])) {
67
- const item = o;
68
- const id = item.id || item.name;
69
- if (id && !map.has(id)) {
70
- map.set(id, {
71
- id,
72
- name: item.name || id,
73
- displayName: item.displayName || item.name || id,
74
- logo: item.logo || item.avatar,
75
- role: item.role || 'member',
76
- isPersonal: Boolean(item.isPersonal),
77
- });
78
- }
79
- }
80
- return Array.from(map.values());
81
- }, [accountOrgs, iamOrgs]);
82
84
  if (!open)
83
85
  return null;
84
86
  // Where it opens. The offset rides a margin, so each edge is a plain length gui can take.
@@ -92,11 +94,7 @@ export function OrgSwitcherDropdown({ open, onClose, activeOrgId, onSelect, alig
92
94
  return (_jsxs(YStack, { ref: menuRef, position: "absolute", ...position, width: 260, maxW: "calc(100vw - 24px)", bg: "var(--popover)", rounded: 12, borderWidth: 1, borderColor: "$borderColor", boxShadow: "var(--shadow-lg)", z: "var(--z-dropdown)", p: 6, gap: 2, children: [_jsx(Text, { pt: 6, px: 10, pb: 4, fontSize: "$1", fontWeight: "600", color: "$faint", textTransform: "uppercase", letterSpacing: 0.6, children: t('Workspaces') }), orgs.length === 0 ? (_jsx(Text, { pt: 6, px: 10, pb: 10, fontSize: "$2", color: "$faint", children: t('No workspaces on this account yet.') })) : null, orgs.map((o) => {
93
95
  const isSelected = o.id === activeOrgId || o.name === activeOrgId;
94
96
  return (_jsxs(Button, { variant: "ghost", onClick: () => {
95
- pick(o.id);
96
- if (switchOrg)
97
- switchOrg(o.id);
98
- if (switchOrganization)
99
- switchOrganization(o.id);
97
+ choose(o.id);
100
98
  onSelect(o.id);
101
99
  onClose();
102
100
  }, width: "100%", justify: "space-between", px: 10, py: 6, bg: isSelected ? '$hover' : 'transparent', children: [_jsxs(XStack, { items: "center", gap: 10, minW: 0, shrink: 1, children: [_jsx(Text, { width: 24, height: 24, rounded: 6, bg: "$raised", display: "flex", items: "center", justify: "center", fontSize: "$2", fontWeight: "700", color: "$ink", shrink: 0, overflow: "hidden", children: o.logo ? (_jsx(View, { render: _jsx("img", { src: o.logo, alt: "" }), width: "100%", height: "100%", objectFit: "cover" })) : (o.displayName.toLowerCase().includes('hanzo') || o.name.toLowerCase().includes('hanzo')) ? (_jsx(HanzoMark, { size: 14 })) : (o.name.slice(0, 3).toUpperCase()) }), _jsxs(YStack, { minW: 0, shrink: 1, items: "flex-start", children: [_jsx(Text, { fontSize: "$2", fontWeight: isSelected ? '600' : '500', color: "$ink", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: o.displayName }), o.role ? (_jsx(Text, { fontSize: FLOOR, color: "$faint", children: o.role })) : null] })] }), isSelected ? _jsx(Check, { size: 14, color: "currentColor" }) : null] }, o.id));
@@ -124,3 +122,20 @@ export function TopOrgSelector() {
124
122
  const activeOrgName = activeOrg?.displayName || activeOrg?.name || 'hanzo';
125
123
  return (_jsxs(XStack, { position: "relative", display: "inline-flex", items: "center", children: [_jsxs(Button, { ref: buttonRef, size: "sm", variant: open ? 'secondary' : 'default', onClick: () => setOpen((v) => !v), gap: 6, paddingInlineStart: 6, paddingInlineEnd: 8, "aria-label": t('Switch organization'), children: [_jsx(XStack, { width: 20, height: 20, rounded: 9999, bg: "$raised", items: "center", justify: "center", overflow: "hidden", children: face ? (_jsx(View, { render: _jsx("img", { src: face, alt: "", width: 20, height: 20 }), width: "100%", height: "100%", objectFit: "cover" })) : (_jsx(HanzoMark, { size: 13 })) }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", maxW: 140, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: activeOrgName }), _jsx(ChevronDown, { size: 13, opacity: 0.65 })] }), _jsx(OrgSwitcherDropdown, { open: open, onClose: () => setOpen(false), activeOrgId: activeOrgId, onSelect: () => setOpen(false), triggerRef: buttonRef })] }));
126
124
  }
125
+ /**
126
+ * The organizations as tiles down the far left, as a team chat draws them:
127
+ * each its logo, or its initial in its own hue (@hanzo/ui `Avatar` seeded on its
128
+ * id, as the org chooser and the landing's preview draw it), the one this page
129
+ * works in ringed, and "+" under them for the chooser, where another is made or
130
+ * joined. A press works in that organization.
131
+ */
132
+ export function Tiles() {
133
+ const { t } = useI18n();
134
+ const { orgs, active, choose } = useOrgList();
135
+ if (orgs.length === 0)
136
+ return null;
137
+ return (_jsxs(YStack, { "data-slot": "org-tiles", role: "group", "aria-label": t('Organizations'), items: "center", gap: 10, pt: 10, pb: 6, children: [orgs.map((o) => {
138
+ const on = o.id === active || o.name === active;
139
+ return (_jsxs(XStack, { position: "relative", items: "center", justify: "center", children: [_jsx(View, { position: "absolute", insetInlineStart: -10, width: 4, height: on ? 26 : 0, rounded: 9999, bg: "$color" }), _jsx(XStack, { render: "button", "aria-pressed": on, "aria-label": t('Open {org}', { org: o.displayName }), ...{ title: o.displayName }, onClick: () => choose(o.id), p: 2, rounded: 10, borderWidth: 2, borderColor: on ? '$color' : 'transparent', bg: "transparent", cursor: "pointer", opacity: on ? 1 : 0.8, hoverStyle: { opacity: 1 }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, children: _jsx(Avatar, { size: "lg", shape: "rounded", src: o.logo || null, name: o.displayName, colorSeed: o.id, variant: on ? 'outline' : 'soft', alt: "" }) })] }, o.id));
140
+ }), _jsx(XStack, { render: "button", "aria-label": t('Organizations'), ...{ title: t('Organizations') }, onClick: () => void window.dispatchEvent(new Event(CHOOSE)), width: 32, height: 32, rounded: 8, items: "center", justify: "center", borderWidth: 1, borderColor: "$borderColor", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$backgroundHover' }, children: _jsx(Plus, { size: 15, "aria-hidden": true }) })] }));
141
+ }
package/dist/Rail.js CHANGED
@@ -45,7 +45,7 @@ import { out } from './help.js';
45
45
  import { BETAS } from './lib/betas.js';
46
46
  import { HOSTED_APPS } from './lib/hosted.js';
47
47
  import { Account } from './Account.js';
48
- import { BAND } from './ground.js';
48
+ import { HEAD, TOUCH_HEAD } from './ground.js';
49
49
  import { app, hosted, WORKSPACE } from './lib/host.js';
50
50
  /** The rail's width, px. */
51
51
  export const RAIL = 44;
@@ -125,8 +125,8 @@ export function Rail({ host, mode, at, open, toggle, inside = null, rows = false
125
125
  if (rows)
126
126
  return (_jsxs(YStack, { "data-slot": "places", render: "nav", "aria-label": t('Products'), pt: "$2", shrink: 0, children: [_jsxs(YStack, { role: "list", gap: 2, children: [_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "place-studio", icon: _jsx(WandSparkles, { size: 16, "aria-hidden": true }) }) }), _jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "place-tabs", icon: _jsx(SquareTerminal, { size: 16, "aria-hidden": true }) }) }), apps.map((a) => (_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `place-app-${a.id}`, icon: _jsx(a.icon, { size: 16, "aria-hidden": true }) }) }, a.id))), _jsx(YStack, { role: "listitem", children: _jsx(DropdownMenu, { placement: "bottom-start", minWidth: 220, trigger: _jsx(Row, { label: t('More'), "data-slot": "place-more", "aria-haspopup": "menu", icon: _jsx(Ellipsis, { size: 16, "aria-hidden": true }) }), items: rest }) })] }), betasDialog] }));
127
127
  return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1,
128
- // The first mark centred on the head band beside it (BAND), the account on the sidebar's foot (Sidebar's `pb`).
129
- pt: (BAND - MARK) / 2, pb: "$2", gap: 4, shrink: 0, items: "center", $touchable: { pt: (BAND - TOUCH) / 2 }, children: [toggle ? (_jsx(YStack, { pb: 4, children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MessageSquare, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(Code2, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(WandSparkles, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(SquareTerminal, { size: 18, "aria-hidden": true }) }), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(Library, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(Clock, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(Puzzle, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) }), betasDialog, rest.length ? (_jsx(DropdownMenu
128
+ // The first mark stands at the pane's top edge, one head row high (HEAD), the account on the sidebar's foot (Sidebar's `pb`).
129
+ pt: (HEAD - MARK) / 2, pb: "$2", gap: 4, shrink: 0, items: "center", $touchable: { pt: (TOUCH_HEAD - TOUCH) / 2 }, children: [toggle ? (_jsx(YStack, { pb: 4, children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MessageSquare, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(Code2, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(WandSparkles, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(SquareTerminal, { size: 18, "aria-hidden": true }) }), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(Library, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(Clock, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(Puzzle, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) }), betasDialog, rest.length ? (_jsx(DropdownMenu
130
130
  // Toward the content: right of the rail, left of it right to left.
131
131
  , {
132
132
  // Toward the content: right of the rail, left of it right to left.
package/dist/Shell.js CHANGED
@@ -123,6 +123,7 @@ import { getStoredPeople, getStoredAgents, getCustomThreads, createDirectChat, }
123
123
  import { bare } from './lib/bare.js';
124
124
  import { BAD } from './lib/mix.js';
125
125
  import { brand, site, where, wordmark } from './where.js';
126
+ import { Tiles } from './OrgSwitcher.js';
126
127
  /** The pane while a settings row is open, loaded when one is: none of it is an app's first screen. */
127
128
  const SettingsPane = lazy(() => import('./SettingsPane.js').then((m) => ({ default: m.SettingsPane })));
128
129
  /**
@@ -999,7 +1000,7 @@ function Leave({ href, children }) {
999
1000
  }
1000
1001
  function Rail({ mode, places, team, open, navigate, onSettings, onMore, }) {
1001
1002
  const { t } = useI18n();
1002
- return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t("Places"), ...sheet(0), gridArea: "rail", minH: 0, borderInlineEndWidth: 1, borderInlineEndStyle: "solid", borderColor: "var(--edge, var(--white-06))", $md: open ? { display: "none" } : undefined, "$max-md": {
1003
+ return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t("Places"), ...sheet(0), gridArea: "rail", minH: 0, borderInlineEndWidth: 1, borderInlineEndStyle: "solid", borderColor: "var(--edge, var(--white-06))", "$max-md": {
1003
1004
  flexDirection: "row",
1004
1005
  items: "center",
1005
1006
  borderInlineEndWidth: 0,
@@ -1007,7 +1008,7 @@ function Rail({ mode, places, team, open, navigate, onSettings, onMore, }) {
1007
1008
  borderTopColor: "var(--border)",
1008
1009
  },
1009
1010
  // Clear of the home indicator on a phone; zero on a flat screen.
1010
- pb: HOME_INDICATOR, children: [_jsxs(YStack, { "data-slot": "places", ...bare, items: "center", gap: "$0.5", flex: 1, minW: 0, minH: 0, overflowY: "auto", pt: "$2", "$max-md": {
1011
+ pb: HOME_INDICATOR, children: [_jsx(YStack, { "$max-md": { display: "none" }, borderBottomWidth: 1, borderColor: "var(--edge, var(--white-06))", mx: "$2", children: _jsx(Tiles, {}) }), _jsxs(YStack, { "data-slot": "places", ...bare, items: "center", gap: "$0.5", flex: 1, minW: 0, minH: 0, overflowY: "auto", pt: "$2", $md: open ? { display: "none" } : undefined, "$max-md": {
1011
1012
  display: "grid",
1012
1013
  gridAutoFlow: "column",
1013
1014
  gridAutoColumns: "minmax(0, 1fr)",
@@ -1016,7 +1017,7 @@ function Rail({ mode, places, team, open, navigate, onSettings, onMore, }) {
1016
1017
  }, children: [places.map((place, i) => {
1017
1018
  const here = place.id === mode;
1018
1019
  return (_jsxs(Box, { render: "button", onClick: () => navigate?.(place.route), "aria-label": t(place.label), "aria-current": here ? "page" : undefined, title: place.name ?? (place.title ? t(place.title) : t(place.label)), display: "flex", "$max-md": { display: i < 4 ? "flex" : "none", width: "auto", minW: 0 }, flexDirection: "column", width: 56, minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, bg: here ? "$edge" : undefined, hoverStyle: { bg: here ? "$edge" : "$hover" }, children: [_jsx(place.icon, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: here ? "$ink" : "$quiet", numberOfLines: 1, children: t(place.label) })] }, place.id));
1019
- }), team ? (_jsx(XStack, { "$max-md": { display: places.length < 4 ? "flex" : "none", width: "auto", minW: 0 }, children: _jsx(Text, { render: _jsx("a", { href: team, "aria-label": t("Workspace"), title: "Hanzo Team" }), display: "flex", width: 56, color: "inherit", children: _jsxs(Box, { display: "flex", flex: 1, flexDirection: "column", minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(LayoutGrid, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", numberOfLines: 1, children: t("Workspace") })] }) }) })) : null, _jsxs(Box, { "data-slot": "more", render: "button", onClick: onMore, "aria-label": t("More places"), title: t("More"), display: "none", "$max-md": { display: "flex", width: "auto", minW: 0 }, flexDirection: "column", width: 56, minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(SearchIcon, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", children: t("More") })] })] }), _jsx(YStack, { items: "center", pb: "$2", children: _jsxs(Box, { render: "button", onClick: onSettings, "aria-label": t("Settings"), title: t("Settings"), display: "flex", flexDirection: "column", width: 56, minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(Settings2, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", children: t("Settings") })] }) })] }));
1020
+ }), team ? (_jsx(XStack, { "$max-md": { display: places.length < 4 ? "flex" : "none", width: "auto", minW: 0 }, children: _jsx(Text, { render: _jsx("a", { href: team, "aria-label": t("Workspace"), title: "Hanzo Team" }), display: "flex", width: 56, color: "inherit", children: _jsxs(Box, { display: "flex", flex: 1, flexDirection: "column", minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(LayoutGrid, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", numberOfLines: 1, children: t("Workspace") })] }) }) })) : null, _jsxs(Box, { "data-slot": "more", render: "button", onClick: onMore, "aria-label": t("More places"), title: t("More"), display: "none", "$max-md": { display: "flex", width: "auto", minW: 0 }, flexDirection: "column", width: 56, minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(SearchIcon, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", children: t("More") })] })] }), _jsx(YStack, { items: "center", pb: "$2", $md: open ? { display: "none" } : undefined, children: _jsxs(Box, { render: "button", onClick: onSettings, "aria-label": t("Settings"), title: t("Settings"), display: "flex", flexDirection: "column", width: 56, minH: 44, py: "$1", rounded: "$2", items: "center", justify: "center", gap: 2, hoverStyle: { bg: "$hover" }, children: [_jsx(Settings2, { size: 18, "aria-hidden": true }), _jsx(Text, { fontSize: 12, lineHeight: 14, color: "$quiet", children: t("Settings") })] }) })] }));
1020
1021
  }
1021
1022
  /**
1022
1023
  * Chat's column: start a chat, the projects, then every conversation. The app
@@ -1311,7 +1312,7 @@ function Frame({ mode, children, navigate, back, forward, }) {
1311
1312
  navigate?.(site("/referral"));
1312
1313
  dismiss();
1313
1314
  }, children: t("Share Hanzo") }), _jsxs(XStack, { items: "center", gap: "$1", px: "$1.5", py: "$1", borderTopWidth: 1, borderColor: "$borderColor", children: [_jsx(YStack, { flex: 1, minW: 0, children: _jsx(Account, { host: who, onOrg: (o) => (choose(o), window.location.reload()) }) }), _jsx(Box, { render: "button", onClick: toggle, "aria-label": t("Collapse sidebar"), p: "$2", rounded: "$2", hoverStyle: { bg: "$hover" }, cursor: "pointer", children: _jsx(PanelLeftClose, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] })] })) : null) : null] }));
1314
- return (_jsxs(YStack, { "data-slot": "workspace", "data-hydrated": settled ? "true" : undefined, "data-sidebar": asked ? "open" : "shut", display: "grid", gridTemplateColumns: `${asked ? 0 : 64}px auto minmax(0, 1fr) auto`, gridTemplateRows: "44px minmax(0, 1fr)", gridTemplateAreas: '"rail bar bar bar" "rail list pane side"', "$max-md": {
1315
+ return (_jsxs(YStack, { "data-slot": "workspace", "data-hydrated": settled ? "true" : undefined, "data-sidebar": asked ? "open" : "shut", display: "grid", gridTemplateColumns: "64px auto minmax(0, 1fr) auto", gridTemplateRows: "44px minmax(0, 1fr)", gridTemplateAreas: '"rail bar bar bar" "rail list pane side"', "$max-md": {
1315
1316
  gridTemplateColumns: "minmax(0, 1fr)",
1316
1317
  gridTemplateRows: `44px minmax(0, 1fr) ${TABS_HEIGHT}`,
1317
1318
  gridTemplateAreas: '"bar" "pane" "rail"',
package/dist/Sidebar.js CHANGED
@@ -47,7 +47,7 @@ import { talk } from './lib/host.js';
47
47
  import { payUrl } from './lib/pay.js';
48
48
  import { brand, wordmark } from './where.js';
49
49
  import { dragWindow, toggleWindowMaximize } from './WindowControls.js';
50
- import { BAND } from './ground.js';
50
+ import { BAND, HEAD as LINE, TOUCH_HEAD } from './ground.js';
51
51
  /** The sidebar fills the column. Its `width` is typed in px alone, though its frame takes any gui size — the type is
52
52
  * @hanzo/ui's to widen. */
53
53
  const FILL = { width: '100%' };
@@ -119,7 +119,11 @@ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer
119
119
  };
120
120
  return (_jsxs(YStack, { "data-slot": "app-column", ref: drawer ? undefined : span.ref, ...(drawer ? null : span.props), position: "relative", flex: drawer ? 1 : undefined, shrink: drawer ? 1 : 0, minW: 0, height: "100%", width: drawer ? undefined : 'var(--span)', children: [_jsxs(Base, { "data-slot": "app-rail", role: "navigation", "aria-label": brand(), bg: "transparent", borderWidth: 0, ...FILL, px: "$2", pt: drawer ? 'var(--pane-gap)' : 0,
121
121
  // In the drawer the menu's own foot padding is the gap; its foot row stands on it.
122
- pb: drawer ? 0 : '$2', gap: "$0", children: [at ? (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 2, paddingInlineEnd: 2, height: BAND, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(SidebarIconButton, { label: t('Back'), "data-slot": "place-back", "data-tauri-drag-region": "false", onPress: onBack, ...HEAD, children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Text, { flex: 1, minW: 0, fontSize: 18, lineHeight: 24, fontWeight: "600", color: "$ink", numberOfLines: 1, "data-slot": "place-name", children: t(TITLE[at]) })] })) : (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: "$2", paddingInlineEnd: 2, height: BAND, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(Text, { flex: 1, minW: 0, fontSize: drawer ? 20 : 18, lineHeight: 24, fontWeight: drawer ? '700' : '600', color: "$ink", numberOfLines: 1, children: wordmark(mode) }), drawer ? null : _jsx(Activity, { host: host }), _jsx(SidebarIconButton, { label: t('Search'), "data-tauri-drag-region": "false", onPress: onSeek, "aria-haspopup": "dialog", ...(drawer
122
+ pb: drawer ? 0 : '$2', gap: "$0", children: [at ? (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 2, paddingInlineEnd: 2,
123
+ // The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
124
+ height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(SidebarIconButton, { label: t('Back'), "data-slot": "place-back", "data-tauri-drag-region": "false", onPress: onBack, ...HEAD, children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Text, { flex: 1, minW: 0, fontSize: 18, lineHeight: 24, fontWeight: "600", color: "$ink", numberOfLines: 1, "data-slot": "place-name", children: t(TITLE[at]) })] })) : (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: "$2", paddingInlineEnd: 2,
125
+ // The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
126
+ height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(Text, { flex: 1, minW: 0, fontSize: drawer ? 20 : 18, lineHeight: 24, fontWeight: drawer ? '700' : '600', color: "$ink", numberOfLines: 1, children: wordmark(mode) }), drawer ? null : _jsx(Activity, { host: host }), _jsx(SidebarIconButton, { label: t('Search'), "data-tauri-drag-region": "false", onPress: onSeek, "aria-haspopup": "dialog", ...(drawer
123
127
  ? {
124
128
  width: 40,
125
129
  height: 40,
package/dist/ground.d.ts CHANGED
@@ -21,10 +21,24 @@ export declare const pane: (fill?: string) => {
21
21
  readonly boxShadow: 'var(--shadow-sheet-1)';
22
22
  };
23
23
  /**
24
- * One head row, px: the sidebar's title row, a pane's top bar and a phone's bar
25
- * are this high and stand on one line, so the marks in them share a centerline.
24
+ * A phone's head row, px: its bar and the drawer's title row are this high and
25
+ * stand on one line, so the marks in them share a centerline.
26
26
  */
27
27
  export declare const BAND = 52;
28
+ /**
29
+ * The head row from a tablet up, px: one rail mark high (Rail `MARK`), so the
30
+ * rail's first mark stands at the pane's top edge and the sidebar's title row
31
+ * and the pane's head share its centre (owner, 2026-10-30: "align sidebar icons
32
+ * top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
33
+ * with it (`TOUCH_HEAD`).
34
+ */
35
+ export declare const HEAD = 36;
36
+ export declare const TOUCH_HEAD = 44;
37
+ /**
38
+ * A row INSIDE a pane is 2px shorter than the row it lines up with: the pane's
39
+ * 1px top edge sets its content 1px down, so its centre stays on the line.
40
+ */
41
+ export declare const inPane: (row: number) => number;
28
42
  /**
29
43
  * THE FLOOR under the app's frame (app/_web.tsx, components/settings/Frame.tsx):
30
44
  * design's top light falling off down the window over the faint lamps of
package/dist/ground.js CHANGED
@@ -21,10 +21,24 @@ export const pane = (fill = 'var(--pane-fill)') => ({
21
21
  boxShadow: 'var(--shadow-sheet-1)',
22
22
  });
23
23
  /**
24
- * One head row, px: the sidebar's title row, a pane's top bar and a phone's bar
25
- * are this high and stand on one line, so the marks in them share a centerline.
24
+ * A phone's head row, px: its bar and the drawer's title row are this high and
25
+ * stand on one line, so the marks in them share a centerline.
26
26
  */
27
27
  export const BAND = 52;
28
+ /**
29
+ * The head row from a tablet up, px: one rail mark high (Rail `MARK`), so the
30
+ * rail's first mark stands at the pane's top edge and the sidebar's title row
31
+ * and the pane's head share its centre (owner, 2026-10-30: "align sidebar icons
32
+ * top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
33
+ * with it (`TOUCH_HEAD`).
34
+ */
35
+ export const HEAD = 36;
36
+ export const TOUCH_HEAD = 44;
37
+ /**
38
+ * A row INSIDE a pane is 2px shorter than the row it lines up with: the pane's
39
+ * 1px top edge sets its content 1px down, so its centre stays on the line.
40
+ */
41
+ export const inPane = (row) => row - 2;
28
42
  /**
29
43
  * THE FLOOR under the app's frame (app/_web.tsx, components/settings/Frame.tsx):
30
44
  * design's top light falling off down the window over the faint lamps of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/app",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",