Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(lan-webui): redesign the phone companion around native reading and touch

vastsabfbe8f166665
diff --git a/apps/desktop/resources/lan-webui/app.js b/apps/desktop/resources/lan-webui/app.js
index 10473a5a2..e72c9fdee 100644
--- a/apps/desktop/resources/lan-webui/app.js
+++ b/apps/desktop/resources/lan-webui/app.js
@@ -52,8 +52,9 @@
const active = document.activeElement;
const keep = same && active instanceof HTMLElement && active.id && app.contains(active) ? active.id : "";
const range = keep && typeof active.selectionStart === "number" ? [active.selectionStart, active.selectionEnd] : null;
- app.replaceChildren(...nodes.filter(Boolean));
+ app.replaceChildren(...nodes.flat().filter(Boolean));
app.dataset.view = view;
+ trackDock();
if (!same && view !== "loading") enterPage();
const next = keep ? document.getElementById(keep) : null;
if (next) {
@@ -68,6 +69,18 @@
}
return !same;
}
+ // Toasts rise above the composer dock, whose height changes as a prompt grows.
+ const dockObserver = typeof ResizeObserver === "function"
+ ? new ResizeObserver(([entry]) => {
+ if (entry?.target.isConnected) document.documentElement.style.setProperty("--dock", `${Math.round(entry.target.getBoundingClientRect().height)}px`);
+ })
+ : null;
+ function trackDock() {
+ dockObserver?.disconnect();
+ const dock = app.querySelector(".chat-dock");
+ if (dock) dockObserver?.observe(dock);
+ else document.documentElement.style.removeProperty("--dock");
+ }
/** A new page slides in from the side it was reached from; refreshes never move. */
let direction = "push";
function enterPage() {
@@ -80,9 +93,24 @@
});
// Safari only paints :active feedback once the page listens for touches.
document.addEventListener("touchstart", () => {}, { passive: true });
- // The sticky header gains its hairline only once content scrolls beneath it.
- const syncScrolled = () => document.documentElement.classList.toggle("scrolled", window.scrollY > 2);
- window.addEventListener("scroll", syncScrolled, { passive: true });
+ // The bar gains its hairline once content scrolls beneath it. On list pages
+ // the compact bar title takes over when the large title passes under the bar.
+ function syncScrolled() {
+ const root = document.documentElement;
+ root.classList.toggle("scrolled", window.scrollY > 2);
+ const bar = app.querySelector(".header");
+ const large = app.querySelector(".large-title h1");
+ root.classList.toggle("collapsed", Boolean(bar && large && large.getBoundingClientRect().bottom <= bar.getBoundingClientRect().bottom + 1));
+ }
+ let scrollFrame = 0;
+ window.addEventListener("scroll", () => {
+ if (scrollFrame) return;
+ scrollFrame = requestAnimationFrame(() => {
+ scrollFrame = 0;
+ syncScrolled();
+ syncJump();
+ });
+ }, { passive: true });
let toastTimer = null;
function notify(message, duration = 4000) {
toast.textContent = message;
@@ -90,8 +118,11 @@
clearTimeout(toastTimer);
toastTimer = setTimeout(() => (toast.hidden = true), duration);
}
+ // Clear first so a repeated message (“Copied” twice) is announced again.
const announce = (message) => {
- if (message) announcer.textContent = message;
+ if (!message) return;
+ announcer.textContent = "";
+ setTimeout(() => (announcer.textContent = message), 30);
};
function setOffline(lost) {
state.online = !lost;
@@ -104,15 +135,23 @@
const newKey = () => (crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`).replace(/[^A-Za-z0-9_-]/g, "");
async function copyWithFeedback(text, button) {
- if (await copyText(text)) {
- notify(t("copied"), 1500);
- if (button?.isConnected) {
- button.replaceChildren(icon("check", "sm"));
- setTimeout(() => button.isConnected && button.replaceChildren(icon("copy", "sm")), 1500);
- }
- } else {
+ if (!(await copyText(text))) {
notify(t("copyFailed"));
+ return;
}
+ announce(t("copied"));
+ // The control confirms the copy in place; a toast only when it is gone.
+ if (!button?.isConnected) {
+ notify(t("copied"), 1500);
+ return;
+ }
+ button.classList.add("copied");
+ button.replaceChildren(icon("check", "sm"));
+ setTimeout(() => {
+ if (!button.isConnected) return;
+ button.classList.remove("copied");
+ button.replaceChildren(icon("copy", "sm"));
+ }, 1500);
}
const markdownOptions = { labels: { copyCode: t("copyCode"), image: t("imagePlaceholder") }, onCopy: copyWithFeedback };
@@ -219,7 +258,9 @@
};
const back = (fallback) => (history.length > 1 ? history.back() : go(fallback));
window.addEventListener("hashchange", (event) => {
+ // Menus belong to the page that opened them; Back must not carry them along.
modelPicker.dismiss();
+ if (!sheet.hidden) closeSheet(false);
const prefill = takePairingCode();
if (prefill && !state.me) {
showPair("", prefill);
@@ -285,6 +326,7 @@
if (opener) sheetReturn = opener;
document.getElementById("sheet-title").textContent = title;
document.getElementById("sheet-actions").replaceChildren(...children);
+ sheetPanel.style.translate = "";
sheet.hidden = false;
}
function openSheet(title, actions, opener) {
@@ -319,11 +361,17 @@
}, { passive: true });
const endDrag = () => {
if (!drag) return;
- const dismiss = drag.dy > 72;
+ const { dy } = drag;
drag = null;
sheetPanel.style.transition = "";
- sheetPanel.style.translate = "";
- if (dismiss) closeSheet();
+ if (dy <= 72) {
+ sheetPanel.style.translate = "";
+ return;
+ }
+ // A dismissed sheet keeps travelling from where the finger let go as it fades.
+ sheetPanel.style.translate = `0 ${dy + 32}px`;
+ closeSheet();
+ setTimeout(() => { if (sheet.hidden) sheetPanel.style.translate = ""; }, 260);
};
sheetPanel.addEventListener("touchend", endDrag);
sheetPanel.addEventListener("touchcancel", endDrag);
@@ -415,15 +463,24 @@
return label ? { icon: "folder", text: label, class: "scope" } : null;
}
- function header({ title, backTo, subtitle = [], actions = [], root = false }) {
- return el("header", { class: root ? "header root" : "header" }, [
- backTo ? el("button", { type: "button", class: "icon-btn", "aria-label": t("back"), onclick: () => back(backTo) }, icon("back")) : null,
- el("div", { class: "header-title" }, [
- el("h1", { id: "view-title", tabindex: "-1", text: title }),
- subtitle.length ? el("p", { class: "header-sub" }, subtitle.map(metaItem)) : null,
+ /**
+ * A conversation keeps its title in the bar. List pages lead with a large
+ * title in the page that hands over to a compact bar title on scroll.
+ */
+ function header({ title, backTo, subtitle = [], actions = [], large = false }) {
+ const backButton = backTo ? el("button", { type: "button", class: "icon-btn back", "aria-label": t("back"), onclick: () => back(backTo) }, icon("back")) : null;
+ const heading = el("h1", { id: "view-title", tabindex: "-1", text: title });
+ const sub = subtitle.length ? el("p", { class: large ? "large-sub" : "header-sub" }, subtitle.map(metaItem)) : null;
+ if (!large) return el("header", { class: "header" }, [backButton, el("div", { class: "header-title" }, [heading, sub]), ...actions]);
+ return [
+ el("header", { class: "header large" }, [
+ backButton,
+ el("div", { class: "header-compact", "aria-hidden": "true" }, el("span", { text: title })),
+ el("span", { class: "header-spacer" }),
+ ...actions,
]),
- ...actions,
- ]);
+ el("div", { class: "large-title" }, [heading, sub]),
+ ];
}
const moreButton = (name, actions) => el("button", {
type: "button",
@@ -438,30 +495,45 @@
id: "list-search", type: "search", placeholder: t("search"), "aria-label": t("search"),
value: state.query[key], enterkeyhint: "search", autocomplete: "off",
});
+ const clear = el("button", {
+ type: "button", class: "icon-btn search-clear", "aria-label": t("clearSearch"), hidden: !state.query[key],
+ onclick: () => {
+ search.value = "";
+ search.dispatchEvent(new Event("input"));
+ search.focus();
+ },
+ }, icon("close", "sm"));
let timer = null;
search.addEventListener("input", () => {
// Keep the latest text in the query so a re-render never drops keystrokes.
state.query[key] = search.value;
+ clear.hidden = !search.value;
clearTimeout(timer);
timer = setTimeout(() => render(), 250);
});
- return el("div", { class: "toolbar" }, el("div", { class: "search" }, [icon("search", "sm"), search]));
+ return el("div", { class: "toolbar" }, el("div", { class: "search" }, [icon("search", "sm"), search, clear]));
}
function row({ icon: iconName, title, meta = [], time = "", onOpen, actions = [], moreLabel }) {
- return el("li", { class: "row" }, [
+ const more = actions.length
+ ? el("button", { type: "button", class: "row-more icon-btn", "aria-label": moreLabel, "aria-haspopup": "dialog", onclick: (event) => openSheet(title, actions, event.currentTarget) }, icon("more"))
+ : null;
+ const item = el("li", { class: "row" }, [
el("button", { type: "button", class: "row-main", onclick: onOpen }, [
iconName ? el("span", { class: "row-icon" }, icon(iconName)) : null,
el("span", { class: "row-text" }, [
- el("span", { class: "row-title", text: title }),
+ el("span", { class: "row-head" }, [
+ el("span", { class: "row-title", text: title }),
+ time ? el("span", { class: "row-time", text: time }) : null,
+ ]),
meta.length ? el("span", { class: "row-meta" }, meta.map(metaItem)) : null,
]),
- time ? el("span", { class: "row-time", text: time }) : null,
]),
- actions.length
- ? el("button", { type: "button", class: "row-more icon-btn", "aria-label": moreLabel, "aria-haspopup": "dialog", onclick: (event) => openSheet(title, actions, event.currentTarget) }, icon("more"))
- : null,
+ more,
]);
+ // A long press (Android) or secondary click opens the same labeled menu.
+ if (more) item.addEventListener("contextmenu", (event) => { event.preventDefault(); openSheet(title, actions, more); });
+ return item;
}
function sessionRow(item, showScope) {
const title = item.title || t("untitled");
@@ -536,16 +608,19 @@
return show(
archived ? "home:archived" : "home",
- archived ? header({ title: t("archivedView"), backTo: "#/projects" }) : header({ title: t("appTitle"), root: true }),
+ header(archived ? { title: t("archivedView"), backTo: "#/projects", large: true } : { title: t("appTitle"), large: true }),
searchField("home"),
...parts,
browsing ? el("div", { class: "footer" }, [
archivedLink("#/archived"),
- el("button", {
- type: "button",
- class: "link signout",
- onclick: (event) => openSheet(t("signOutConfirm"), [{ icon: "logout", label: t("signOut"), danger: true, run: signOut }], event.currentTarget),
- }, [icon("logout", "sm"), el("span", { text: t("signOut") })]),
+ el("div", { class: "device" }, [
+ state.me?.label ? el("p", { class: "device-name" }, [icon("pair", "xs"), el("span", { text: t("thisDevice", { name: state.me.label }) })]) : null,
+ el("button", {
+ type: "button",
+ class: "link signout",
+ onclick: (event) => openSheet(t("signOutConfirm"), [{ icon: "logout", label: t("signOut"), danger: true, run: signOut }], event.currentTarget),
+ }, [icon("logout", "sm"), el("span", { text: t("signOut") })]),
+ ]),
]) : null,
browsing ? newConversationButton((button) => void pickNewConversation(button)) : null,
browsing ? el("div", { class: "fab-spacer", "aria-hidden": "true" }) : null,
@@ -569,8 +644,8 @@
return show(
`sessions:${projectId}${archived ? ":archived" : ""}`,
archived
- ? header({ title: t("archivedView"), backTo: projectHash(projectId), subtitle: [{ icon: projectId === TEMP ? "temporary" : "folder", text: name }] })
- : header({ title: name, backTo: "#/projects" }),
+ ? header({ title: t("archivedView"), backTo: projectHash(projectId), subtitle: [{ icon: projectId === TEMP ? "temporary" : "folder", text: name }], large: true })
+ : header({ title: name, backTo: "#/projects", large: true }),
searchField("sessions"),
archived ? null : newConversationButton((button) => void createSession(projectId, button)),
list,
@@ -612,20 +687,20 @@
onclick: (event) => void copyWithFeedback(text, event.currentTarget),
}, icon("copy", "sm")));
- function transcript(items, open, running) {
+ function transcript(items, open, running, mark) {
const nodes = [];
for (let i = 0; i < items.length; i += 1) {
const item = items[i];
if (item.role === "tool") {
const run = [item];
while (items[i + 1]?.role === "tool") run.push(items[++i]);
- nodes.push(steps(run, open));
+ nodes.push(mark(steps(run, open), `tool:${run[0].id}`));
continue;
}
- nodes.push(message(item));
+ nodes.push(mark(message(item), item.id, item));
// Copy sits under the last answer of each exchange.
const next = items.slice(i + 1).find((candidate) => candidate.role !== "tool");
- if (item.role === "assistant" && item.text && (next ? next.role === "user" : !running)) nodes.push(copyButton(item.text));
+ if (item.role === "assistant" && item.text && (next ? next.role === "user" : !running)) nodes.push(mark(copyButton(item.text), `copy:${item.id}`));
}
return nodes;
}
@@ -655,7 +730,8 @@
return left;
}
- const chatState = { sessionId: null, older: [], olderCursor: undefined, phase: null, open: new Set(), items: [] };
+ const freshChat = () => ({ older: [], olderCursor: undefined, phase: null, open: new Set(), items: [], keys: null, pendingTexts: new Set(), hadLive: false });
+ const chatState = { sessionId: null, ...freshChat() };
const phaseText = { running: "running", "waiting-approval": "waitingApproval", "waiting-input": "waitingInput", idle: "replyDone" };
const nearBottom = () => {
const scroller = document.scrollingElement;
@@ -665,10 +741,9 @@
const jump = document.getElementById("jump-latest");
if (jump) jump.hidden = nearBottom();
}
- window.addEventListener("scroll", syncJump, { passive: true });
async function renderChat(token, sessionId, refresh) {
- if (chatState.sessionId !== sessionId) Object.assign(chatState, { sessionId, older: [], olderCursor: undefined, phase: null, open: new Set(), items: [] });
+ if (chatState.sessionId !== sessionId) Object.assign(chatState, { sessionId, ...freshChat() });
const conversation = await api("GET", `/v1/sessions/${enc(sessionId)}`);
if (token !== state.renderToken) return undefined;
const { session } = conversation;
@@ -708,12 +783,24 @@
},
}));
}
- messages.append(...transcript(items, chatState.open, running));
- for (const entry of pending) messages.append(message({ role: "user", text: entry.text }, "pending"));
- if (conversation.liveText) messages.append(message({ role: "assistant", text: conversation.liveText }, "live"));
+ // Only what arrives while the reader watches fades in. The first paint,
+ // refreshes, a pending turn yielding to its Host record and a streamed
+ // answer settling into its record all stay still.
+ const previous = chatState.keys;
+ const keys = new Set();
+ const mark = (node, key, item) => {
+ keys.add(key);
+ const settled = item && ((item.role === "user" && chatState.pendingTexts.has(item.text.trim())) || (item.role === "assistant" && chatState.hadLive));
+ if (previous && !previous.has(key) && !settled) node.classList.add("enter");
+ return node;
+ };
+ messages.append(...transcript(items, chatState.open, running, mark));
+ for (const entry of pending) messages.append(mark(message({ role: "user", text: entry.text }, "pending"), `pending:${entry.text}`));
+ if (conversation.liveText) messages.append(mark(message({ role: "assistant", text: conversation.liveText }, "live"), "live"));
else if (running && !conversation.waiting) {
- messages.append(el("div", { class: "working" }, [el("span", { class: "working-dots", "aria-hidden": "true" }, [el("i"), el("i"), el("i")]), el("span", { text: t("working") })]));
+ messages.append(mark(el("div", { class: "working" }, el("span", { class: "shimmer", text: t("working") })), "working"));
}
+ Object.assign(chatState, { keys, pendingTexts: new Set(pending.map((entry) => entry.text)), hadLive: Boolean(conversation.liveText) });
if (!items.length && !pending.length && !conversation.liveText && !running) {
messages.append(el("div", { class: "chat-empty" }, [
icon(session.projectId ? "folder" : "temporary", "lg"),
@@ -768,7 +855,7 @@
class: "icon-btn jump",
hidden: true,
"aria-label": t("jumpLatest"),
- onclick: () => window.scrollTo({ top: scroller.scrollHeight, behavior: "smooth" }),
+ onclick: () => window.scrollTo({ top: scroller.scrollHeight, behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth" }),
}, icon("down", "sm"));
const dock = el("div", { class: "chat-dock" }, [jump, ...notices, queue, composer]);
const changed = show(`chat:${sessionId}`, head, messages, dock);
@@ -835,7 +922,8 @@
fit();
sync();
document.querySelector(".chat-empty")?.remove();
- document.querySelector(".messages")?.append(message({ role: "user", text }, "pending"));
+ document.querySelector(".messages")?.append(message({ role: "user", text }, "pending enter"));
+ chatState.keys?.add(`pending:${text}`);
document.scrollingElement.scrollTop = document.scrollingElement.scrollHeight;
try {
await api("POST", `/v1/sessions/${enc(sessionId)}/turns`, { text, queue: running }, newKey());
@@ -884,6 +972,7 @@
}
// Move screen-reader focus to the new page title, never into a field.
if (changed) document.getElementById("view-title")?.focus({ preventScroll: true });
+ syncScrolled();
} catch (error) {
if (token !== state.renderToken) return;
if (error instanceof ApiError && error.code === "NOT_FOUND" && route.view !== "home") {
@@ -898,17 +987,22 @@
}
function skeleton(route) {
- const bar = (cls) => el("span", { class: `skeleton ${cls}` });
- const body = route.view === "chat"
- ? el("div", { class: "messages skeleton-chat" }, [bar("bubble user"), bar("line wide"), bar("line"), bar("line short"), bar("bubble user narrow"), bar("line wide"), bar("line")])
- : el("ul", { class: "list skeleton-list" }, Array.from({ length: 6 }, () => el("li", { class: "skeleton-row" }, [bar("title"), bar("meta")])));
- return el("div", { class: "skeleton-page", "aria-busy": "true", "aria-label": t("loading") }, [
- el("div", { class: "header" + (route.view === "home" ? " root" : "") }, [
- route.view === "home" ? null : el("button", { type: "button", class: "icon-btn", "aria-label": t("back"), onclick: () => back("#/projects") }, icon("back")),
- el("div", { class: "header-title" }, bar("heading")),
- ]),
- body,
- ]);
+ const block = (cls) => el("span", { class: `skeleton ${cls}` });
+ const backButton = route.view === "home" && !route.archived
+ ? null
+ : el("button", { type: "button", class: "icon-btn back", "aria-label": t("back"), onclick: () => back("#/projects") }, icon("back"));
+ const parts = route.view === "chat"
+ ? [
+ el("div", { class: "header" }, [backButton, el("div", { class: "header-title" }, [block("heading"), block("sub")])]),
+ el("div", { class: "messages skeleton-chat" }, [block("bubble"), block("line wide"), block("line"), block("line short"), block("bubble narrow"), block("line wide"), block("line")]),
+ ]
+ : [
+ el("div", { class: "header large" }, backButton),
+ el("div", { class: "large-title" }, block("title-lg")),
+ el("div", { class: "toolbar" }, block("field")),
+ el("ul", { class: "list skeleton-list" }, Array.from({ length: 6 }, () => el("li", { class: "skeleton-row" }, [block("title"), block("meta")]))),
+ ];
+ return el("div", { class: "skeleton-page", "aria-busy": "true", "aria-label": t("loading") }, parts);
}
// ---------- pairing ----------
@@ -925,7 +1019,7 @@
setOffline(false);
const code = el("input", {
id: "pair-code", class: "code", inputmode: "numeric", autocomplete: "one-time-code",
- maxlength: "32", required: true, value: prefill, "aria-describedby": "pair-status",
+ maxlength: "32", required: true, value: prefill, placeholder: "000000", "aria-describedby": "pair-status",
});
const label = el("input", { id: "pair-label", maxlength: "60", autocomplete: "off", value: /iPhone|iPad|Android/.exec(navigator.userAgent)?.[0] || "Browser" });
const status = el("p", { id: "pair-status", class: "pair-status", role: "status", text: message || "" });
diff --git a/apps/desktop/resources/lan-webui/locale.js b/apps/desktop/resources/lan-webui/locale.js
index dbc43a6b6..88461c3d7 100644
--- a/apps/desktop/resources/lan-webui/locale.js
+++ b/apps/desktop/resources/lan-webui/locale.js
@@ -16,6 +16,7 @@ window.LAN_LOCALES = {
projects: "Projects",
temporary: "Temporary conversations",
search: "Search",
+ clearSearch: "Clear search",
showArchived: "Archived",
noProjects: "No local projects.",
noMatches: "Nothing matches.",
@@ -78,6 +79,7 @@ window.LAN_LOCALES = {
readOnlySession: "Continue this conversation on the computer.",
offline: "Connection lost. Reconnecting…",
signOut: "Disconnect this device",
+ thisDevice: "This device: {name}",
errors: {
BUSY: "A reply is still running. Queue your message or stop it first.",
MODEL_BUSY: "Wait for the current and queued work to finish before changing models.",
@@ -111,6 +113,7 @@ window.LAN_LOCALES = {
projects: "项目",
temporary: "临时会话",
search: "搜索",
+ clearSearch: "清除搜索",
showArchived: "已归档",
noProjects: "没有本机项目。",
noMatches: "没有匹配项。",
@@ -173,6 +176,7 @@ window.LAN_LOCALES = {
readOnlySession: "请在电脑上继续该会话。",
offline: "连接已断开,正在重连…",
signOut: "断开此设备",
+ thisDevice: "本设备:{name}",
errors: {
BUSY: "回复仍在进行。可以排队发送,或先停止。",
MODEL_BUSY: "请等当前任务和排队任务结束后再切换模型。",
diff --git a/apps/desktop/resources/lan-webui/styles.css b/apps/desktop/resources/lan-webui/styles.css
index 18cda889b..db0e9b513 100644
--- a/apps/desktop/resources/lan-webui/styles.css
+++ b/apps/desktop/resources/lan-webui/styles.css
@@ -9,10 +9,15 @@
own (CSP `style-src 'self'`), so the subset of tokens it needs is copied here
under the same names; keep the values in step with tokens.css.
+ Phone deviations from the Desktop density (spec W07): a 16px reading size for
+ answers, rows and fields (iOS does not zoom a 16px field on focus), a 44 × 44
+ CSS px target behind every action even where the visible shape is smaller,
+ large list titles that hand over to a compact bar title on scroll, and
+ action sheets that rise from the bottom edge. Every text column aligns to
+ one gutter; icon buttons sit optically on it.
+
Dark is the default, light follows the system preference — the same outcome
- as Desktop's "system" theme. Two phone-only deviations: form fields use
- --text-lg (16px) so iOS Safari does not zoom on focus, and every action keeps
- a 44 × 44 CSS px target (spec W07).
+ as Desktop's "system" theme.
*/
:root {
@@ -40,7 +45,9 @@
--ds-send-disabled-bg: color-mix(in oklab, #ffffff 18%, transparent);
--ds-send-disabled-fg: color-mix(in oklab, #181818 70%, transparent);
--ds-scrim: color-mix(in oklab, #000000 45%, transparent);
- --ds-header-bg: color-mix(in oklab, #181818 86%, transparent);
+ --ds-header-bg: color-mix(in oklab, #181818 84%, transparent);
+ --ds-hairline: color-mix(in oklab, #ffffff 10%, transparent);
+ --ds-grabber: color-mix(in oklab, #ffffff 22%, transparent);
--ds-success: #40c977;
--ds-warning: #ff8549;
--ds-error: #ff6764;
@@ -49,17 +56,24 @@
--ds-code-bg: #282c34;
--ds-code-ink: #abb2bf;
--ds-code-head-bg: color-mix(in oklab, #ffffff 4%, transparent);
- --ds-inline-code-bg: color-mix(in oklab, #ffffff 7%, transparent);
+ --ds-inline-code-bg: color-mix(in oklab, #ffffff 8%, transparent);
--ds-elevation-stroke: 0 0 0 0.5px color-mix(in oklab, #ffffff 12%, transparent);
--ds-shadow-dialog: 0 16px 48px rgba(0, 0, 0, 0.55);
+ --ds-shadow-float: 0 2px 8px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.4);
+ --ds-shadow-fab: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45);
--ds-shadow-composer: 0 3px 7.5px #0000000a, 0 0 20px #0000000d;
- --ds-shadow-fab: 0 6px 20px rgba(0, 0, 0, 0.4);
+ /* Composer focus deepens the lift; the shell never gains a stroke (D297). */
+ --ds-shadow-composer-focus: 0 7px 24px color-mix(in oklab, #ffffff 9%, transparent);
+ /* On charcoal a faint edge separates the pill from the page. */
+ --ds-composer-edge: 0 0 0 0.5px color-mix(in oklab, #ffffff 9%, transparent);
--radius-3xs: 4px;
+ --radius-2xs: 6px;
--radius-xs: 8px;
--radius-sm: 10px;
--radius-md: 12px;
--radius-md-plus: 14px;
+ --radius-lg: 16px;
--radius-lg-plus: 18px;
--radius-xl: 20px;
--radius-2xl: 24px;
@@ -83,22 +97,36 @@
--font-weight-medium: 500;
--font-weight-strong: 560;
--font-weight-semibold: 600;
+ --leading-heading: 1.15;
--leading-tight: 1.25;
+ --leading-compact: 1.3;
--leading-normal: 1.4;
--leading-body: 1.45;
--leading-relaxed: 1.5;
--leading-chat: 1.55;
+ --leading-prose: 1.6;
+ --tracking-tighter: -0.03em;
--tracking-tight: -0.02em;
+ --tracking-snug: -0.01em;
+ --tracking-wide: 0.02em;
/* The one wide tracking: six pairing digits read as separate glyphs. */
- --tracking-code: 0.24em;
+ --tracking-code: 0.3em;
--motion-duration-fast: 150ms;
--motion-duration-normal: 200ms;
+ --motion-duration-slow: 300ms;
--motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
+ --motion-ease-in: cubic-bezier(0.4, 0, 1, 1);
--tap: 44px;
- --pad-left: max(16px, env(safe-area-inset-left));
- --pad-right: max(16px, env(safe-area-inset-right));
+ --gutter: 16px;
+ --pad-left: max(var(--gutter), env(safe-area-inset-left));
+ --pad-right: max(var(--gutter), env(safe-area-inset-right));
+ /* Icon buttons carry 12px of air around a 20px glyph; this pulls the glyph
+ back onto the text gutter. */
+ --optical: 12px;
+ --bar: 52px;
+ --bar-large: 48px;
}
@media (prefers-color-scheme: light) {
@@ -122,12 +150,14 @@
--ds-field-inset-bg: #f3f3f3;
--ds-field-inset-focus-bg: #ffffff;
--ds-placeholder-ink: #8e8e90;
- --ds-tool-row-bg: color-mix(in oklab, #1a1c1f 3%, transparent);
+ --ds-tool-row-bg: color-mix(in oklab, #1a1c1f 3.5%, transparent);
--ds-stop-bg: color-mix(in oklab, #1a1c1f 10%, transparent);
--ds-send-disabled-bg: #8e8e90;
--ds-send-disabled-fg: #ffffff;
--ds-scrim: color-mix(in oklab, #1a1c1f 28%, transparent);
- --ds-header-bg: color-mix(in oklab, #ffffff 86%, transparent);
+ --ds-header-bg: color-mix(in oklab, #ffffff 84%, transparent);
+ --ds-hairline: color-mix(in oklab, #1a1c1f 10%, transparent);
+ --ds-grabber: color-mix(in oklab, #1a1c1f 18%, transparent);
--ds-success: #00a240;
--ds-warning: #e25507;
--ds-error: #e02e2a;
@@ -138,7 +168,10 @@
--ds-inline-code-bg: color-mix(in oklab, #1a1c1f 6%, transparent);
--ds-elevation-stroke: 0 0 0 0.5px color-mix(in oklab, #1a1c1f 12%, transparent);
--ds-shadow-dialog: 0 16px 48px rgba(0, 0, 0, 0.12);
- --ds-shadow-fab: 0 6px 20px rgba(0, 0, 0, 0.16);
+ --ds-shadow-float: 0 2px 8px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.1);
+ --ds-shadow-fab: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.16);
+ --ds-shadow-composer-focus: 0 7px 24px color-mix(in oklab, #1a1c1f 9%, transparent);
+ --ds-composer-edge: 0 0 0 0.5px color-mix(in oklab, #1a1c1f 8%, transparent);
}
}
@@ -164,6 +197,9 @@ html {
background: var(--ds-bg-primary);
caret-color: var(--ds-text-primary);
accent-color: var(--ds-accent);
+ /* Focused or revealed content never hides under the sticky bar. */
+ scroll-padding-top: calc(var(--bar) + env(safe-area-inset-top) + 8px);
+ -webkit-tap-highlight-color: transparent;
}
html,
body {
@@ -173,12 +209,12 @@ body {
body {
overflow-x: hidden;
font-family: var(--font-sans);
- font-size: var(--text-base-plus);
+ font-size: var(--text-lg);
line-height: var(--leading-body);
color: var(--ds-text-primary);
background: var(--ds-bg-primary);
-webkit-font-smoothing: antialiased;
- -webkit-tap-highlight-color: transparent;
+ -moz-osx-font-smoothing: grayscale;
}
main {
display: flex;
@@ -199,13 +235,13 @@ p {
color: var(--ds-text-primary);
}
:focus-visible {
- outline: 1.5px solid color-mix(in oklab, var(--ds-accent) 80%, transparent);
+ outline: 2px solid color-mix(in oklab, var(--ds-accent) 80%, transparent);
outline-offset: 2px;
}
+/* Fields carry their own focus treatment; titles take focus for screen readers only. */
[tabindex="-1"]:focus,
input:focus-visible,
textarea:focus-visible {
- /* Fields carry their own focus treatment; the generic outline is for controls. */
outline: none;
}
.sr-only {
@@ -221,12 +257,15 @@ textarea:focus-visible {
}
/* Chrome is not selectable; transcript text, fields and toasts are. */
.header,
+.large-title,
.toolbar,
.row,
button,
+summary,
.sheet,
.notice,
-.status-pill {
+.status-pill,
+.section-label {
-webkit-user-select: none;
user-select: none;
}
@@ -238,7 +277,8 @@ textarea {
user-select: text;
}
-/* Icons are decoration: a tap always lands on the control that owns them. */
+/* Icons are decoration: a tap always lands on the control that owns them.
+ Smaller glyphs get a heavier stroke so every size reads at ~1.4px. */
.icon {
flex: none;
pointer-events: none;
@@ -253,15 +293,17 @@ textarea {
.icon.sm {
width: 16px;
height: 16px;
+ stroke-width: 2;
}
.icon.xs {
- width: 13px;
- height: 13px;
+ width: 14px;
+ height: 14px;
+ stroke-width: 2.25;
}
.icon.lg {
- width: 40px;
- height: 40px;
- stroke-width: 1.5;
+ width: 36px;
+ height: 36px;
+ stroke-width: 1.35;
}
/* ---------- controls ---------- */
@@ -279,18 +321,26 @@ button {
background: transparent;
color: inherit;
font: inherit;
- font-size: var(--text-base);
+ font-size: var(--text-base-plus);
font-weight: var(--font-weight-medium);
+ line-height: var(--leading-tight);
cursor: pointer;
touch-action: manipulation;
+ -webkit-touch-callout: none;
transition:
- background-color var(--motion-duration-fast) var(--motion-ease-out),
- color var(--motion-duration-fast) var(--motion-ease-out),
- opacity var(--motion-duration-fast) var(--motion-ease-out),
- scale var(--motion-duration-fast) var(--motion-ease-out);
+ background-color var(--motion-duration-normal) var(--motion-ease-out),
+ color var(--motion-duration-normal) var(--motion-ease-out),
+ opacity var(--motion-duration-normal) var(--motion-ease-out),
+ scale var(--motion-duration-normal) var(--motion-ease-out),
+ box-shadow var(--motion-duration-normal) var(--motion-ease-out);
}
+/* A press answers at once; the release eases back. */
button:active:not(:disabled) {
background-color: var(--ds-bg-active);
+ transition-duration: 60ms;
+}
+:is(.icon-btn, .primary, .secondary, .link, .model-trigger, .load-older):active:not(:disabled) {
+ scale: 0.96;
}
@media (hover: hover) {
button:hover:not(:disabled) {
@@ -298,7 +348,7 @@ button:active:not(:disabled) {
}
}
button:disabled {
- opacity: 0.45;
+ opacity: 0.4;
cursor: not-allowed;
}
button.primary {
@@ -313,7 +363,6 @@ button.primary {
}
button.primary:active:not(:disabled) {
background-color: var(--ds-accent-hover);
- scale: 0.98;
}
button.secondary {
background-color: var(--ds-tile-hover);
@@ -324,6 +373,7 @@ button.danger {
}
button.link {
color: var(--ds-text-secondary);
+ font-weight: var(--font-weight-normal);
}
button.icon-btn {
width: var(--tap);
@@ -337,41 +387,46 @@ textarea {
width: 100%;
min-height: var(--tap);
margin: 0;
- padding: 10px 14px;
+ padding: 11px 14px;
border: 0;
- border-radius: var(--radius-sm);
+ border-radius: var(--radius-md);
outline: none;
background: var(--ds-field-inset-bg);
color: var(--ds-text-primary);
font: inherit;
font-size: var(--text-lg);
line-height: var(--leading-body);
+ -webkit-appearance: none;
+ appearance: none;
transition:
- background-color var(--motion-duration-fast) var(--motion-ease-out),
- box-shadow var(--motion-duration-fast) var(--motion-ease-out);
+ background-color var(--motion-duration-normal) var(--motion-ease-out),
+ box-shadow var(--motion-duration-normal) var(--motion-ease-out);
}
input:focus,
textarea:focus {
background: var(--ds-field-inset-focus-bg);
- box-shadow: 0 0 0 2px color-mix(in oklab, var(--ds-accent) 40%, transparent);
+ box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--ds-accent) 28%, transparent);
}
input::placeholder,
textarea::placeholder {
color: var(--ds-placeholder-ink);
opacity: 1;
}
-input[type="search"]::-webkit-search-decoration {
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
+ appearance: none;
+ display: none;
}
label {
display: block;
- margin: 18px 0 6px;
+ margin: 20px 0 8px;
color: var(--ds-text-secondary);
font-size: var(--text-md);
font-weight: var(--font-weight-medium);
}
-/* ---------- header ---------- */
+/* ---------- bar ---------- */
.header {
position: sticky;
top: 0;
@@ -379,19 +434,18 @@ label {
display: flex;
align-items: center;
gap: 2px;
- min-height: calc(52px + env(safe-area-inset-top));
+ min-height: calc(var(--bar) + env(safe-area-inset-top));
margin: 0 calc(-1 * var(--pad-right)) 0 calc(-1 * var(--pad-left));
- padding: env(safe-area-inset-top) max(6px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left));
+ padding: env(safe-area-inset-top) calc(var(--pad-right) - var(--optical)) 0 calc(var(--pad-left) - var(--optical));
background: var(--ds-header-bg);
-webkit-backdrop-filter: saturate(180%) blur(20px);
backdrop-filter: saturate(180%) blur(20px);
transition: box-shadow var(--motion-duration-normal) var(--motion-ease-out);
}
-.scrolled .header {
- box-shadow: 0 0.5px 0 color-mix(in oklab, var(--ds-text-primary) 12%, transparent);
-}
-.header.root {
- min-height: calc(60px + env(safe-area-inset-top));
+/* The hairline appears only once something scrolls beneath the bar. */
+.scrolled .header:not(.large),
+.collapsed .header.large {
+ box-shadow: 0 0.5px 0 var(--ds-hairline);
}
.header-title {
display: flex;
@@ -399,24 +453,21 @@ label {
min-width: 0;
flex-direction: column;
justify-content: center;
- padding: 0 6px;
+ gap: 1px;
+ padding: 0 4px;
}
-.header.root .header-title {
- padding-left: 10px;
+.header > .back + .header-title {
+ padding-left: 0;
}
.header h1 {
overflow: hidden;
font-size: var(--text-lg);
font-weight: var(--font-weight-semibold);
line-height: var(--leading-tight);
+ letter-spacing: var(--tracking-snug);
text-overflow: ellipsis;
white-space: nowrap;
}
-.header.root h1 {
- font-size: 26px;
- font-weight: var(--font-weight-strong);
- letter-spacing: var(--tracking-tight);
-}
.header-sub {
display: flex;
align-items: center;
@@ -424,7 +475,8 @@ label {
min-width: 0;
overflow: hidden;
color: var(--ds-text-muted);
- font-size: var(--text-xs-plus);
+ font-size: var(--text-sm-plus);
+ line-height: var(--leading-compact);
white-space: nowrap;
}
/* The model label gives way first; the status entry keeps its text. */
@@ -436,44 +488,112 @@ label {
}
.header-sub .scope {
flex: none;
- max-width: 50%;
+ max-width: 55%;
}
.header-sub .meta-text {
overflow: hidden;
text-overflow: ellipsis;
}
-/* ---------- list toolbar ---------- */
-.toolbar {
+/* List pages: a slimmer bar whose compact title waits for the large one. */
+.header.large {
+ min-height: calc(var(--bar-large) + env(safe-area-inset-top));
+}
+.header-spacer {
+ flex: 1;
+}
+.header-compact {
+ position: absolute;
+ right: 60px;
+ bottom: 0;
+ left: 60px;
display: flex;
align-items: center;
- gap: 8px;
- padding: 4px 0 12px;
+ justify-content: center;
+ height: var(--bar-large);
+ font-size: var(--text-lg);
+ font-weight: var(--font-weight-semibold);
+ letter-spacing: var(--tracking-snug);
+ opacity: 0;
+ translate: 0 3px;
+ pointer-events: none;
+ transition:
+ opacity var(--motion-duration-normal) var(--motion-ease-out),
+ translate var(--motion-duration-normal) var(--motion-ease-out);
+}
+.header-compact > span {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.collapsed .header-compact {
+ opacity: 1;
+ translate: 0 0;
+}
+.large-title {
+ padding: 2px 0 16px;
+}
+.large-title h1 {
+ font-size: var(--text-2xl);
+ font-weight: var(--font-weight-strong);
+ line-height: var(--leading-heading);
+ letter-spacing: var(--tracking-tight);
+ overflow-wrap: anywhere;
+ text-wrap: balance;
+}
+.large-sub {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 4px 12px;
+ margin-top: 6px;
+ color: var(--ds-text-muted);
+ font-size: var(--text-md-plus);
+}
+
+/* ---------- search ---------- */
+.toolbar {
+ padding: 0 0 22px;
}
.search {
position: relative;
- flex: 1;
- min-width: 0;
}
-.search .icon {
+.search > .icon {
position: absolute;
top: 50%;
- left: 14px;
+ left: 13px;
translate: 0 -50%;
color: var(--ds-text-muted);
- pointer-events: none;
}
.search input {
- padding-left: 40px;
- border-radius: var(--radius-full);
+ padding: 0 44px 0 38px;
+ background: var(--ds-field-inset-bg);
+}
+.search-clear {
+ position: absolute;
+ top: 0;
+ right: 0;
+ color: var(--ds-text-muted);
+ animation: fade-in var(--motion-duration-fast) var(--motion-ease-out);
}
/* ---------- lists ---------- */
+.section + .section {
+ margin-top: 26px;
+}
+.section-label {
+ margin-bottom: 6px;
+ color: var(--ds-text-muted);
+ font-size: var(--text-md);
+ font-weight: var(--font-weight-medium);
+ line-height: var(--leading-normal);
+}
+/* Rows bleed 8px into the gutter so their text lines up with the titles above
+ while the pressed tile still has room to breathe. */
.list {
display: flex;
flex-direction: column;
gap: 2px;
- margin: 0;
+ margin: 0 -8px;
padding: 0;
list-style: none;
}
@@ -482,16 +602,11 @@ label {
display: flex;
align-items: center;
border-radius: var(--radius-md);
- transition: background-color var(--motion-duration-fast) var(--motion-ease-out);
+ transition: background-color var(--motion-duration-slow) var(--motion-ease-out);
}
-.row:has(.row-main:active) {
+.row:has(> .row-main:active) {
background-color: var(--ds-bg-active);
- scale: 0.985;
-}
-.row {
- transition:
- background-color var(--motion-duration-fast) var(--motion-ease-out),
- scale var(--motion-duration-fast) var(--motion-ease-out);
+ transition-duration: 0s;
}
@media (hover: hover) {
.row:hover {
@@ -503,71 +618,85 @@ label {
justify-content: flex-start;
gap: 12px;
min-width: 0;
- min-height: 56px;
- padding: 8px 6px 8px 12px;
+ min-height: 52px;
+ padding: 10px 4px 10px 8px;
border-radius: inherit;
text-align: left;
+ font-size: inherit;
font-weight: var(--font-weight-normal);
}
.row-main:active:not(:disabled),
.row-main:hover:not(:disabled) {
background-color: transparent;
}
+.row-main:focus-visible {
+ outline-offset: -2px;
+}
.row-icon {
display: inline-flex;
- flex: none;
- align-items: center;
- justify-content: center;
- width: 36px;
- height: 36px;
- border-radius: var(--radius-sm);
- background: var(--ds-tile-hover);
color: var(--ds-text-secondary);
}
-.row-icon .icon {
- width: 18px;
- height: 18px;
-}
.row-text {
display: flex;
flex: 1;
min-width: 0;
flex-direction: column;
- gap: 2px;
+ gap: 3px;
+}
+.row-head {
+ display: flex;
+ align-items: baseline;
+ gap: 12px;
+ min-width: 0;
}
.row-title {
+ flex: 1;
+ min-width: 0;
overflow: hidden;
color: var(--ds-text-primary);
- font-size: var(--text-base-plus);
- font-weight: var(--font-weight-medium);
+ font-size: var(--text-lg);
line-height: var(--leading-tight);
+ letter-spacing: var(--tracking-snug);
text-overflow: ellipsis;
white-space: nowrap;
}
+.row-time {
+ flex: none;
+ color: var(--ds-text-muted);
+ font-size: var(--text-md);
+ font-variant-numeric: tabular-nums;
+}
.row-meta {
display: flex;
flex-wrap: wrap;
align-items: center;
- gap: 2px 10px;
+ gap: 2px 12px;
color: var(--ds-text-muted);
- font-size: var(--text-sm);
+ font-size: var(--text-md);
line-height: var(--leading-normal);
}
+.row-more {
+ flex: none;
+ color: var(--ds-text-muted);
+}
+/* On two-line rows the menu sits on the title line, beside the time. */
+.row:has(.row-meta) > .row-more {
+ align-self: flex-start;
+ margin-top: -2px;
+}
.meta-item {
display: inline-flex;
align-items: center;
- gap: 4px;
+ gap: 5px;
+ min-width: 0;
}
-.row-time {
- flex: none;
+.meta-item .icon {
color: var(--ds-text-faint);
- font-size: var(--text-sm);
- font-variant-numeric: tabular-nums;
}
-.row-more {
- flex: none;
- margin-right: 2px;
+.hint {
+ padding: 6px 0 2px;
color: var(--ds-text-muted);
+ font-size: var(--text-md-plus);
}
.dot {
@@ -577,6 +706,7 @@ label {
border-radius: var(--radius-round);
background: var(--ds-text-muted);
}
+/* Two breaths, then steady: the colour and the text carry the state. */
.dot.running {
background: var(--ds-warning);
animation: breathe 1.6s ease-in-out 2;
@@ -592,89 +722,101 @@ label {
display: flex;
flex-direction: column;
align-items: center;
- gap: 12px;
- padding: 56px 16px;
+ gap: 14px;
+ padding: 72px 24px;
color: var(--ds-text-muted);
- font-size: var(--text-md-plus);
+ font-size: var(--text-base-plus);
text-align: center;
+ text-wrap: balance;
}
-.empty .icon,
-.chat-empty .icon {
- box-sizing: content-box;
- width: 28px;
- height: 28px;
- padding: 18px;
- border-radius: var(--radius-round);
- background: var(--ds-tile);
- color: var(--ds-text-muted);
+.empty .icon {
+ color: var(--ds-text-faint);
}
-.section {
- margin-bottom: 16px;
-}
-.section-label {
- margin: 14px 12px 6px;
- letter-spacing: 0.01em;
- color: var(--ds-text-muted);
- font-size: var(--text-sm);
- font-weight: var(--font-weight-medium);
- line-height: var(--leading-normal);
-}
-.hint {
- padding: 4px 12px 8px;
- color: var(--ds-text-muted);
- font-size: var(--text-md);
-}
.footer {
display: flex;
flex-direction: column;
margin-top: auto;
- padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
+ padding: 28px 0 8px;
}
.footer-link {
justify-content: flex-start;
gap: 12px;
- min-height: 48px;
- padding: 0 12px;
+ min-height: 52px;
+ margin: 0 -8px;
+ padding: 0 12px 0 8px;
border-radius: var(--radius-md);
color: var(--ds-text-secondary);
- font-size: var(--text-base);
+ font-size: var(--text-lg);
font-weight: var(--font-weight-normal);
}
+.footer-link .icon:first-child {
+ width: 20px;
+ height: 20px;
+ stroke-width: 1.75;
+}
.footer-link .icon:last-child {
margin-left: auto;
color: var(--ds-text-faint);
}
-.footer .signout {
- align-self: center;
- margin-top: 12px;
+.device {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 2px;
+ margin-top: 32px;
+}
+.device-name {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ max-width: 100%;
color: var(--ds-text-muted);
- font-size: var(--text-md);
- font-weight: var(--font-weight-normal);
+ font-size: var(--text-sm-plus);
+}
+.device-name span {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.device .signout {
+ color: var(--ds-text-muted);
+ font-size: var(--text-md-plus);
}
-/* New conversation: a capsule within thumb reach (spec W07). */
+/* New conversation: a capsule within thumb reach (spec W07). The list fades
+ out beneath it instead of colliding with it. */
main > button.fab {
position: fixed;
- z-index: 2;
+ z-index: 3;
right: 0;
- bottom: calc(16px + env(safe-area-inset-bottom));
+ bottom: calc(14px + env(safe-area-inset-bottom));
left: 0;
+ gap: 8px;
width: max-content;
max-width: calc(100% - 32px);
- min-height: 50px;
+ min-height: 48px;
margin: 0 auto;
padding: 0 22px 0 18px;
border-radius: var(--radius-full);
box-shadow: var(--ds-shadow-fab);
font-size: var(--text-base-plus);
+ letter-spacing: var(--tracking-snug);
}
-main > button.fab:active:not(:disabled) {
- scale: 0.96;
+main:has(> .fab)::after {
+ content: "";
+ position: fixed;
+ z-index: 2;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ height: calc(84px + env(safe-area-inset-bottom));
+ background: linear-gradient(to top, var(--ds-bg-primary) 30%, color-mix(in oklab, var(--ds-bg-primary) 0%, transparent));
+ pointer-events: none;
}
.fab-spacer {
flex: none;
- height: calc(88px + env(safe-area-inset-bottom));
+ height: calc(84px + env(safe-area-inset-bottom));
}
/* ---------- conversation ---------- */
@@ -683,81 +825,86 @@ main > button.fab:active:not(:disabled) {
flex: 1;
flex-direction: column;
gap: 16px;
- padding: 16px 0 24px;
+ padding: 16px 0 28px;
}
-/* A new exchange gets a little more air than the parts of one answer. */
+/* A new exchange gets more air than the parts of one answer. */
.messages > .msg.user:not(:first-child) {
- margin-top: 8px;
+ margin-top: 12px;
}
+/* A 34px capsule inside a 44px target: the transparent border is the margin. */
.load-older {
align-self: center;
+ padding: 0 14px;
+ border: 5px solid transparent;
border-radius: var(--radius-full);
- background-color: var(--ds-tile);
+ background-color: var(--ds-tile-hover);
+ background-clip: padding-box;
color: var(--ds-text-secondary);
font-size: var(--text-md);
}
.msg {
min-width: 0;
- font-size: var(--text-base-plus);
- line-height: var(--leading-chat);
+ font-size: var(--text-lg);
+ line-height: var(--leading-prose);
white-space: pre-wrap;
overflow-wrap: anywhere;
word-break: normal;
}
.msg.user {
align-self: flex-end;
- max-width: min(82%, 560px);
- padding: 10px 14px;
- border-radius: var(--radius-xl);
- border-bottom-right-radius: 6px;
+ max-width: min(84%, 560px);
+ padding: 9px 15px 10px;
+ border-radius: var(--radius-lg-plus);
+ border-bottom-right-radius: var(--radius-xs);
background: var(--ds-tile-deep);
- line-height: var(--leading-relaxed);
+ line-height: var(--leading-chat);
+}
+.msg.user.pending {
+ opacity: 0.55;
}
.msg.assistant {
align-self: stretch;
- padding-inline: 2px;
-}
-.msg.user.pending {
- opacity: 0.6;
- transition: opacity var(--motion-duration-normal) var(--motion-ease-out);
}
.msg.tool {
- display: flex;
- align-items: flex-start;
+ display: inline-flex;
+ align-items: center;
align-self: flex-start;
gap: 8px;
max-width: 100%;
- padding: 8px 12px;
+ min-height: 36px;
+ padding: 7px 12px;
border-radius: var(--radius-sm);
background: var(--ds-tool-row-bg);
color: var(--ds-text-secondary);
- font-size: var(--text-sm-plus);
+ font-size: var(--text-md-plus);
line-height: var(--leading-normal);
+ white-space: normal;
}
.msg.tool .icon {
- margin-top: 1px;
color: var(--ds-text-muted);
}
-/* Long tool commands stay two lines on a phone instead of a wall of text. */
.msg.tool > span:last-child {
- display: -webkit-box;
min-width: 0;
overflow: hidden;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+/* Content that arrives while the reader watches settles in; nothing else moves. */
+.messages > .enter {
+ animation: rise-in var(--motion-duration-normal) var(--motion-ease-out) both;
}
/* The streaming caret describes work in flight, so it may keep animating. */
.msg.live > :is(p, h1, h2, h3, h4, h5, h6):last-child::after,
.msg.live > :is(ul, ol):last-child > li:last-child > :last-child::after {
content: "";
display: inline-block;
- width: 0.5em;
+ width: 0.45em;
height: 1.05em;
margin-left: 3px;
vertical-align: text-bottom;
border-radius: 2px;
background: currentColor;
- opacity: 0.55;
+ opacity: 0.5;
animation: caret 1s steps(2, jump-none) infinite;
}
@@ -772,37 +919,40 @@ main > button.fab:active:not(:disabled) {
margin-bottom: 0;
}
.md p {
- margin: 0.65em 0;
+ margin: 0.75em 0;
+ text-wrap: pretty;
}
.md :is(h1, h2, h3, h4, h5, h6) {
- margin: 1.15em 0 0.4em;
+ margin: 1.4em 0 0.5em;
font-weight: var(--font-weight-semibold);
line-height: var(--leading-tight);
- letter-spacing: var(--tracking-tight);
+ letter-spacing: var(--tracking-snug);
+ text-wrap: balance;
}
.md h1 {
- font-size: var(--text-xl);
+ font-size: 1.375em;
+ letter-spacing: var(--tracking-tight);
}
.md h2 {
- font-size: var(--text-lg-plus);
+ font-size: 1.25em;
}
.md h3 {
- font-size: var(--text-lg);
+ font-size: 1.125em;
}
.md h4 {
- font-size: var(--text-base-plus);
+ font-size: 1em;
}
.md :is(h5, h6) {
color: var(--ds-text-secondary);
- font-size: var(--text-base);
+ font-size: 0.9375em;
}
.md :is(ul, ol) {
- margin: 0.65em 0;
- padding-left: 1.4em;
+ margin: 0.75em 0;
+ padding-left: 1.375em;
}
.md li {
- margin: 0.28em 0;
- padding-left: 0.15em;
+ margin: 0.3em 0;
+ padding-left: 0.2em;
}
.md li > p {
margin: 0.2em 0;
@@ -810,11 +960,14 @@ main > button.fab:active:not(:disabled) {
.md li::marker {
color: var(--ds-text-muted);
}
+.md ol > li::marker {
+ font-variant-numeric: tabular-nums;
+}
+/* A quiet rail, no fill: the Desktop prose quote. */
.md blockquote {
- margin: 0.85em 0;
- padding: 0.55em 0.9em;
- border-radius: var(--radius-md);
- background: var(--ds-tile);
+ margin: 0.9em 0;
+ padding: 0.1em 0 0.1em 0.9em;
+ box-shadow: inset 2px 0 0 var(--ds-tile-deep);
color: var(--ds-text-secondary);
}
.md blockquote > :first-child {
@@ -826,7 +979,7 @@ main > button.fab:active:not(:disabled) {
/* A thematic break is pure space: no line is drawn (D297). */
.md hr {
height: 0;
- margin: 1.4em 0;
+ margin: 1.5em 0;
border: 0;
}
.md strong {
@@ -838,16 +991,21 @@ main > button.fab:active:not(:disabled) {
.md a {
color: var(--ds-text-primary);
text-decoration-line: underline;
- text-decoration-color: color-mix(in oklab, var(--ds-text-primary) 32%, transparent);
+ text-decoration-color: color-mix(in oklab, var(--ds-text-primary) 30%, transparent);
text-decoration-thickness: 1px;
text-underline-offset: 3px;
+ transition: text-decoration-color var(--motion-duration-fast) var(--motion-ease-out);
+}
+.md a:active,
+.md a:hover {
+ text-decoration-color: currentColor;
}
.md code {
- padding: 0.14em 0.4em;
+ padding: 0.12em 0.38em;
border-radius: var(--radius-3xs);
background: var(--ds-inline-code-bg);
font-family: var(--font-mono);
- font-size: var(--text-md);
+ font-size: 0.85em;
font-variant-ligatures: none;
overflow-wrap: anywhere;
-webkit-box-decoration-break: clone;
@@ -856,16 +1014,16 @@ main > button.fab:active:not(:disabled) {
.md-image {
display: inline-flex;
align-items: center;
- gap: 4px;
- padding: 0 8px;
+ gap: 5px;
+ padding: 1px 9px;
border-radius: var(--radius-full);
background: var(--ds-tile-deep);
color: var(--ds-text-secondary);
- font-size: var(--text-sm);
+ font-size: var(--text-md);
vertical-align: baseline;
}
.code-block {
- margin: 0.9em 0;
+ margin: 1em 0;
overflow: hidden;
border-radius: var(--radius-md-plus);
background: var(--ds-code-bg);
@@ -883,26 +1041,25 @@ main > button.fab:active:not(:disabled) {
color: color-mix(in oklab, var(--ds-code-ink) 72%, transparent);
font-family: var(--font-mono);
font-size: var(--text-xs-plus);
+ letter-spacing: var(--tracking-wide);
-webkit-user-select: none;
user-select: none;
}
/* A 44px target inside a 36px band: the negative margin keeps the band slim. */
.code-copy {
margin: -4px 0;
- border-radius: var(--radius-xs);
color: color-mix(in oklab, var(--ds-code-ink) 72%, transparent);
}
.code-block pre {
margin: 0;
- padding: 12px 14px;
+ padding: 12px 14px 14px;
overflow-x: auto;
overscroll-behavior-x: contain;
- -webkit-overflow-scrolling: touch;
scrollbar-width: none;
font-family: var(--font-mono);
- font-size: var(--text-sm-plus);
+ font-size: var(--text-md);
+ line-height: var(--leading-prose);
tab-size: 2;
- line-height: var(--leading-relaxed);
white-space: pre;
-webkit-user-select: text;
user-select: text;
@@ -917,10 +1074,9 @@ main > button.fab:active:not(:disabled) {
display: none;
}
.table-wrap {
- margin: 0.9em 0;
+ margin: 1em 0;
overflow-x: auto;
overscroll-behavior-x: contain;
- -webkit-overflow-scrolling: touch;
scrollbar-width: none;
border-radius: var(--radius-md-plus);
background: var(--ds-tile);
@@ -928,11 +1084,11 @@ main > button.fab:active:not(:disabled) {
.md table {
min-width: 100%;
border-collapse: collapse;
- font-size: var(--text-md);
+ font-size: var(--text-base);
line-height: var(--leading-normal);
}
.md :is(th, td) {
- padding: 8px 12px;
+ padding: 9px 14px;
text-align: left;
vertical-align: top;
}
@@ -949,42 +1105,60 @@ main > button.fab:active:not(:disabled) {
}
.md .align-right {
text-align: right;
+ font-variant-numeric: tabular-nums;
}
/* ---------- transcript extras ---------- */
.steps {
align-self: flex-start;
max-width: 100%;
- border-radius: var(--radius-sm);
+ border-radius: var(--radius-md);
background: var(--ds-tool-row-bg);
color: var(--ds-text-secondary);
- font-size: var(--text-sm-plus);
+ font-size: var(--text-md-plus);
}
+/* A 36px summary with a 44px target. */
.steps summary {
+ position: relative;
display: flex;
align-items: center;
gap: 8px;
- min-height: var(--tap);
+ min-height: 36px;
padding: 0 10px 0 12px;
+ border-radius: inherit;
list-style: none;
cursor: pointer;
- -webkit-user-select: none;
- user-select: none;
+ transition: background-color var(--motion-duration-normal) var(--motion-ease-out);
+}
+.steps summary::after {
+ content: "";
+ position: absolute;
+ inset: -4px 0;
}
.steps summary::-webkit-details-marker {
display: none;
}
+.steps summary:active {
+ background-color: var(--ds-bg-active);
+ transition-duration: 60ms;
+}
+@media (hover: hover) {
+ .steps summary:hover {
+ background-color: var(--ds-bg-hover);
+ }
+}
.steps summary .icon {
color: var(--ds-text-muted);
}
.steps summary > .icon:last-child {
- transition: rotate var(--motion-duration-fast) var(--motion-ease-out);
+ transition: rotate var(--motion-duration-normal) var(--motion-ease-out);
}
.steps[open] summary > .icon:last-child {
rotate: 90deg;
}
.steps-count {
flex: none;
+ color: var(--ds-text-primary);
font-weight: var(--font-weight-medium);
}
.steps-names {
@@ -997,43 +1171,42 @@ main > button.fab:active:not(:disabled) {
.steps-list {
display: flex;
flex-direction: column;
- padding: 0 0 6px;
+ padding: 2px 0 8px;
+}
+.steps[open] .steps-list {
+ animation: fade-in var(--motion-duration-normal) var(--motion-ease-out);
}
.steps-list .msg.tool {
+ min-height: 30px;
padding: 4px 12px;
background: transparent;
}
.msg-actions {
display: flex;
- margin: -12px 0 -6px -12px;
+ margin: -12px 0 0 calc(-1 * var(--optical));
}
.msg-actions .icon-btn {
color: var(--ds-text-muted);
}
+.icon-btn.copied {
+ color: var(--ds-success);
+}
+/* Work in flight: a sweep of light across the label, as Desktop's Thinking. */
.working {
display: flex;
align-items: center;
- gap: 10px;
- color: var(--ds-text-muted);
- font-size: var(--text-md-plus);
-}
-.working-dots {
- display: inline-flex;
- gap: 4px;
-}
-/* In-flight work may keep animating (design system 4.5). */
-.working-dots i {
- width: 6px;
- height: 6px;
- border-radius: var(--radius-round);
- background: currentColor;
- animation: pulse 1.2s ease-in-out infinite;
-}
-.working-dots i:nth-child(2) {
- animation-delay: 0.15s;
+ min-height: 26px;
+ font-size: var(--text-base-plus);
}
-.working-dots i:nth-child(3) {
- animation-delay: 0.3s;
+.shimmer {
+ color: transparent;
+ background-image: linear-gradient(90deg, var(--ds-text-muted) 0%, var(--ds-text-muted) 35%, var(--ds-text-primary) 50%, var(--ds-text-muted) 65%, var(--ds-text-muted) 100%);
+ background-size: 280% 100%;
+ background-position: 100% 0;
+ -webkit-background-clip: text;
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ animation: shimmer-sweep 1.2s linear infinite;
}
.chat-empty {
display: flex;
@@ -1041,19 +1214,23 @@ main > button.fab:active:not(:disabled) {
flex-direction: column;
align-items: center;
justify-content: center;
- gap: 4px;
- padding: 48px 16px;
- color: var(--ds-text-muted);
- font-size: var(--text-md);
+ gap: 6px;
+ padding: 56px 24px;
text-align: center;
}
.chat-empty .icon {
- margin-bottom: 12px;
+ margin-bottom: 10px;
+ color: var(--ds-text-faint);
}
.chat-empty-title {
- color: var(--ds-text-primary);
- font-size: var(--text-lg);
+ font-size: var(--text-lg-plus);
font-weight: var(--font-weight-semibold);
+ letter-spacing: var(--tracking-snug);
+ text-wrap: balance;
+}
+.chat-empty-sub {
+ color: var(--ds-text-muted);
+ font-size: var(--text-md-plus);
}
.jump {
position: absolute;
@@ -1061,10 +1238,17 @@ main > button.fab:active:not(:disabled) {
left: 50%;
translate: -50% -4px;
background-color: var(--ds-bg-elevated-opaque);
- box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-fab);
- animation: fade-in var(--motion-duration-normal) var(--motion-ease-out);
+ color: var(--ds-text-primary);
+ box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-float);
+}
+@media (hover: hover) {
+ button.jump:hover:not(:disabled) {
+ background-color: var(--ds-bg-elevated-opaque);
+ }
}
+/* The dock fades the transcript out above the composer; taps on the faded
+ strip reach the transcript beneath. */
.chat-dock {
position: sticky;
bottom: 0;
@@ -1073,9 +1257,8 @@ main > button.fab:active:not(:disabled) {
flex-direction: column;
gap: 8px;
margin: 0 calc(-1 * var(--pad-right)) 0 calc(-1 * var(--pad-left));
- padding: 20px var(--pad-right) max(10px, env(safe-area-inset-bottom)) var(--pad-left);
- background: linear-gradient(to top, var(--ds-bg-primary) calc(100% - 28px), color-mix(in oklab, var(--ds-bg-primary) 0%, transparent));
- /* Taps on the faded strip above the composer reach the transcript beneath. */
+ padding: 24px var(--pad-right) max(10px, env(safe-area-inset-bottom)) var(--pad-left);
+ background: linear-gradient(to top, var(--ds-bg-primary) calc(100% - 32px), color-mix(in oklab, var(--ds-bg-primary) 0%, transparent));
pointer-events: none;
}
.chat-dock > * {
@@ -1087,11 +1270,11 @@ main > button.fab:active:not(:disabled) {
gap: 10px;
min-height: var(--tap);
padding: 6px 6px 6px 14px;
- border-radius: var(--radius-md-plus);
+ border-radius: var(--radius-lg);
background: var(--ds-bg-elevated-opaque);
box-shadow: var(--ds-elevation-stroke);
color: var(--ds-text-secondary);
- font-size: var(--text-md-plus);
+ font-size: var(--text-base);
line-height: var(--leading-normal);
}
.notice-text {
@@ -1102,20 +1285,26 @@ main > button.fab:active:not(:disabled) {
.notice .icon {
color: var(--ds-text-muted);
}
+/* A 36px button inside a 44px target: the transparent border is the margin. */
.notice button {
flex: none;
+ padding: 0 14px;
+ border: 4px solid transparent;
+ border-radius: var(--radius-md-plus);
+ background-clip: padding-box;
+ font-size: var(--text-md-plus);
}
.queue {
display: flex;
flex-direction: column;
- gap: 4px;
+ gap: 6px;
}
.queue-item {
display: flex;
align-items: center;
gap: 8px;
padding-left: 14px;
- border-radius: var(--radius-md-plus);
+ border-radius: var(--radius-lg);
background: var(--ds-bg-elevated-opaque);
box-shadow: var(--ds-elevation-stroke);
}
@@ -1124,45 +1313,48 @@ main > button.fab:active:not(:disabled) {
flex: 1;
min-width: 0;
flex-direction: column;
+ gap: 1px;
+ padding: 6px 0;
}
.queue-label {
color: var(--ds-text-muted);
- font-size: var(--text-xs-plus);
+ font-size: var(--text-sm);
}
.queue-body {
overflow: hidden;
- font-size: var(--text-md-plus);
+ font-size: var(--text-base);
text-overflow: ellipsis;
white-space: nowrap;
}
+.queue-item .icon-btn {
+ color: var(--ds-text-muted);
+}
/* The composer is one floating pill; it lifts by shadow, never a stroke. */
.composer {
display: flex;
align-items: flex-end;
- gap: 2px;
+ gap: 4px;
padding: 4px 4px 4px 16px;
- border-radius: 26px;
+ border-radius: var(--radius-xl);
background: var(--ds-bg-composer);
- box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-composer);
- transition: box-shadow var(--motion-duration-fast) var(--motion-ease-out);
+ box-shadow: var(--ds-composer-edge), var(--ds-shadow-composer);
+ transition: box-shadow var(--motion-duration-normal) var(--motion-ease-out);
}
.composer:focus-within {
- box-shadow:
- 0 0 0 0.5px color-mix(in oklab, var(--ds-text-primary) 16%, transparent),
- 0 4px 16px color-mix(in oklab, #000000 8%, transparent);
+ box-shadow: var(--ds-composer-edge), var(--ds-shadow-composer-focus);
}
.composer textarea {
flex: 1;
min-height: var(--tap);
- /* Keep the transcript visible above the keyboard while a long prompt grows. */
- max-height: min(36dvh, 240px);
+ /* The transcript stays visible above the keyboard while a long prompt grows. */
+ max-height: min(40dvh, 240px);
padding: 11px 0;
overflow-y: auto;
overscroll-behavior: contain;
border-radius: 0;
background: transparent;
- line-height: var(--leading-normal);
+ line-height: var(--leading-body);
resize: none;
scrollbar-width: thin;
}
@@ -1181,20 +1373,18 @@ main > button.fab:active:not(:disabled) {
align-items: center;
gap: 2px;
}
-/* 44px hit target around a 36px disc: the background paints the content box. */
+/* 44px targets around 36px discs: the background paints the content box. */
.composer .send,
.composer .stop {
+ width: var(--tap);
padding: 4px;
border-radius: var(--radius-round);
background-clip: content-box;
}
-.composer .send .icon,
-.composer .stop .icon {
+.composer .send .icon {
width: 18px;
height: 18px;
-}
-.composer .send {
- width: var(--tap);
+ stroke-width: 2.25;
}
.composer .send:disabled {
opacity: 1;
@@ -1202,39 +1392,35 @@ main > button.fab:active:not(:disabled) {
color: var(--ds-send-disabled-fg);
}
.composer .stop {
- width: var(--tap);
background-color: var(--ds-stop-bg);
color: var(--ds-text-primary);
}
.composer .stop .icon {
- width: 14px;
- height: 14px;
+ width: 13px;
+ height: 13px;
fill: currentColor;
stroke: none;
}
-
-/* Keep the model choice under the prompt without making the text field narrower. */
+/* With a model chooser the prompt gets the full width and the controls a row. */
.composer.has-model-picker {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
row-gap: 0;
- padding: 6px 4px 4px 6px;
- border-radius: var(--radius-2xl);
+ padding: 4px 4px 4px 6px;
}
.composer.has-model-picker textarea {
grid-column: 1 / -1;
- padding: 8px 10px 4px;
+ padding: 10px 10px 2px;
}
.model-trigger {
justify-self: start;
gap: 4px;
- min-width: var(--tap);
max-width: 100%;
- padding-inline: 10px 8px;
+ padding: 0 8px 0 10px;
border-radius: var(--radius-full);
color: var(--ds-text-secondary);
- font-size: var(--text-md);
+ font-size: var(--text-md-plus);
}
.model-trigger span {
min-width: 0;
@@ -1247,93 +1433,8 @@ main > button.fab:active:not(:disabled) {
color: var(--ds-text-muted);
}
-.model-picker {
- position: fixed;
- inset: auto 0 0;
- width: min(100%, 520px);
- max-width: none;
- max-height: min(520px, 85dvh);
- margin: 0 auto;
- padding: 0;
- overflow: hidden;
- border: 0;
- border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
- background: var(--ds-bg-elevated-opaque);
- box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-dialog);
- color: var(--ds-text-primary);
-}
-.model-picker[open] {
- animation: sheet-in 280ms var(--motion-ease-out);
-}
-.model-picker::backdrop {
- background: var(--ds-scrim);
- animation: fade-in var(--motion-duration-normal) var(--motion-ease-out);
-}
-.model-picker-body {
- display: flex;
- flex-direction: column;
- gap: 8px;
- max-height: inherit;
- padding: 8px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
-}
-.model-picker-header {
- display: flex;
- flex: none;
- align-items: center;
- justify-content: space-between;
- padding-inline-start: 8px;
-}
-.model-picker-header h2 {
- font-size: var(--text-lg);
- font-weight: var(--font-weight-semibold);
-}
-.model-picker-status {
- padding: 8px;
- color: var(--ds-text-secondary);
-}
-.model-options {
- min-height: 0;
- margin: 0;
- padding: 2px;
- overflow-y: auto;
- overscroll-behavior: contain;
- list-style: none;
-}
-.model-options button {
- justify-content: space-between;
- width: 100%;
- min-height: 52px;
- padding: 8px 12px;
- border-radius: var(--radius-md);
- font-weight: var(--font-weight-normal);
- text-align: start;
-}
-.model-options button[aria-current="true"] {
- background: var(--ds-tile-hover);
- font-weight: var(--font-weight-medium);
-}
-.model-search {
- border-radius: var(--radius-full);
-}
-.model-option-copy {
- display: grid;
- min-width: 0;
- overflow-wrap: anywhere;
-}
-.model-option-provider {
- color: var(--ds-text-secondary);
- font-size: var(--text-sm);
-}
-@media (min-width: 640px) {
- .model-picker {
- inset: 0;
- margin: auto;
- border-radius: var(--radius-2xl);
- }
-}
-
/* ---------- floating layers ---------- */
-.status-pill:not([hidden]) {
+.status-pill {
position: fixed;
z-index: 8;
top: calc(60px + env(safe-area-inset-top));
@@ -1348,76 +1449,109 @@ main > button.fab:active:not(:disabled) {
padding: 8px 14px;
border-radius: var(--radius-full);
background: var(--ds-bg-elevated-opaque);
- box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-dialog);
+ box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-float);
color: var(--ds-text-secondary);
- font-size: var(--text-md);
+ font-size: var(--text-md-plus);
pointer-events: none;
animation: drop-in var(--motion-duration-normal) var(--motion-ease-out);
}
-.toast:not([hidden]) {
+/* Floating layers leave as they came; [hidden] keeps them out of hit tests
+ while they fade. Browsers without discrete transitions close instantly. */
+/* A toast sits just above whatever holds the bottom edge: the composer dock
+ (measured into --dock) or the New conversation capsule. */
+.toast {
position: fixed;
z-index: 7;
- right: var(--pad-right);
- bottom: calc(96px + env(safe-area-inset-bottom));
- left: var(--pad-left);
+ right: 0;
+ bottom: max(calc(var(--dock, 0px) - 12px), calc(76px + env(safe-area-inset-bottom)));
+ left: 0;
width: max-content;
- max-width: min(480px, calc(100% - var(--pad-left) - var(--pad-right)));
+ max-width: min(440px, calc(100% - 32px));
margin: 0 auto;
padding: 11px 18px;
- border-radius: var(--radius-xl);
+ border-radius: var(--radius-lg);
background: var(--ds-bg-elevated-opaque);
- box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-dialog);
+ box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-float);
color: var(--ds-text-primary);
- font-size: var(--text-md-plus);
+ font-size: var(--text-base);
line-height: var(--leading-normal);
+ text-align: center;
+ text-wrap: pretty;
animation: rise-in var(--motion-duration-normal) var(--motion-ease-out);
+ transition: opacity var(--motion-duration-fast) var(--motion-ease-in);
+ transition:
+ opacity var(--motion-duration-fast) var(--motion-ease-in),
+ translate var(--motion-duration-fast) var(--motion-ease-in),
+ display var(--motion-duration-fast) allow-discrete;
+}
+.toast[hidden] {
+ opacity: 0;
+ translate: 0 6px;
+ pointer-events: none;
}
-/* An author display rule would override the browser's default hidden display. */
-.sheet:not([hidden]) {
+.sheet {
position: fixed;
z-index: 6;
inset: 0;
display: flex;
align-items: flex-end;
justify-content: center;
+ padding: 0 8px max(8px, env(safe-area-inset-bottom));
background: var(--ds-scrim);
animation: fade-in var(--motion-duration-normal) var(--motion-ease-out);
+ transition: opacity var(--motion-duration-normal) var(--motion-ease-in);
+ transition:
+ opacity var(--motion-duration-normal) var(--motion-ease-in),
+ display var(--motion-duration-normal) allow-discrete;
+}
+.sheet[hidden] {
+ opacity: 0;
+ pointer-events: none;
}
+/* A detached card: concentric with its 16px actions across 8px of padding. */
.sheet-panel {
+ position: relative;
width: 100%;
max-width: 520px;
- max-height: 85dvh;
+ max-height: 82dvh;
overflow-y: auto;
- padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
- border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
+ overscroll-behavior: contain;
+ padding: 0 8px 8px;
+ border-radius: var(--radius-2xl);
background: var(--ds-bg-elevated-opaque);
box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-dialog);
- animation: sheet-in 280ms var(--motion-ease-out);
+ /* Floating surfaces enter with a fade and at most 8px of travel (design
+ system 8.4 / 8.7), so every action is where it will stay from the first
+ frame. A pull-down follows the finger instead. */
+ animation: surface-in var(--motion-duration-normal) var(--motion-ease-out);
transition: translate var(--motion-duration-normal) var(--motion-ease-out);
- overscroll-behavior: contain;
}
-.sheet-panel::before,
-.model-picker-body::before {
+.sheet[hidden] .sheet-panel {
+ translate: 0 8px;
+ transition-timing-function: var(--motion-ease-in);
+}
+/* The grabber says the sheet can be pulled down. */
+.sheet-panel::before {
content: "";
display: block;
- flex: none;
width: 36px;
height: 5px;
- margin: 2px auto 0;
+ margin: 8px auto 0;
border-radius: var(--radius-full);
- background: color-mix(in oklab, var(--ds-text-primary) 20%, transparent);
+ background: var(--ds-grabber);
}
.sheet-title {
display: -webkit-box;
overflow: hidden;
- padding: 12px 16px 10px;
+ padding: 10px 16px 10px;
color: var(--ds-text-muted);
font-size: var(--text-md);
font-weight: var(--font-weight-medium);
line-height: var(--leading-normal);
text-align: center;
+ text-wrap: balance;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
@@ -1437,9 +1571,9 @@ main > button.fab:active:not(:disabled) {
gap: 14px;
width: 100%;
min-height: 52px;
- padding: 0 16px;
- border-radius: var(--radius-md-plus);
- font-size: var(--text-base-plus);
+ padding: 0 14px;
+ border-radius: var(--radius-lg);
+ font-size: var(--text-lg);
font-weight: var(--font-weight-normal);
}
.sheet-actions > button .icon {
@@ -1458,7 +1592,10 @@ main > button.fab:active:not(:disabled) {
display: flex;
flex-direction: column;
gap: 12px;
- padding: 0 8px 4px;
+ padding: 2px 4px 0;
+}
+.sheet-form input {
+ min-height: 50px;
}
.sheet-buttons {
display: flex;
@@ -1466,18 +1603,96 @@ main > button.fab:active:not(:disabled) {
}
.sheet-buttons > button {
flex: 1;
- min-height: 48px;
- border-radius: var(--radius-md);
+ min-height: 50px;
+ border-radius: var(--radius-lg);
}
-@media (min-width: 640px) {
- .sheet:not([hidden]) {
- align-items: center;
- padding: 24px;
- }
- .sheet-panel {
- padding-bottom: 8px;
- border-radius: var(--radius-2xl);
- }
+
+.model-picker {
+ position: fixed;
+ inset: auto 8px max(8px, env(safe-area-inset-bottom));
+ width: auto;
+ max-width: 520px;
+ max-height: min(560px, 82dvh);
+ margin: 0 auto;
+ padding: 0;
+ overflow: hidden;
+ border: 0;
+ border-radius: var(--radius-2xl);
+ background: var(--ds-bg-elevated-opaque);
+ box-shadow: var(--ds-elevation-stroke), var(--ds-shadow-dialog);
+ color: var(--ds-text-primary);
+}
+.model-picker[open] {
+ animation: surface-in var(--motion-duration-normal) var(--motion-ease-out);
+}
+.model-picker::backdrop {
+ background: var(--ds-scrim);
+ animation: fade-in var(--motion-duration-normal) var(--motion-ease-out);
+}
+.model-picker-body {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ max-height: inherit;
+ padding: 6px 8px 8px;
+}
+.model-picker-header {
+ display: flex;
+ flex: none;
+ align-items: center;
+ justify-content: space-between;
+ padding-left: 10px;
+}
+.model-picker-header h2 {
+ font-size: var(--text-lg);
+ font-weight: var(--font-weight-semibold);
+ letter-spacing: var(--tracking-snug);
+}
+.model-search {
+ flex: none;
+}
+.model-picker-status {
+ padding: 8px 10px;
+ color: var(--ds-text-secondary);
+ font-size: var(--text-base);
+}
+.model-options {
+ min-height: 0;
+ margin: 0;
+ padding: 0;
+ overflow-y: auto;
+ overscroll-behavior: contain;
+ list-style: none;
+}
+.model-options button {
+ justify-content: space-between;
+ gap: 12px;
+ width: 100%;
+ min-height: 56px;
+ padding: 8px 12px;
+ border-radius: var(--radius-lg);
+ text-align: start;
+ font-weight: var(--font-weight-normal);
+}
+.model-options button[aria-current="true"] {
+ background: var(--ds-tile-hover);
+}
+.model-options .icon {
+ color: var(--ds-text-primary);
+}
+.model-option-copy {
+ display: grid;
+ gap: 1px;
+ min-width: 0;
+ overflow-wrap: anywhere;
+}
+.model-option-name {
+ font-size: var(--text-lg);
+ line-height: var(--leading-tight);
+}
+.model-option-provider {
+ color: var(--ds-text-muted);
+ font-size: var(--text-md);
}
/* ---------- pairing ---------- */
@@ -1485,294 +1700,318 @@ main > button.fab:active:not(:disabled) {
display: flex;
flex-direction: column;
width: 100%;
- max-width: 420px;
+ max-width: 400px;
margin: auto;
- padding: calc(32px + env(safe-area-inset-top)) 0 calc(32px + env(safe-area-inset-bottom));
-}
-.pair .icon.lg {
- box-sizing: content-box;
- width: 32px;
- height: 32px;
- margin-bottom: 24px;
- padding: 16px;
- border-radius: var(--radius-xl);
- background: var(--ds-tile-hover);
- color: var(--ds-text-primary);
+ padding: calc(40px + env(safe-area-inset-top)) 0 calc(32px + env(safe-area-inset-bottom));
+}
+.pair > .icon.lg {
+ align-self: center;
+ margin-bottom: 22px;
+ color: var(--ds-text-secondary);
}
.pair h1 {
font-size: var(--text-2xl);
font-weight: var(--font-weight-strong);
- line-height: var(--leading-tight);
+ line-height: var(--leading-heading);
letter-spacing: var(--tracking-tight);
+ text-align: center;
+ text-wrap: balance;
}
.pair-hint {
- margin-top: 10px;
+ max-width: 22em;
+ margin: 12px auto 16px;
color: var(--ds-text-secondary);
- font-size: var(--text-base);
+ font-size: var(--text-base-plus);
line-height: var(--leading-relaxed);
+ text-align: center;
+ text-wrap: balance;
}
+/* The indent balances the tracking after the last digit, so the code centres. */
.pair .code {
min-height: 64px;
- border-radius: var(--radius-md-plus);
- font-weight: var(--font-weight-medium);
+ padding: 0 14px;
+ border-radius: var(--radius-lg);
font-family: var(--font-mono);
font-size: var(--text-2xl);
+ font-weight: var(--font-weight-medium);
font-variant-numeric: tabular-nums;
letter-spacing: var(--tracking-code);
text-align: center;
+ text-indent: var(--tracking-code);
}
.pair .code::placeholder {
color: var(--ds-text-faint);
+ opacity: 0.6;
+}
+.pair #pair-label {
+ min-height: 50px;
}
.pair button[type="submit"] {
width: 100%;
min-height: 52px;
margin-top: 28px;
- border-radius: var(--radius-full);
- font-size: var(--text-base-plus);
+ border-radius: var(--radius-lg);
+ font-size: var(--text-lg);
+}
+.pair button[type="submit"]:active:not(:disabled) {
+ scale: 0.985;
}
.pair-status {
min-height: 1.5em;
margin-top: 14px;
color: var(--ds-text-secondary);
- font-size: var(--text-md-plus);
+ font-size: var(--text-base);
line-height: var(--leading-normal);
text-align: center;
+ text-wrap: pretty;
+}
+
+/* ---------- loading ---------- */
+/* Static shapes of the coming page; they fade in, they never shimmer. */
+.skeleton-page {
+ animation: fade-in var(--motion-duration-slow) var(--motion-ease-out);
+}
+.skeleton {
+ display: block;
+ border-radius: var(--radius-xs);
+ background: var(--ds-tile-hover);
+}
+.skeleton.heading {
+ width: 44%;
+ height: 15px;
+}
+.skeleton.sub {
+ width: 28%;
+ height: 11px;
+ margin-top: 6px;
+}
+.skeleton.title-lg {
+ width: 52%;
+ height: 28px;
+}
+.skeleton.field {
+ height: 44px;
+ border-radius: var(--radius-md);
+ background: var(--ds-field-inset-bg);
+}
+.skeleton-list {
+ gap: 4px;
+ padding-top: 32px;
+}
+.skeleton-row {
+ display: flex;
+ flex-direction: column;
+ gap: 9px;
+ padding: 14px 8px;
+}
+.skeleton.title {
+ width: 64%;
+ height: 14px;
+}
+.skeleton.meta {
+ width: 32%;
+ height: 11px;
+}
+.skeleton-row:nth-child(3n + 2) .skeleton.title {
+ width: 48%;
+}
+.skeleton-row:nth-child(3n) .skeleton.title {
+ width: 56%;
+}
+.skeleton-chat {
+ gap: 12px;
+}
+.skeleton.bubble {
+ align-self: flex-end;
+ width: 58%;
+ height: 42px;
+ border-radius: var(--radius-lg-plus);
+ border-bottom-right-radius: var(--radius-xs);
+}
+.skeleton.bubble.narrow {
+ width: 38%;
+}
+.skeleton.line {
+ width: 74%;
+ height: 13px;
+}
+.skeleton.line.wide {
+ width: 94%;
+}
+.skeleton.line.short {
+ width: 42%;
+}
+
+/* ---------- page transitions ----------
+ A page reached forward slides in by 8px; going back only fades, so a
+ browser swipe-back that already moved the page does not move it twice. */
+main.enter-push > :not(.header, .chat-dock, .fab) {
+ animation: page-push var(--motion-duration-normal) var(--motion-ease-out);
+}
+main.enter-pop > :not(.header, .chat-dock, .fab) {
+ animation: page-pop var(--motion-duration-normal) var(--motion-ease-out);
}
/* ---------- larger screens ----------
- The page is built phone-first. On a tablet or desktop browser the content
- keeps a readable column while the header and composer dock span the whole
- window, lists use the extra width, and a mouse gets denser targets. */
-@media (pointer: fine) {
- :root {
- /* Touch keeps 44px (spec W07); a mouse is precise enough for 36px. */
- --tap: 36px;
- }
+ On a tablet or desktop browser the content keeps a readable column while
+ the bar and the composer dock span the window. Targets stay at 44px. */
+@media (hover: hover) and (pointer: fine) {
html {
scrollbar-width: thin;
scrollbar-color: color-mix(in oklab, var(--ds-text-primary) 22%, transparent) transparent;
}
- .row-main {
- min-height: 52px;
- }
/* Secondary row actions appear with the row they belong to. */
- @media (hover: hover) {
- .row-more {
- opacity: 0;
- }
- .row:hover .row-more,
- .row:focus-within .row-more {
- opacity: 1;
- }
+ .row-more {
+ opacity: 0;
+ }
+ .row:hover .row-more,
+ .row:focus-within .row-more {
+ opacity: 1;
}
}
@media (min-width: 768px) {
:root {
- --pad-left: max(32px, env(safe-area-inset-left));
- --pad-right: max(32px, env(safe-area-inset-right));
+ --gutter: 28px;
}
main {
- max-width: 880px;
- }
- main[data-view^="chat"] {
- max-width: 820px;
+ max-width: 780px;
}
- /* Full-bleed bars, content aligned to the column. */
.header,
.chat-dock {
margin-inline: calc(50% - 50vw);
- padding-inline: calc(50vw - 50% + 8px);
- }
- .chat-dock {
- padding-inline: calc(50vw - 50%);
}
.header {
- min-height: calc(60px + env(safe-area-inset-top));
+ padding-inline: calc(50vw - 50% - var(--optical));
}
- .header.root {
- min-height: calc(72px + env(safe-area-inset-top));
- }
- .header.root h1 {
- font-size: 28px;
+ .chat-dock {
+ padding-inline: calc(50vw - 50%);
}
- .toolbar {
- padding: 8px 0 16px;
+ .large-title {
+ padding-top: 12px;
}
- .search input {
- max-width: 420px;
+ .search {
+ max-width: 440px;
}
.messages {
gap: 20px;
- padding: 24px 0 32px;
+ padding: 24px 0 36px;
}
.msg.user {
- max-width: min(70%, 560px);
+ max-width: min(72%, 560px);
}
- /* The new-conversation capsule sits at the column's right edge. */
+ /* New conversation joins the bar at the column's right edge: a 36px
+ capsule inside a 44px target. */
main > button.fab {
- right: max(24px, calc(50vw - 440px + 32px));
- bottom: 28px;
+ top: calc(2px + env(safe-area-inset-top));
+ right: max(calc(var(--pad-right) - 4px), calc(50vw - 390px + var(--gutter) - 4px));
+ bottom: auto;
left: auto;
+ z-index: 4;
+ min-height: var(--tap);
margin: 0;
+ padding: 0 16px 0 13px;
+ border: 4px solid transparent;
+ background-clip: padding-box;
+ box-shadow: none;
+ font-size: var(--text-md-plus);
+ }
+ main > button.fab .icon {
+ width: 16px;
+ height: 16px;
+ stroke-width: 2;
}
- .toast:not([hidden]) {
- bottom: 32px;
+ main:has(> .fab)::after {
+ display: none;
+ }
+ .fab-spacer {
+ height: 24px;
+ }
+ .header-compact {
+ right: auto;
+ left: 50%;
+ width: min(360px, 36vw);
+ transform: translateX(-50%);
+ }
+ .toast {
+ bottom: max(calc(var(--dock, 0px) - 12px), 32px);
}
.empty {
- padding: 96px 16px;
+ padding: 112px 24px;
}
- /* Action sheets become compact centred dialogs without a drag handle. */
- .sheet-panel {
- max-width: 400px;
- padding: 6px 8px 8px;
- animation: dialog-in var(--motion-duration-normal) var(--motion-ease-out);
+ /* Sheets become compact centred dialogs; there is nothing to pull. */
+ .sheet {
+ align-items: center;
+ padding: 24px;
}
- .model-picker[open] {
- animation: dialog-in var(--motion-duration-normal) var(--motion-ease-out);
+ .sheet-panel {
+ max-width: 380px;
+ padding-top: 6px;
}
- .sheet-panel::before,
- .model-picker-body::before {
+ .sheet-panel::before {
display: none;
}
.sheet-actions > button {
- min-height: 44px;
+ min-height: 48px;
+ }
+ .model-picker {
+ inset: 0;
+ margin: auto;
+ width: min(460px, calc(100% - 48px));
+ height: max-content;
}
/* Pairing reads as a card centred in the window. */
.pair {
max-width: 440px;
- margin: auto;
- padding: 40px;
+ padding: 44px 40px 36px;
border-radius: var(--radius-2xl);
background: var(--ds-tile);
}
}
@media (min-width: 1024px) {
- /* Projects fill two columns; recent conversations stay a single list. */
+ /* Projects fill two columns; recent conversations stay one list. */
#section-projects .list {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 4px 8px;
+ gap: 2px 8px;
}
}
-/* ---------- loading skeleton ---------- */
-.skeleton {
- display: block;
- border-radius: var(--radius-xs);
- background:
- linear-gradient(100deg, transparent 30%, color-mix(in oklab, var(--ds-text-primary) 6%, transparent) 50%, transparent 70%) 0 0 / 200% 100%,
- var(--ds-tile-hover);
- animation: shimmer 1.4s linear infinite;
-}
-.skeleton.heading {
- width: 46%;
- height: 18px;
-}
-.header.root .skeleton.heading {
- height: 24px;
-}
-.skeleton-list {
- gap: 6px;
- padding-top: 64px;
-}
-.skeleton-row {
- display: flex;
- flex-direction: column;
- gap: 8px;
- padding: 12px;
-}
-.skeleton.title {
- width: 62%;
- height: 14px;
-}
-.skeleton.meta {
- width: 34%;
- height: 11px;
-}
-.skeleton-list > li:nth-child(even) .skeleton.title {
- width: 48%;
-}
-.skeleton-chat {
- gap: 12px;
-}
-.skeleton.bubble {
- align-self: flex-end;
- width: 58%;
- height: 40px;
- border-radius: var(--radius-xl);
-}
-.skeleton.bubble.narrow {
- width: 36%;
-}
-.skeleton.line {
- width: 72%;
- height: 13px;
-}
-.skeleton.line.wide {
- width: 92%;
-}
-.skeleton.line.short {
- width: 40%;
-}
-
-/* ---------- page transitions ---------- */
-main.enter-push > :not(.fab, .chat-dock, .header) {
- animation: page-push 260ms var(--motion-ease-out);
-}
-main.enter-pop > :not(.fab, .chat-dock, .header) {
- animation: page-pop 260ms var(--motion-ease-out);
-}
-main:is(.enter-push, .enter-pop) > :is(.header, .chat-dock, .fab) {
- animation: fade-in var(--motion-duration-normal) var(--motion-ease-out);
-}
-
/* ---------- motion ---------- */
-@keyframes page-push {
+@keyframes fade-in {
from {
opacity: 0;
- translate: 24px 0;
}
}
-@keyframes page-pop {
+@keyframes rise-in {
from {
opacity: 0;
- translate: -24px 0;
+ translate: 0 6px;
}
}
-@keyframes dialog-in {
+@keyframes drop-in {
from {
opacity: 0;
- scale: 0.96;
- }
-}
-@keyframes sheet-in {
- from {
- translate: 0 100%;
- }
-}
-@keyframes shimmer {
- to {
- background-position: -200% 0, 0 0;
+ translate: 0 -6px;
}
}
-@keyframes fade-in {
+@keyframes page-push {
from {
opacity: 0;
+ translate: 8px 0;
}
}
-@keyframes rise-in {
+@keyframes page-pop {
from {
opacity: 0;
- translate: 0 12px;
}
}
-@keyframes drop-in {
+@keyframes surface-in {
from {
opacity: 0;
- translate: 0 -8px;
+ translate: 0 8px;
+ scale: 0.985;
}
}
@keyframes breathe {
@@ -1780,26 +2019,28 @@ main:is(.enter-push, .enter-pop) > :is(.header, .chat-dock, .fab) {
opacity: 0.35;
}
}
-@keyframes pulse {
- 0%,
- 80%,
- 100% {
- opacity: 0.25;
- }
- 40% {
- opacity: 1;
- }
-}
@keyframes caret {
50% {
opacity: 0;
}
}
+@keyframes shimmer-sweep {
+ to {
+ background-position: 0 0;
+ }
+}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
- animation: none !important;
- transition: none !important;
+ animation-duration: 0.01ms !important;
+ animation-iteration-count: 1 !important;
+ transition-duration: 0.01ms !important;
+ scroll-behavior: auto !important;
+ }
+ .shimmer {
+ background: none;
+ color: var(--ds-text-secondary);
+ -webkit-text-fill-color: currentColor;
}
}
diff --git a/docs/spec/01-product/03-lan-webui-mvp.md b/docs/spec/01-product/03-lan-webui-mvp.md
index 4e2129e42..89f71a350 100644
--- a/docs/spec/01-product/03-lan-webui-mvp.md
+++ b/docs/spec/01-product/03-lan-webui-mvp.md
@@ -274,22 +274,31 @@ and devices (16); never silently truncate input.
floating layers (action sheet, toast, status pill), Lucide icons, and the
shared radius, type and motion ramps, mirrored as tokens in the page's own
stylesheet. Light or dark follows the phone's system preference. Phone-only
- deviations: 16 px form fields so iOS does not zoom on focus, a New session
- capsule pinned within thumb reach, a floating composer pill, and rename in
- the action sheet instead of a native prompt. A live refresh keeps the
- focused field, caret and draft; Back restores the list scroll position.
+ deviations: 16 px reading size for answers, rows and form fields (iOS does
+ not zoom a 16 px field on focus), a New session capsule pinned within thumb
+ reach, a floating composer pill, list pages that lead with a large title
+ handing over to the bar on scroll, and rename in the action sheet instead of
+ a native prompt. Floating layers enter with a fade and at most 8 px of
+ travel, so their actions are tappable from the first frame; a sheet can also
+ be pulled down to dismiss. A live refresh keeps the focused field, caret and
+ draft; Back restores the list scroll position and closes any open menu.
+ Wider windows keep one readable column under a full-width bar, move New
+ conversation into the bar, and show sheets as centred dialogs.
- Home leads with Recent conversations across projects (running work always
listed), then Projects with Temporary first. One search covers project names
- and conversation titles. Archived items sit behind one Archived entry per
- list (`#/archived`, `#/p/:id/archived`) instead of a sticky filter. Home's New
- conversation asks only for the destination. Disconnecting this device asks
- for confirmation.
+ and conversation titles and can be cleared in place. Row menus also open on
+ long-press or secondary click. Archived items sit behind one Archived entry
+ per list (`#/archived`, `#/p/:id/archived`) instead of a sticky filter.
+ Home's New conversation asks only for the destination. Home names the paired
+ device above Disconnect, and disconnecting asks for confirmation.
- A conversation names its project and run state in the header and its model
in the composer (or the header when it is not editable). An empty one shows
where it will run. Answers render the safe Markdown subset
(no HTML, no remote images, only `http(s)` links opening in a new tab);
consecutive tool calls fold into one step summary; code blocks and the last
- answer of each exchange offer Copy (with a non-secure-context fallback). A
+ answer of each exchange offer Copy, confirmed on the control itself (with a
+ non-secure-context fallback); content that arrives while the reader watches
+ fades in, while refreshes and settling records stay still. A
sent message appears immediately and yields to the Host record, the queue
entry, or a 30 s timeout; a failed send restores the text to the draft.
While a reply runs without streamed text a working cue shows; the composer