Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
feat(desktop): polish sheets, dialogs and the Star on GitHub prompt
leepokai636efba3eb79
diff --git a/apps/desktop/src/renderer/components/Controls.tsx b/apps/desktop/src/renderer/components/Controls.tsxindex ae149904..01d08948 100644--- a/apps/desktop/src/renderer/components/Controls.tsx+++ b/apps/desktop/src/renderer/components/Controls.tsx@@ -117,6 +117,24 @@ export function TabChoice<T extends string>({ label, selection, options, onChang)}+/** Picks one of a few values as wrapping plain labels, the chosen one on a light capsule; `title` names a short label in full. */+export function ChipChoice<T extends string | number>({ label, selection, options, onChange }: {+ label: string+ selection: T+ options: readonly { id: T; label: string; title?: string }[]+ onChange: (id: T) => void+}) {+ return (+ <HStack gap={2} wrap role="radiogroup" aria-label={label}>+ {options.map((o) => (+ <button key={o.id} role="radio" aria-checked={o.id === selection} aria-label={o.title} title={o.title} className={`chip-choice${o.id === selection ? ' on' : ''}`} onClick={() => onChange(o.id)}>+ {o.label}+ </button>+ ))}+ </HStack>+ )+}+/** A list of choices, one per row with a checkmark: the replacement for `.inline` pickers. */export function ChoiceList<T extends string>({ selection, options, onChange }: { selection: T; options: { id: T; label: string; detail?: string | null }[]; onChange: (id: T) => void }) {return (diff --git a/apps/desktop/src/renderer/components/Overlay.tsx b/apps/desktop/src/renderer/components/Overlay.tsxindex cdbbff8c..7ca4d089 100644--- a/apps/desktop/src/renderer/components/Overlay.tsx+++ b/apps/desktop/src/renderer/components/Overlay.tsx@@ -1,4 +1,4 @@-import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState, type ReactNode, type RefObject } from 'react'+import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState, type ReactElement, type ReactNode, type RefObject } from 'react'import { createPortal } from 'react-dom'import { reduceMotion } from '../lib/theme'import { Icon } from './Icon'@@ -101,13 +101,15 @@ function useModalFocus(open: boolean, mounted: boolean, layer: RefObject<HTMLEle}/** The Mac modal (`.codyncSheet`): a centered card over a dim; the content sizes it. */-export function Sheet({ open, onClose, width, height, dismissOnDim = false, children }: {+export function Sheet({ open, onClose, width, height, maxHeight, dismissOnDim = false, children }: {open: booleanonClose: () => void/** A click outside the card closes it (transient pickers, not forms). */dismissOnDim?: booleanwidth?: number | stringheight?: number | string+ /** Without `height` the card fits its content, up to this (and the window). */+ maxHeight?: number | stringchildren: ReactNode}) {const { mounted, shown } = usePresence(open)@@ -123,7 +125,7 @@ export function Sheet({ open, onClose, width, height, dismissOnDim = false, chil<ModalTitleContext.Provider value={titleId}><div ref={layer} className={`modal-card ${shown ? 'shown' : ''}`} role="dialog" aria-modal aria-labelledby={titleId}><div className="modal-dim" onClick={dismissOnDim ? onClose : undefined} />- <div className="modal-content" data-modal-card tabIndex={-1} style={{ width, height }}>+ <div className="modal-content" data-modal-card tabIndex={-1} style={{ width, height, maxHeight }}>{open ? children : last.current}</div></div>@@ -162,10 +164,15 @@ export function Dialog({ open, title, message, actions, cancel = 'Cancel', onClo<div className="dialog-dim" onClick={() => cancel !== null && onClose()} /><div className="dialog-card" data-modal-card tabIndex={-1}><div className="dialog-text">- <Text as="h2" id={`${id}-title`} size="headline">{shownContent.title}</Text>- {shownContent.message ? <Text as="div" id={`${id}-message`} size="compactSecondary" tone="secondary">{shownContent.message}</Text> : null}+ <Text as="h2" id={`${id}-title`} size="title3" weight="semibold">{shownContent.title}</Text>+ {shownContent.message ? <Text as="div" id={`${id}-message`} size="body" tone="secondary">{shownContent.message}</Text> : null}</div><div className="dialog-buttons">+ {cancel !== null ? (+ <button className="dialog-button" data-autofocus onClick={onClose}>+ {cancel}+ </button>+ ) : null}{shownContent.actions.map((a) => (<buttonkey={a.title}@@ -178,11 +185,6 @@ export function Dialog({ open, title, message, actions, cancel = 'Cancel', onClo{a.title}</button>))}- {cancel !== null ? (- <button className="dialog-button" data-autofocus onClick={onClose}>- {cancel}- </button>- ) : null}</div></div></div>,@@ -366,22 +368,32 @@ export function SheetPage({ className, children }: { className?: string; childre}/**- * A modal's title row: title (and a line under it), optional trailing actions, and a close- * button that dismisses the modal, or calls `onClose` for a panel that isn't one.+ * A modal's title row: an optional icon, the title (and a line under it), optional trailing+ * actions, and a close button that dismisses the modal, or calls `onClose` for a panel that+ * isn't one.*/-export function ModalHeader({ title, subtitle, trailing, onClose, closeTitle = 'Close' }: { title: ReactNode; subtitle?: ReactNode; trailing?: ReactNode; onClose?: () => void; closeTitle?: string }) {+export function ModalHeader({ title, subtitle, icon, trailing, onClose, closeTitle = 'Close' }: {+ title: ReactNode+ subtitle?: ReactNode+ /** An SF Symbol name (shown on a tile), or a picture of its own (an agent's logo). */+ icon?: string | ReactElement+ trailing?: ReactNode+ onClose?: () => void+ closeTitle?: string+}) {const dismiss = useDismiss()const titleId = useContext(ModalTitleContext)return (<div className="modal-header">- {subtitle !== undefined ? (- <VStack grow>- <Text as="h2" id={titleId} size="compactBody" weight="semibold" tone="text">{title}</Text>- <Text size="caption" tone="tertiary" truncate>{subtitle}</Text>- </VStack>- ) : (- <Text as="h2" id={titleId} size="compactBody" weight="semibold" truncate className="modal-title">{title}</Text>- )}+ {typeof icon === 'string' ? (+ <span className="modal-header-icon" aria-hidden>+ <Icon name={icon} size={15} />+ </span>+ ) : icon}+ <VStack gap={1} className="modal-title">+ <Text as="h2" id={titleId} size="title3" weight="semibold" tone="text" lines={2}>{title}</Text>+ {subtitle !== undefined ? <Text size="callout" tone="secondary" lines={2} title={typeof subtitle === 'string' ? subtitle : undefined}>{subtitle}</Text> : null}+ </VStack>{trailing}<IconButtonBase title={closeTitle} icon="xmark" onClick={onClose ?? dismiss} /></div>diff --git a/apps/desktop/src/renderer/components/controls.css b/apps/desktop/src/renderer/components/controls.cssindex 7986e24c..1c075fd4 100644--- a/apps/desktop/src/renderer/components/controls.css+++ b/apps/desktop/src/renderer/components/controls.css@@ -1,7 +1,8 @@.styled-button {- font-size: var(--text-callout);- font-weight: 500;- padding: 6px 12px;+ font-size: var(--text-body);+ font-weight: 600;+ min-height: calc(30px * var(--scale));+ padding: 0 14px;border-radius: var(--radius-pill);display: inline-flex;align-items: center;@@ -24,6 +25,12 @@.styled-button:disabled {opacity: 0.4;}+/* The keyboard shortcut a button answers to, quiet inside its label. */+.button-shortcut {+ font-size: var(--text-caption);+ font-weight: 500;+ opacity: 0.55;+}.spinner {animation: spin 0.8s linear infinite;@@ -118,18 +125,23 @@bottom: 3px;left: 3px;border-radius: var(--radius-pill);- background: var(--background);+ background: var(--chip-on);+ box-shadow: var(--chip-shadow);transition: transform var(--morph);}.segmented-option {position: relative;flex: 1;text-align: center;- font-size: var(--text-caption);+ font-size: var(--text-callout);font-weight: 500;color: var(--secondary);- padding: 5px 0;+ padding: 5px 14px;white-space: nowrap;+ transition: color var(--hover);+}+.segmented-option:hover {+ color: var(--text);}.segmented-option.on {color: var(--text);@@ -163,6 +175,28 @@color: var(--text);}+/* ChipChoice: plain labels, the chosen one on a light capsule. */+.chip-choice {+ font-size: var(--text-callout);+ font-weight: 500;+ color: var(--secondary);+ padding: 5px 10px;+ border-radius: var(--radius-pill);+ white-space: nowrap;+ transition: background-color var(--hover), color var(--hover), transform var(--press);+}+.chip-choice:hover {+ color: var(--text);+}+.chip-choice:active {+ transform: scale(0.96);+}+.chip-choice.on {+ background: var(--chip-on);+ box-shadow: var(--chip-shadow);+ color: var(--text);+}+.choice-row {display: flex;align-items: center;diff --git a/apps/desktop/src/renderer/components/icon-fallbacks.ts b/apps/desktop/src/renderer/components/icon-fallbacks.tsindex 1bbe9717..4270839f 100644--- a/apps/desktop/src/renderer/components/icon-fallbacks.ts+++ b/apps/desktop/src/renderer/components/icon-fallbacks.ts@@ -41,6 +41,7 @@ const map: Record<string, IconNode> = {book: L.BookOpen,'book.closed': L.Book,'book.pages': L.BookOpenText,+ brain: L.Brain,'bubble.left': L.MessageSquare,'bubble.left.fill': L.MessageSquare,'bubble.left.and.bubble.right': L.MessagesSquare,diff --git a/apps/desktop/src/renderer/components/overlay.css b/apps/desktop/src/renderer/components/overlay.cssindex 4c8905a4..c066c5a5 100644--- a/apps/desktop/src/renderer/components/overlay.css+++ b/apps/desktop/src/renderer/components/overlay.css@@ -14,10 +14,16 @@transition: opacity var(--layout);}.modal-content {+ /* Inside a sheet the page's fills step up to the sheet's: the ground is the card, grouped+ rows and tiles are tints over it, text fields and secondary buttons a step stronger. */+ --background: var(--sheet);+ --surface: var(--group);+ --bubble-agent: var(--group);+ --bubble-user: var(--field);position: relative;max-width: calc(100vw - 48px);max-height: calc(100vh - 48px);- background: var(--background);+ background: var(--sheet);border-radius: var(--radius-xl);overflow: hidden;box-shadow: var(--shadow-xl);@@ -27,6 +33,10 @@display: flex;flex-direction: column;}+/* A card that fits its content lets its page shrink to the card and scroll inside. */+.modal-content > * {+ min-height: 0;+}.modal-card.shown .modal-dim {opacity: 1;}@@ -41,16 +51,32 @@pointer-events: none;}+/* A sheet's title row: an optional icon tile, the title over a quiet line, trailing actions. */.modal-header {display: flex;align-items: center;- gap: 8px;- height: 48px;- padding: 0 10px 0 16px;+ gap: 12px;+ min-height: 60px;+ padding: 12px 12px 4px 20px;flex: none;}.modal-title {flex: 1;+ min-width: 0;+}+/* A title too long for one line wraps into even lines, so a name in it stays whole. */+.modal-title h2 {+ text-wrap: balance;+}+.modal-header-icon {+ width: 32px;+ height: 32px;+ flex: none;+ display: grid;+ place-items: center;+ border-radius: var(--radius-s);+ background: var(--field);+ color: var(--text);}/* Sheets, dialogs and menus: one subtle outline over the fill. */@@ -90,39 +116,42 @@inset: 0;background: var(--scrim);}+/* A question with its answers on the right, Cancel first (macOS alerts' order). */.dialog-card {position: relative;transform: scale(0.98);transition: transform var(--fade);- width: min(320px, calc(100vw - 48px));- padding: 18px;- background: var(--bubble-agent);+ width: min(340px, calc(100vw - 48px));+ padding: 20px;+ background: var(--sheet);border-radius: var(--radius-xl);box-shadow: var(--shadow-xl);display: flex;flex-direction: column;- gap: 14px;+ gap: 18px;}.dialog-text {display: flex;flex-direction: column;gap: 6px;- text-align: center;color: var(--text);+ line-height: 1.45;overflow-wrap: anywhere;}.dialog-buttons {display: flex;- flex-direction: column;+ flex-wrap: wrap;+ justify-content: flex-end;gap: 8px;}.dialog-button {- font-size: var(--text-callout);- font-weight: 500;+ font-size: var(--text-body);+ font-weight: 600;text-align: center;- padding: 8px 0;+ min-height: calc(30px * var(--scale));+ padding: 0 14px;border-radius: var(--radius-pill);- background: var(--bubble-user);+ background: var(--field);color: var(--text);transition: transform var(--press), opacity var(--press);}@@ -130,13 +159,17 @@background: var(--accent-fill);color: var(--on-accent);}-/* A sheet's content: a full-height column on the page color (SheetPage). */+/* A sheet's content: a full-height column on the sheet's color (SheetPage). */.sheet-page {display: flex;flex-direction: column;height: 100%;background: var(--background);}+/* Forms in a sheet line up with its title. */+.modal-content .card-form-content {+ padding: 8px 20px 20px;+}[data-modal-card]:focus {outline: none;diff --git a/apps/desktop/src/renderer/styles/theme.css b/apps/desktop/src/renderer/styles/theme.cssindex b3932b0f..c7056f46 100644--- a/apps/desktop/src/renderer/styles/theme.css+++ b/apps/desktop/src/renderer/styles/theme.css@@ -43,6 +43,14 @@--frosted: rgba(244, 244, 244, 0.82);/* The dim behind sheets and dialogs. */--scrim: rgba(0, 0, 0, 0.4);+ /* Sheets and dialogs: a card a step above the page, groups of rows and text fields as quiet+ tints over it (they stack, so a field inside a group reads a step stronger). */+ --sheet: #ffffff;+ --group: rgba(var(--text-rgb), 0.04);+ --field: rgba(var(--text-rgb), 0.06);+ /* The chosen option in segmented choices and chips. */+ --chip-on: #ffffff;+ --chip-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);/* Corner radii and shadows: one scale for every surface. */--radius-xs: 6px;@@ -123,6 +131,12 @@--stroke-strong: rgba(255, 255, 255, 0.17);--roster-selected: #292929;--frosted: rgba(35, 35, 35, 0.82);+ --scrim: rgba(0, 0, 0, 0.55);+ --sheet: #161616;+ --group: rgba(var(--text-rgb), 0.045);+ --field: rgba(var(--text-rgb), 0.075);+ --chip-on: rgba(var(--text-rgb), 0.15);+ --chip-shadow: none;}}diff --git a/apps/desktop/src/renderer/views/ChatWindow.tsx b/apps/desktop/src/renderer/views/ChatWindow.tsxindex 0065d2f6..122ee79c 100644--- a/apps/desktop/src/renderer/views/ChatWindow.tsx+++ b/apps/desktop/src/renderer/views/ChatWindow.tsx@@ -120,7 +120,7 @@ export function ChatWindow() {{onboarded && accessSetup !== null && showsChat ? null : <div className="window-drag drag" />}{onboarded && accessSetup !== null ? <StarPrompt /> : null}<Sheet open={showAccess} onClose={() => setShowAccess(false)} width={660} height={Math.min(820, window.innerHeight - 80)}>- <ModalHeader title="Computer access" />+ <ModalHeader icon="hand.raised" title="Computer access" /><ComputerAccessView onContinue={(ready) => { setAccessSetup(ready ? 'ready' : 'later'); setShowAccess(false) }} /></Sheet><Dialogdiff --git a/apps/desktop/src/renderer/views/StarPrompt.tsx b/apps/desktop/src/renderer/views/StarPrompt.tsxindex 057e4fba..0d7fec62 100644--- a/apps/desktop/src/renderer/views/StarPrompt.tsx+++ b/apps/desktop/src/renderer/views/StarPrompt.tsx@@ -1,4 +1,5 @@import { useState } from 'react'+import appIcon from '../../../resources/icon.png'import { Button } from '../components/Controls'import { Icon } from '../components/Icon'import { ModalHeader, Sheet } from '../components/Overlay'@@ -9,7 +10,8 @@ import { prefs, usePref } from '../lib/prefs'import { afterStarAsk, dueStarAsk } from '../lib/star-ask'import { useApp } from '../store/context'-const REPO = 'https://github.com/leepokai/Codync'+const [OWNER, NAME] = ['leepokai', 'Codync']+const REPO = `https://github.com/${OWNER}/${NAME}`const copy = {first: {@@ -46,15 +48,27 @@ export function StarPrompt() {return (<Sheet open={open} onClose={() => finish(false)}><VStack className="star-prompt">- <ModalHeader title={text.title} />- <VStack align="center" gap={16} className="star-prompt-body">- <Icon name="star" size={36} weight="light" color="var(--secondary)" />- <Text as="div" size="callout" tone="secondary" className="star-prompt-message">{text.message}</Text>- <HStack align="stretch" gap={12}>+ <ModalHeader icon="star" title={text.title} />+ <VStack gap={16} className="star-prompt-body">+ <Text as="div" size="body" tone="secondary" className="star-prompt-message">{text.message}</Text>+ <button className="star-prompt-repo" title={REPO} onClick={() => finish(true)}>+ <img src={appIcon} alt="" className="star-prompt-icon" draggable={false} />+ <VStack gap={2} grow>+ <Text size="body" weight="semibold" tone="text" truncate>+ <Text weight="regular" tone="secondary">{OWNER} /</Text> {NAME}+ </Text>+ <Text size="callout" tone="secondary" truncate>{REPO.replace('https://', '')}</Text>+ </VStack>+ <Icon name="arrow.up.right.square" size={13} color="var(--secondary)" />+ </button>+ <HStack gap={8} justify="flex-end"><Button kind="secondary" onClick={() => finish(false)}>Not now</Button>- <Button onClick={() => finish(true)}>Star on GitHub</Button>+ <Button className="star-prompt-star" onClick={() => finish(true)}>+ <Icon name="star" size={12} weight="semibold" />+ Star on GitHub+ </Button></HStack></VStack></VStack>diff --git a/apps/desktop/src/renderer/views/bots/BotTemplateView.tsx b/apps/desktop/src/renderer/views/bots/BotTemplateView.tsxindex 7d02f84a..6dc666dc 100644--- a/apps/desktop/src/renderer/views/bots/BotTemplateView.tsx+++ b/apps/desktop/src/renderer/views/bots/BotTemplateView.tsx@@ -40,10 +40,9 @@ export function BotTemplateView({ draft }: { draft: BotDraft }) {return (<VStack className="bot-template">- <ModalHeader title="Create template" />- <VStack gap={20} className="bot-template-body">- <Text size="subheadline" tone="secondary">{draft.name}</Text>- <Text size="callout" tone="secondary">Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.</Text>+ <ModalHeader icon="square.on.square" title="Create template" subtitle={draft.name} />+ <VStack gap={16} className="bot-template-body">+ <Text size="body" tone="secondary">Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded.</Text><div className="bot-template-code"><pre className="selectable">{encoded}diff --git a/apps/desktop/src/renderer/views/bots/GroupEditorView.tsx b/apps/desktop/src/renderer/views/bots/GroupEditorView.tsxindex 2138443d..1baba55f 100644--- a/apps/desktop/src/renderer/views/bots/GroupEditorView.tsx+++ b/apps/desktop/src/renderer/views/bots/GroupEditorView.tsx@@ -62,7 +62,7 @@ export function GroupEditorView({ group, members: initialMembers = [] }: { groupreturn (<SheetPage>- <ModalHeader title={isNew ? 'New group chat' : 'Group chat'} trailing={saving ? <Spinner /> : <IconButton title={isNew ? 'Create' : 'Save'} icon="checkmark" disabled={!canSave} onClick={save} />} />+ <ModalHeader icon="person.2" title={isNew ? 'New group chat' : 'Group chat'} trailing={saving ? <Spinner /> : <IconButton title={isNew ? 'Create' : 'Save'} icon="checkmark" disabled={!canSave} onClick={save} />} /><div className="group-scroll"><div className="group-form"><div className="group-identity">diff --git a/apps/desktop/src/renderer/views/bots/HarnessMemorySheet.tsx b/apps/desktop/src/renderer/views/bots/HarnessMemorySheet.tsxindex 2776c9b6..e0632b25 100644--- a/apps/desktop/src/renderer/views/bots/HarnessMemorySheet.tsx+++ b/apps/desktop/src/renderer/views/bots/HarnessMemorySheet.tsx@@ -18,7 +18,7 @@ export function HarnessMemorySheet({ harness, readable }: { harness: string; rea]return (<SheetPage>- <ModalHeader title={`${harness}'s own memory`} />+ <ModalHeader icon="brain" title={`${harness}'s own memory`} /><CardForm><CardSection>{details.map((d) => (diff --git a/apps/desktop/src/renderer/views/bots/MemoryView.tsx b/apps/desktop/src/renderer/views/bots/MemoryView.tsxindex 9f7187e2..57015235 100644--- a/apps/desktop/src/renderer/views/bots/MemoryView.tsx+++ b/apps/desktop/src/renderer/views/bots/MemoryView.tsx@@ -102,7 +102,7 @@ export function MemoryCard({ botId }: { botId: string }) {</CardSection></div><Sheet open={draft !== null} onClose={() => setDraft(null)} width={520}>- <ModalHeader title={draft?.id ? 'Edit memory' : section === 'yours' ? 'Add to what your bots share' : 'Add memory'} />+ <ModalHeader icon="brain" title={draft?.id ? 'Edit memory' : section === 'yours' ? 'Add to what your bots share' : 'Add memory'} />{draft && <div className="memory-editor"><textarea aria-label="Memory" rows={3} autoFocus placeholder="One short fact" value={draft.text}onChange={(e) => setDraft({ ...draft, text: e.target.value })}diff --git a/apps/desktop/src/renderer/views/bots/bots.css b/apps/desktop/src/renderer/views/bots/bots.cssindex 6664bcc9..4cc800f2 100644--- a/apps/desktop/src/renderer/views/bots/bots.css+++ b/apps/desktop/src/renderer/views/bots/bots.css@@ -287,16 +287,16 @@ textarea.field-box {/* Create template (BotTemplateView). */.bot-template {width: 560px;- height: 540px;+ max-height: 560px;background: var(--background);}.bot-template-body {- flex: 1;+ flex: 1 1 auto;min-height: 0;- padding: 0 24px 24px;+ padding: 4px 20px 20px;}.bot-template-code {- flex: 1;+ flex: 0 1 auto;min-height: 0;overflow-y: auto;background: var(--surface);@@ -315,8 +315,9 @@ textarea.field-box {display: flex;align-items: center;gap: 6px;- padding: 9px 14px;- border-radius: 9px;+ min-height: calc(30px * var(--scale));+ padding: 0 14px;+ border-radius: var(--radius-pill);background: var(--accent-fill);color: var(--on-accent);font-size: var(--text-body);diff --git a/apps/desktop/src/renderer/views/bots/memory.css b/apps/desktop/src/renderer/views/bots/memory.cssindex c6776e12..227309da 100644--- a/apps/desktop/src/renderer/views/bots/memory.css+++ b/apps/desktop/src/renderer/views/bots/memory.css@@ -17,8 +17,10 @@@container details (max-height: 599px) { .memory-clamp { -webkit-line-clamp: 2; } }@container details (min-height: 800px) { .memory-clamp { -webkit-line-clamp: 5; } }@container details (min-height: 1100px) { .memory-clamp { -webkit-line-clamp: 8; } }-.memory-editor { display: flex; flex-direction: column; gap: 16px; padding: 20px; max-height: 70vh; overflow: auto; }-.memory-editor textarea { padding: 10px; background: var(--surface); color: var(--text); border: 0; border-radius: var(--radius-s); font: inherit; resize: vertical; }+.memory-editor { display: flex; flex-direction: column; gap: 14px; padding: 8px 20px 20px; max-height: 70vh; overflow: auto; }+.memory-editor textarea { padding: 9px 12px; background: var(--bubble-user); color: var(--text); border: 0; border-radius: var(--radius-s); font: inherit; line-height: 1.4; field-sizing: content; min-height: calc(3lh + 18px); max-height: calc(10lh + 18px); }+.memory-editor textarea:focus { outline: 2px solid rgba(var(--text-rgb), 0.3); }+.memory-editor > .styled-button { align-self: flex-end; }.memory-history { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; user-select: text; margin: 0; }.memory-error { color: var(--danger); white-space: pre-wrap; }.memory-notes-header { display: flex; align-items: center; justify-content: space-between; color: var(--secondary); font-size: var(--text-callout); font-weight: 600; }diff --git a/apps/desktop/src/renderer/views/chat-window.css b/apps/desktop/src/renderer/views/chat-window.cssindex ab416bb3..e35cff67 100644--- a/apps/desktop/src/renderer/views/chat-window.css+++ b/apps/desktop/src/renderer/views/chat-window.css@@ -37,15 +37,43 @@align-self: flex-start;}-/* The GitHub star ask (StarPrompt). */+/* The GitHub star ask (StarPrompt): the ask, where it goes, the answers. */.star-prompt {width: 420px;}.star-prompt-body {- padding: 0 24px 24px;+ padding: 4px 20px 20px;}.star-prompt-message {- text-align: center;+ line-height: 1.5;+}+.star-prompt-repo {+ display: flex;+ align-items: center;+ gap: 12px;+ padding: 10px 14px 10px 10px;+ border-radius: var(--radius-l);+ background: var(--surface);+ text-align: left;+ transition: background-color var(--hover), transform var(--press);+}+.star-prompt-repo:hover {+ background: var(--field);+}+.star-prompt-repo:active {+ transform: scale(0.99);+}+.star-prompt-icon {+ width: 44px;+ height: 44px;+ flex: none;+}+/* The star turns as the pointer reaches the button. */+.star-prompt-star > :first-child {+ transition: transform var(--layout);+}+.star-prompt-star:hover > :first-child {+ transform: rotate(-12deg) scale(1.15);}.split {diff --git a/apps/desktop/src/renderer/views/marketplace/AgentSheet.tsx b/apps/desktop/src/renderer/views/marketplace/AgentSheet.tsxindex d95547f6..feceda3c 100644--- a/apps/desktop/src/renderer/views/marketplace/AgentSheet.tsx+++ b/apps/desktop/src/renderer/views/marketplace/AgentSheet.tsx@@ -188,17 +188,12 @@ export function AgentSheet({ initial, recheck = false }: { initial: Backend; recconst overview = (<SheetPage>- <ModalHeader title={backend.name} />+ <ModalHeader+ icon={<AgentTile registry={backend.registry ?? backend.id} icon={18} tile={32} radius={9} />}+ title={backend.name}+ subtitle={backend.description || undefined}+ /><CardForm>- <CardSection>- <HStack gap={14} className="market-card-header">- <AgentTile registry={backend.registry ?? backend.id} icon={30} tile={52} radius={14} />- <VStack gap={2} shrink>- <Text size="title3" weight="semibold">{backend.name}</Text>- {backend.description ? <Text size="subheadline" tone="secondary" lines={3}>{backend.description}</Text> : null}- </VStack>- </HStack>- </CardSection>{curated ? (<CardSection><SetupStepRowdiff --git a/apps/desktop/src/renderer/views/marketplace/ComposioViews.tsx b/apps/desktop/src/renderer/views/marketplace/ComposioViews.tsxindex 2f25830a..ac476408 100644--- a/apps/desktop/src/renderer/views/marketplace/ComposioViews.tsx+++ b/apps/desktop/src/renderer/views/marketplace/ComposioViews.tsx@@ -157,7 +157,7 @@ export function ComposioKeySheet({ status, done }: { status: ComposioStatus | nuconst keyUrl = status?.keyUrl ?? 'https://platform.composio.dev'return (<SheetPage>- <ModalHeader title="Composio" trailing={saving ? <Spinner /> : <IconButton title="Save" icon="checkmark" disabled={!key.trim()} onClick={() => void save(key)} />} />+ <ModalHeader icon="square.grid.3x3" title="Composio" trailing={saving ? <Spinner /> : <IconButton title="Save" icon="checkmark" disabled={!key.trim()} onClick={() => void save(key)} />} /><CardForm><CardSectiontitle="Composio API key"diff --git a/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx b/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsxindex edb768c1..2c4139d7 100644--- a/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx+++ b/apps/desktop/src/renderer/views/marketplace/ConnectionRequestCard.tsx@@ -106,7 +106,7 @@ export function ConnectionRequestCard({ entry }: { entry: Entry }) {<FormSheet open={app !== null} onClose={() => setApp(null)}>{app ? <ComposioConnectSheet app={app} requestId={entry.id} done={() => setApp(null)} /> : null}</FormSheet>- <FormSheet open={agent !== null} onClose={() => setAgent(null)} width={560} height={560}>+ <FormSheet open={agent !== null} onClose={() => setAgent(null)} width={560} height={560} fixed>{agent ? <AgentSheet key={agent.id} initial={agent} recheck /> : null}</FormSheet></VStack>diff --git a/apps/desktop/src/renderer/views/marketplace/ConnectorSheets.tsx b/apps/desktop/src/renderer/views/marketplace/ConnectorSheets.tsxindex f40bf809..273da038 100644--- a/apps/desktop/src/renderer/views/marketplace/ConnectorSheets.tsx+++ b/apps/desktop/src/renderer/views/marketplace/ConnectorSheets.tsx@@ -56,6 +56,7 @@ export function InstallConnectorSheet({ item, requestId, done }: { item: MarketCreturn (<SheetPage><ModalHeader+ icon="point.3.connected.trianglepath.dotted"title="Add connector"trailing={saving ? <Spinner /> : <IconButton title="Add" icon="plus" disabled={installed === null && missing} onClick={() => void install()} />}/>@@ -153,7 +154,7 @@ export function CustomConnectorSheet() {return (<SheetPage>- <ModalHeader title="Custom connector" trailing={saving ? <Spinner /> : <IconButton title="Add" icon="plus" disabled={!ready} onClick={() => void save()} />} />+ <ModalHeader icon="point.3.connected.trianglepath.dotted" title="Custom connector" trailing={saving ? <Spinner /> : <IconButton title="Add" icon="plus" disabled={!ready} onClick={() => void save()} />} /><CardForm><CardSection footer={footer}><SegmentedChoice selection={mode} onChange={setMode} options={[{ id: 'command', label: 'Command' }, { id: 'url', label: 'URL' }, { id: 'config', label: 'Config' }]} />@@ -200,6 +201,7 @@ export function NewSkillSheet() {return (<SheetPage><ModalHeader+ icon="square.and.pencil"title="New skill"trailing={saving ? <Spinner /> : <IconButton title="Save" icon="checkmark" disabled={!name.trim() || !instructions.trim()} onClick={() => void save()} />}/>diff --git a/apps/desktop/src/renderer/views/marketplace/CredentialsView.tsx b/apps/desktop/src/renderer/views/marketplace/CredentialsView.tsxindex 4fbf80cd..3697d62c 100644--- a/apps/desktop/src/renderer/views/marketplace/CredentialsView.tsx+++ b/apps/desktop/src/renderer/views/marketplace/CredentialsView.tsx@@ -178,6 +178,7 @@ function ConnectorCredentialEditor({ connector }: { connector: InstalledConnectoreturn (<SheetPage><ModalHeader+ icon="key"title={connector.name}trailing={saving ? <Spinner /> : <IconButton title="Save credentials" icon="checkmark" disabled={Object.values(fields).every((v) => !v)} onClick={() => void save()} />}/>diff --git a/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx b/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsxindex 46708b2a..2aeb37e8 100644--- a/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx+++ b/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx@@ -330,10 +330,10 @@ export function MarketplaceView({ computers, computer, onComputer, appsFirst = f<FormSheet open={viewingSkill !== null} onClose={() => setViewingSkill(null)}>{viewingSkill ? <SkillSheet key={viewingSkill.name} skill={viewingSkill} /> : null}</FormSheet>- <FormSheet open={addingNode} onClose={() => setAddingNode(false)} width={560} height={560}>+ <FormSheet open={addingNode} onClose={() => setAddingNode(false)} width={560} height={560} fixed>{addingNode ? <SetupTerminalView backend={null} step="node" back={() => setAddingNode(false)} /> : null}</FormSheet>- <FormSheet open={agent !== null} onClose={() => setAgent(null)} width={560} height={560}>+ <FormSheet open={agent !== null} onClose={() => setAgent(null)} width={560} height={560} fixed>{agent ? <AgentSheet key={agent.id} initial={agent} /> : null}</FormSheet></>diff --git a/apps/desktop/src/renderer/views/marketplace/SkillSheet.tsx b/apps/desktop/src/renderer/views/marketplace/SkillSheet.tsxindex ebd21172..3a7bfef3 100644--- a/apps/desktop/src/renderer/views/marketplace/SkillSheet.tsx+++ b/apps/desktop/src/renderer/views/marketplace/SkillSheet.tsx@@ -59,7 +59,7 @@ export function SkillSheet({ skill }: { skill: SkillRef }) {return (<SheetPage>- <ModalHeader title={skill.name} trailing={trailing} />+ <ModalHeader icon="book.pages" title={skill.name} trailing={trailing} /><CardForm>{skill.description ? (<CardSection>diff --git a/apps/desktop/src/renderer/views/marketplace/credentials.css b/apps/desktop/src/renderer/views/marketplace/credentials.cssindex 4b9cdd3b..d71ff06a 100644--- a/apps/desktop/src/renderer/views/marketplace/credentials.css+++ b/apps/desktop/src/renderer/views/marketplace/credentials.css@@ -32,12 +32,10 @@.credential-field .market-field {min-height: 36px;padding: 9px 12px;- background: var(--surface);+ background: var(--bubble-user);border-radius: var(--radius-s);- box-shadow: inset 0 0 0 1px var(--border);- transition: box-shadow var(--hover);}-.credential-field .market-field:focus-visible { outline-offset: 2px; }+.credential-field .market-field:focus { outline: 2px solid rgba(var(--text-rgb), 0.3); }.credentials-page .plain-row-button { min-height: 38px; padding: 8px 10px; border-radius: var(--radius-s); }.credentials-page .plain-row-button:hover { background: var(--surface); }.credential-row-title { flex: 1; }diff --git a/apps/desktop/src/renderer/views/marketplace/marketplace.css b/apps/desktop/src/renderer/views/marketplace/marketplace.cssindex f2c8f252..73433bcf 100644--- a/apps/desktop/src/renderer/views/marketplace/marketplace.css+++ b/apps/desktop/src/renderer/views/marketplace/marketplace.css@@ -29,11 +29,14 @@text-align: center;}-/* Installed ⇄ page: slides like `.move(edge:)` + opacity. */+/* Installed ⇄ page: slides like `.move(edge:)` + opacity. The base page sizes the stack (so a+ card that fits its content fits it) and the page on top takes the same box. */.market-stack {position: relative;height: 100%;overflow: hidden;+ display: flex;+ flex-direction: column;background: var(--background);}.market-layer {@@ -43,6 +46,11 @@flex-direction: column;transition: transform var(--layout), opacity var(--layout);}+.market-layer:first-child {+ position: relative;+ flex: 1 1 auto;+ min-height: 0;+}.market-layer.off-leading {transform: translateX(-100%);opacity: 0;@@ -469,3 +477,7 @@ textarea.market-field {.item-grid { grid-template-columns: minmax(0, 1fr); }.agent-grid { grid-template-columns: minmax(0, 1fr); }}+/* An agent's logo in a sheet's title row, on the same tile as a symbol. */+.modal-header > .agent-tile {+ background: var(--field);+}diff --git a/apps/desktop/src/renderer/views/marketplace/pieces.tsx b/apps/desktop/src/renderer/views/marketplace/pieces.tsxindex aa2c6d47..d05c2ef9 100644--- a/apps/desktop/src/renderer/views/marketplace/pieces.tsx+++ b/apps/desktop/src/renderer/views/marketplace/pieces.tsx@@ -282,11 +282,15 @@ export function useWindowHeight() {return height}-/** A Marketplace form in its own modal card (`.codyncSheet`). */-export function FormSheet({ open, onClose, width = 520, height = 600, children }: { open: boolean; onClose: () => void; width?: number; height?: number; children: ReactNode }) {+/**+ * A Marketplace form in its own modal card (`.codyncSheet`), as tall as its content up to+ * `height`; `fixed` keeps it at `height` for content that fills the card (a terminal).+ */+export function FormSheet({ open, onClose, width = 520, height = 600, fixed = false, children }: { open: boolean; onClose: () => void; width?: number; height?: number; fixed?: boolean; children: ReactNode }) {const windowHeight = useWindowHeight()+ const cap = Math.min(height, windowHeight - 76)return (- <Sheet open={open} onClose={onClose} width={width} height={Math.min(height, windowHeight - 76)}>+ <Sheet open={open} onClose={onClose} width={width} height={fixed ? cap : undefined} maxHeight={cap}>{children}</Sheet>)diff --git a/apps/desktop/src/renderer/views/settings/AnalyticsSheet.tsx b/apps/desktop/src/renderer/views/settings/AnalyticsSheet.tsxindex ed7c5755..7b9ffca1 100644--- a/apps/desktop/src/renderer/views/settings/AnalyticsSheet.tsx+++ b/apps/desktop/src/renderer/views/settings/AnalyticsSheet.tsx@@ -21,7 +21,7 @@ const details = [export function AnalyticsSheet() {return (<SheetPage>- <ModalHeader title="Usage analytics" />+ <ModalHeader icon="chart.bar" title="Usage analytics" /><CardForm><CardSectionfooter={diff --git a/apps/desktop/src/renderer/views/settings/ApprovalSheet.tsx b/apps/desktop/src/renderer/views/settings/ApprovalSheet.tsxindex 10064aaf..444dbd60 100644--- a/apps/desktop/src/renderer/views/settings/ApprovalSheet.tsx+++ b/apps/desktop/src/renderer/views/settings/ApprovalSheet.tsx@@ -34,7 +34,7 @@ export function ApprovalSheet({ approval }: { approval: Approval }) {return (<VStack className="settings-approval">- <ModalHeader title="Access request" />+ <ModalHeader icon="lock.shield" title="Access request" /><VStack align="center" gap={16} className="settings-approval-body"><Icon name={deviceIcon(request.platform)} size={40} weight="light" color="var(--secondary)" /><VStack align="center" gap={4}>diff --git a/apps/desktop/src/renderer/views/settings/ComputersView.tsx b/apps/desktop/src/renderer/views/settings/ComputersView.tsxindex 95d42af9..0120e98e 100644--- a/apps/desktop/src/renderer/views/settings/ComputersView.tsx+++ b/apps/desktop/src/renderer/views/settings/ComputersView.tsx@@ -263,7 +263,7 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo</StoreContext.Provider></Sheet><Sheet open={showPairing} onClose={() => setShowPairing(false)} width={340}>- <ModalHeader title={`Pair iPhone with ${name}`} />+ <ModalHeader icon="qrcode" title={`Pair iPhone with ${name}`} /><PairingPanel store={store} /></Sheet><Dialog@@ -423,7 +423,7 @@ function SSHProfileEditor({ profile: initial, isNew }: { profile: SSHProfile; isreturn (// Return in a field saves (the default action).<VStack className="settings-ssh-editor" onKeyDown={(e) => e.key === 'Enter' && e.target instanceof HTMLInputElement && void save()}>- <ModalHeader title={isNew ? 'Add SSH computer' : 'Edit SSH computer'} trailing={<IconButton title={isNew ? 'Add' : 'Save'} icon="checkmark" onClick={() => void save()} />} />+ <ModalHeader icon="terminal" title={isNew ? 'Add SSH computer' : 'Edit SSH computer'} trailing={<IconButton title={isNew ? 'Add' : 'Save'} icon="checkmark" onClick={() => void save()} />} /><VStack gap={16} className="settings-ssh-editor-body"><CardSection>{field('Name', profile.name, (name) => setProfile({ ...profile, name }), 'Optional')}diff --git a/apps/desktop/src/renderer/views/settings/VoiceChatSettingsView.tsx b/apps/desktop/src/renderer/views/settings/VoiceChatSettingsView.tsxindex 29c2613d..372685c7 100644--- a/apps/desktop/src/renderer/views/settings/VoiceChatSettingsView.tsx+++ b/apps/desktop/src/renderer/views/settings/VoiceChatSettingsView.tsx@@ -31,7 +31,7 @@ export function VoiceChatSettingsView({ showsHeader = true }: { showsHeader?: bo: onDeviceUnavailableReason()return (<SheetPage className={showsHeader ? 'settings-voice-sheet' : undefined}>- {showsHeader ? <ModalHeader title="Voice chat" /> : null}+ {showsHeader ? <ModalHeader icon="waveform" title="Voice chat" /> : null}<div className="settings-voice-body"><CardForm><CardSection title="Voice" footer={footer}>diff --git a/docs/guides/desktop-styles.md b/docs/guides/desktop-styles.mdindex ead43add..3962dc68 100644--- a/docs/guides/desktop-styles.md+++ b/docs/guides/desktop-styles.md@@ -4,7 +4,7 @@ How the desktop renderer (`apps/desktop/src/renderer/`) styles its views. Views## Tokens (`styles/theme.css`)-- **Color**: `--text`, `--secondary`, `--tertiary`, `--danger`, `--attention` (status text), `--accent`, surfaces (`--background`, `--surface`, `--panel`, `--bubble-*`, `--chat-*`, `--chrome-fill`, `--composer-fill`), strokes (`--border`, `--chrome-stroke`, `--stroke-strong`), fills with their ink (`--accent-fill`/`--on-accent`, `--danger-fill`/`--on-danger`, `--warning`/`--on-warning`), `--added`/`--removed`, `--code-background`, `--scrim`. Every color has a light and a dark value. Views use the tokens, or `rgba(var(--text-rgb), a)` for a tint of the text color; a literal only where the color must not follow the theme (white behind a QR code or a favicon).+- **Color**: `--text`, `--secondary`, `--tertiary`, `--danger`, `--attention` (status text), `--accent`, surfaces (`--background`, `--surface`, `--panel`, `--bubble-*`, `--chat-*`, `--chrome-fill`, `--composer-fill`), strokes (`--border`, `--chrome-stroke`, `--stroke-strong`), fills with their ink (`--accent-fill`/`--on-accent`, `--danger-fill`/`--on-danger`, `--warning`/`--on-warning`), `--added`/`--removed`, `--code-background`, `--scrim`, the chosen option of a segmented choice or chip (`--chip-on`, `--chip-shadow`). Sheets and dialogs sit on `--sheet` (a step above the page in dark mode) with grouped rows on `--group` and text fields on `--field`, tints that stack; inside `.modal-content` the page tokens point at them (`--background` → `--sheet`, `--surface` and `--bubble-agent` → `--group`, `--bubble-user` → `--field`), so a view styled with the page tokens fits a sheet unchanged. Every color has a light and a dark value. Views use the tokens, or `rgba(var(--text-rgb), a)` for a tint of the text color; a literal only where the color must not follow the theme (white behind a QR code or a favicon).- **Type ramp**: `--text-large-title` 26, `--text-title` 22, `--text-title2` 17, `--text-title3` 15, `--text-body` 13, `--text-callout` 12, `--text-caption` 11 (points, scaled by the text size preference). `lib/fonts.ts` maps the macOS style names onto it (`headline` and `body` → body, `compactBody` → callout, `subheadline`, `footnote`, `caption`, `caption2`, `compactSecondary` → caption).- **Radius**: `--radius-xs` 6, `--radius-s` 10, `--radius-m` 12, `--radius-l` 16, `--radius-xl` 22, `--radius-pill`. **Shadow**: `--shadow-s` (resting), `--shadow-m` (floating chrome), `--shadow-l` (menus, panels), `--shadow-xl` (sheets, dialogs).- **Motion**: `--hover`, `--fade`, `--press`, `--morph`, `--layout`, `--ease`, `--ease-out`, `--spring`. The island has its own (`--island-spring`, `--island-fold`) in `views/island/island.css`.@@ -19,7 +19,7 @@ How the desktop renderer (`apps/desktop/src/renderer/`) styles its views. Views| A fixed-width column that centers an icon, so labels line up | `<IconSlot width={18} tone="secondary">` || A row's title with a note under it | `RowLabel` (`Controls.tsx`) || Reorder by dragging | `pointerDrag` (`lib/pointer-drag.ts`), not native drag and drop: the pointer holds a closed hand, and a roster row lifts as a smaller, translucent copy that settles into its slot |-| A sheet's content | `<SheetPage>` with a `ModalHeader` (`Overlay.tsx`); `ModalHeader` takes a `subtitle`, and `onClose` when it heads a panel instead of a modal |+| A sheet's content | `<SheetPage>` with a `ModalHeader` (`Overlay.tsx`); `ModalHeader` takes an `icon` (an SF Symbol name on a tile, or a logo element), a title that wraps to two lines, a `subtitle` (up to two lines, the rest in its tooltip), and `onClose` when it heads a panel instead of a modal. A `Sheet` without `height` fits its content up to `maxHeight` (and the window); `FormSheet` does that unless `fixed` (content that fills the card or slides in pages that do: a terminal, an agent sheet) || One line with an ellipsis on an element that isn't `Text` | `.truncate` || Controls | `Controls.tsx`, `Overlay.tsx`, `Icon.tsx`; `Hairline`, `Pill`, `Switch` and `ProgressBar` take a `className` for a view's own sizing, and a panel beside an anchor is placed with `anchorPlacement` |