Skip to content

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.

fix(desktop): make the chat window readable, keyboard-friendly and lighter

leepokai29e0e0b7157b
diff --git a/apps/desktop/src/renderer/components/Avatar.tsx b/apps/desktop/src/renderer/components/Avatar.tsx
index 653326f5..0b76d986 100644
--- a/apps/desktop/src/renderer/components/Avatar.tsx
+++ b/apps/desktop/src/renderer/components/Avatar.tsx
@@ -128,15 +128,31 @@ export const CharacterAvatar = memo(function CharacterAvatar({ shape, color, tin
el.height = Math.round(size * ratio)
const ctx = el.getContext('2d')!
const still = mood === 'idle' || reduce
+ // A moving character draws at 30 fps (its light turns slowly), and only while on screen.
let frame = 0
+ let drawn = -Infinity
+ let visible = true
const draw = (time: number) => {
- ctx.setTransform(ratio, 0, 0, ratio, 0, 0)
- ctx.clearRect(0, 0, size, size)
- drawCharacter(ctx, { shape, fill, size, mood, dark, t: still ? 0 : (time / 1000) % 3600, still })
- if (!still) frame = requestAnimationFrame(draw)
+ frame = 0
+ if (time - drawn >= 33) {
+ drawn = time
+ ctx.setTransform(ratio, 0, 0, ratio, 0, 0)
+ ctx.clearRect(0, 0, size, size)
+ drawCharacter(ctx, { shape, fill, size, mood, dark, t: still ? 0 : (time / 1000) % 3600, still })
+ }
+ if (!still && visible) frame = requestAnimationFrame(draw)
}
draw(performance.now())
- return () => cancelAnimationFrame(frame)
+ if (still) return
+ const onScreen = new IntersectionObserver(([e]) => {
+ visible = e!.isIntersecting
+ if (visible && !frame) frame = requestAnimationFrame(draw)
+ })
+ onScreen.observe(el)
+ return () => {
+ onScreen.disconnect()
+ cancelAnimationFrame(frame)
+ }
}, [shape, fill, size, mood, dark, reduce])
return <canvas ref={canvas} aria-hidden style={{ width: size, height: size, display: 'block', flex: 'none', ...style }} />
@@ -263,7 +279,7 @@ export function AvatarWithStatus({ bot, members = [], size = 44 }: { bot: Bot; m
<div
style={{
position: 'absolute', right: 0, bottom: 0, width: size * 0.36, height: size * 0.36, borderRadius: '50%',
- background: 'var(--warning)', boxShadow: '0 0 0 2px var(--background)', display: 'grid', placeItems: 'center', color: '#fff',
+ background: 'var(--warning)', boxShadow: '0 0 0 2px var(--background)', display: 'grid', placeItems: 'center', color: 'var(--on-warning)',
}}
>
<Icon name="exclamationmark" size={size * 0.2} weight="black" scaled={false} />
diff --git a/apps/desktop/src/renderer/components/Controls.tsx b/apps/desktop/src/renderer/components/Controls.tsx
index a9e44b98..1ecc311a 100644
--- a/apps/desktop/src/renderer/components/Controls.tsx
+++ b/apps/desktop/src/renderer/components/Controls.tsx
@@ -1,4 +1,4 @@
-import { Children, Fragment, useRef, useState, type CSSProperties, type ReactNode } from 'react'
+import { Children, Fragment, useRef, useState, type CSSProperties, type KeyboardEvent, type PointerEvent, type ReactNode } from 'react'
import { font } from '../lib/fonts'
import { Icon } from './Icon'
import { AnchoredMenu, IconButtonBase, type MenuItem } from './Overlay'
@@ -56,7 +56,7 @@ export function DropdownMenu({ items, children, className, style, title }: { ite
const ref = useRef<HTMLButtonElement>(null)
return (
<>
- <button ref={ref} className={className} style={style} title={title} onClick={() => setOpen((o) => !o)}>
+ <button ref={ref} className={className} style={style} title={title} aria-haspopup="menu" aria-expanded={open} onClick={() => setOpen((o) => !o)}>
{children}
</button>
<AnchoredMenu open={open} onClose={() => setOpen(false)} anchor={ref} items={items} />
@@ -155,7 +155,7 @@ export function CardSection({ title, footer, accessory, children }: { title?: st
<section className="card-section">
{title || accessory ? (
<div className="card-section-title">
- {title ? <span style={{ ...font(13, 'semibold'), color: 'var(--text)' }}>{title}</span> : null}
+ {title ? <h3 style={{ ...font(13, 'semibold'), color: 'var(--text)' }}>{title}</h3> : null}
<span style={{ flex: 1 }} />
{accessory}
</div>
@@ -199,7 +199,7 @@ export function SearchField({ value, onChange, prompt = 'Search', inputRef }: {
<Icon name="magnifyingglass" size={12} color="var(--secondary)" />
<input ref={inputRef} value={value} placeholder={prompt} spellCheck={false} onChange={(e) => onChange(e.target.value)} />
{value ? (
- <button aria-label="Clear search" onClick={() => onChange('')} style={{ display: 'flex', color: 'var(--tertiary)' }}>
+ <button aria-label="Clear search" title="Clear search" className="search-clear" onClick={() => onChange('')}>
<Icon name="xmark.circle.fill" size={12} />
</button>
) : null}
@@ -233,10 +233,65 @@ export function Pill({ children, fill = 'var(--background)', outlined = false, s
}
/** Determinate progress (`value` 0...1): a thin capsule track that fills from the left. */
-export function ProgressBar({ value, label }: { value: number; label: string }) {
+export function ProgressBar({ value, label, fill, style }: { value: number; label: string; fill?: string; style?: CSSProperties }) {
return (
- <div className="progress-track" role="progressbar" aria-label={label} aria-valuemin={0} aria-valuemax={100} aria-valuenow={Math.round(value * 100)}>
- <div className="progress-fill" style={{ transform: `scaleX(${value})` }} />
+ <div className="progress-track" role="progressbar" aria-label={label} aria-valuemin={0} aria-valuemax={100} aria-valuenow={Math.round(value * 100)} style={style}>
+ <div className="progress-fill" style={{ transform: `scaleX(${value})`, background: fill }} />
</div>
)
}
+
+/**
+ * A panel's resizable edge: a hairline that drags the panel's width, or steps it with ←/→ while
+ * focused. `edge` is the side of the panel it sits on; `onResize` gets the proposed width.
+ */
+export function ResizeHandle({ label, width, min, max, edge, onResize, onDragging }: {
+ label: string
+ width: number
+ min: number
+ max: number
+ edge: 'leading' | 'trailing'
+ onResize: (width: number) => void
+ onDragging?: (dragging: boolean) => void
+}) {
+ const start = useRef<{ x: number; width: number } | null>(null)
+ // Dragging toward the panel's outside grows it.
+ const grow = edge === 'trailing' ? 1 : -1
+ const end = () => {
+ if (!start.current) return
+ start.current = null
+ onDragging?.(false)
+ }
+ const onPointerDown = (e: PointerEvent) => {
+ if (e.button !== 0) return
+ e.currentTarget.setPointerCapture(e.pointerId)
+ start.current = { x: e.clientX, width }
+ onDragging?.(true)
+ }
+ const onPointerMove = (e: PointerEvent) => {
+ if (start.current) onResize(start.current.width + grow * (e.clientX - start.current.x))
+ }
+ const onKeyDown = (e: KeyboardEvent) => {
+ if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') return
+ e.preventDefault()
+ onResize(width + grow * (e.key === 'ArrowRight' ? 16 : -16))
+ }
+ return (
+ <div
+ className="resize-handle"
+ role="separator"
+ tabIndex={0}
+ aria-label={label}
+ aria-orientation="vertical"
+ aria-valuenow={Math.round(width)}
+ aria-valuemin={min}
+ aria-valuemax={Math.round(max)}
+ onPointerDown={onPointerDown}
+ onPointerMove={onPointerMove}
+ onPointerUp={end}
+ onPointerCancel={end}
+ onLostPointerCapture={end}
+ onKeyDown={onKeyDown}
+ />
+ )
+}
diff --git a/apps/desktop/src/renderer/components/Overlay.tsx b/apps/desktop/src/renderer/components/Overlay.tsx
index 40a9f535..ef8d5b77 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, useLayoutEffect, useRef, useState, type ReactNode, type RefObject } from 'react'
+import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState, type ReactNode, type RefObject } from 'react'
import { createPortal } from 'react-dom'
import { font } from '../lib/fonts'
import { reduceMotion } from '../lib/theme'
@@ -60,6 +60,45 @@ function useEscape(active: boolean, onEscape: () => void) {
}, [active])
}
+const FOCUSABLE = 'button:not(:disabled), [href], input:not(:disabled), textarea:not(:disabled), select:not(:disabled), [tabindex]:not([tabindex="-1"])'
+
+/** The open modal's title id, so its `ModalHeader` names the dialog. */
+const ModalTitleContext = createContext<string | undefined>(undefined)
+
+/**
+ * An open modal holds focus: everything behind it goes inert, focus moves in (to a
+ * `data-autofocus` control, else the card itself), and returns to where it was on close.
+ */
+function useModalFocus(open: boolean, mounted: boolean, layer: RefObject<HTMLElement | null>) {
+ useEffect(() => {
+ const node = layer.current
+ if (!open || !node) return
+ const previous = document.activeElement instanceof HTMLElement ? document.activeElement : null
+ const muted = [...document.body.children].filter((el): el is HTMLElement => el instanceof HTMLElement && el !== node && !el.inert)
+ for (const el of muted) el.inert = true
+ if (!node.contains(document.activeElement)) (node.querySelector<HTMLElement>('[data-autofocus]') ?? node.querySelector<HTMLElement>('[data-modal-card]'))?.focus({ preventScroll: true })
+ // Tab cycles inside the top modal instead of leaving the page.
+ const onKey = (e: KeyboardEvent) => {
+ if (e.key !== 'Tab' || node.inert) return
+ const items = [...node.querySelectorAll<HTMLElement>(FOCUSABLE)].filter((el) => el.getClientRects().length > 0 && !el.closest('[inert]'))
+ const first = items[0]
+ const last = items[items.length - 1]
+ if (!first || !last) return
+ const active = document.activeElement
+ const wrap = e.shiftKey ? active === first || !node.contains(active) : active === last
+ if (!wrap) return
+ e.preventDefault()
+ ;(e.shiftKey ? last : first).focus()
+ }
+ window.addEventListener('keydown', onKey, true)
+ return () => {
+ window.removeEventListener('keydown', onKey, true)
+ for (const el of muted) el.inert = false
+ if (previous?.isConnected) previous.focus({ preventScroll: true })
+ }
+ }, [open, mounted, layer])
+}
+
/** The Mac modal (`.codyncSheet`): a centered card over a dim; the content sizes it. */
export function Sheet({ open, onClose, width, height, dismissOnDim = false, children }: {
open: boolean
@@ -72,17 +111,22 @@ export function Sheet({ open, onClose, width, height, dismissOnDim = false, chil
}) {
const { mounted, shown } = usePresence(open)
const last = useRef(children)
+ const layer = useRef<HTMLDivElement>(null)
+ const titleId = useId()
if (open) last.current = children
useEscape(open, onClose)
+ useModalFocus(open, mounted, layer)
if (!mounted) return null
return createPortal(
<DismissContext.Provider value={onClose}>
- <div className={`modal-card ${shown ? 'shown' : ''}`} role="dialog" aria-modal>
- <div className="modal-dim" onClick={dismissOnDim ? onClose : undefined} />
- <div className="modal-content" style={{ width, height, maxWidth: 'calc(100vw - 48px)', maxHeight: 'calc(100vh - 48px)' }}>
- {open ? children : last.current}
+ <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, maxWidth: 'calc(100vw - 48px)', maxHeight: 'calc(100vh - 48px)' }}>
+ {open ? children : last.current}
+ </div>
</div>
- </div>
+ </ModalTitleContext.Provider>
</DismissContext.Provider>,
document.body,
)
@@ -105,17 +149,20 @@ export function Dialog({ open, title, message, actions, cancel = 'Cancel', onClo
}) {
const { mounted, shown } = usePresence(open, 120)
const last = useRef({ title, message, actions })
+ const layer = useRef<HTMLDivElement>(null)
+ const id = useId()
if (open) last.current = { title, message, actions }
useEscape(open && cancel !== null, onClose)
+ useModalFocus(open, mounted, layer)
if (!mounted) return null
const shownContent = last.current
return createPortal(
- <div className={`dialog ${shown ? 'shown' : ''}`} role="alertdialog" aria-modal>
+ <div ref={layer} className={`dialog ${shown ? 'shown' : ''}`} role="alertdialog" aria-modal aria-labelledby={`${id}-title`} aria-describedby={shownContent.message ? `${id}-message` : undefined}>
<div className="dialog-dim" onClick={() => cancel !== null && onClose()} />
- <div className="dialog-card">
+ <div className="dialog-card" data-modal-card tabIndex={-1}>
<div className="dialog-text">
- <div style={font('headline')}>{shownContent.title}</div>
- {shownContent.message ? <div style={{ ...font('compactSecondary'), color: 'var(--secondary)' }}>{shownContent.message}</div> : null}
+ <h2 id={`${id}-title`} style={font('headline')}>{shownContent.title}</h2>
+ {shownContent.message ? <div id={`${id}-message`} style={{ ...font('compactSecondary'), color: 'var(--secondary)' }}>{shownContent.message}</div> : null}
</div>
<div className="dialog-buttons">
{shownContent.actions.map((a) => (
@@ -131,7 +178,7 @@ export function Dialog({ open, title, message, actions, cancel = 'Cancel', onClo
</button>
))}
{cancel !== null ? (
- <button className="dialog-button" onClick={onClose}>
+ <button className="dialog-button" data-autofocus onClick={onClose}>
{cancel}
</button>
) : null}
@@ -204,17 +251,19 @@ export function MenuPanel({ items, reactions, dismiss, maxHeight }: { items: Men
return () => window.removeEventListener('keydown', onKey)
}, [items, highlight, dismiss])
return (
- <div className="menu-panel" style={{ maxHeight }}>
+ <div className="menu-panel" role="menu" style={{ maxHeight }}>
{reactions ? (
<div style={{ paddingBottom: items.length ? 4 : 0 }}>
<ReactionStrip pick={reactions} dismiss={dismiss} />
</div>
) : null}
{items.map((item, i) => (
- <div key={`${item.title}-${i}`}>
- {item.divider ? <div className="menu-divider" /> : null}
+ <div key={`${item.title}-${i}`} role="none">
+ {item.divider ? <div className="menu-divider" role="separator" /> : null}
<button
className={`menu-row ${item.destructive ? 'destructive' : ''} ${highlight === i ? 'highlight' : ''}`}
+ role={item.selected === undefined ? 'menuitem' : 'menuitemradio'}
+ aria-checked={item.selected}
title={item.title}
onMouseEnter={() => setHighlight(i)}
onClick={() => {
@@ -308,7 +357,7 @@ export function ModalHeader({ title, trailing }: { title: ReactNode; trailing?:
const dismiss = useDismiss()
return (
<div className="modal-header">
- <div style={{ ...font('compactBody', 'semibold'), flex: 1, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{title}</div>
+ <h2 id={useContext(ModalTitleContext)} style={{ ...font('compactBody', 'semibold'), flex: 1, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{title}</h2>
{trailing}
<IconButtonBase title="Close" icon="xmark" onClick={dismiss} />
</div>
@@ -316,7 +365,7 @@ export function ModalHeader({ title, trailing }: { title: ReactNode; trailing?:
}
/** Plain icon button that lights up on hover and press. Icon-only, labelled for VoiceOver. */
-export function IconButtonBase({ title, icon, onClick, selected = false, size = 28, disabled, className, buttonRef }: {
+export function IconButtonBase({ title, icon, onClick, selected = false, size = 28, disabled, className, buttonRef, menuOpen }: {
title: string
icon: string
onClick?: (e: React.MouseEvent) => void
@@ -325,6 +374,8 @@ export function IconButtonBase({ title, icon, onClick, selected = false, size =
disabled?: boolean
className?: string
buttonRef?: RefObject<HTMLButtonElement | null>
+ /** Set when the button opens a menu: whether that menu is open. */
+ menuOpen?: boolean
}) {
return (
<button
@@ -333,6 +384,8 @@ export function IconButtonBase({ title, icon, onClick, selected = false, size =
style={{ width: size, height: size, borderRadius: size * 0.28 }}
title={title}
aria-label={title}
+ aria-haspopup={menuOpen === undefined ? undefined : 'menu'}
+ aria-expanded={menuOpen}
disabled={disabled}
onClick={onClick}
>
diff --git a/apps/desktop/src/renderer/components/controls.css b/apps/desktop/src/renderer/components/controls.css
index b66e19ca..e4ebe405 100644
--- a/apps/desktop/src/renderer/components/controls.css
+++ b/apps/desktop/src/renderer/components/controls.css
@@ -2,7 +2,7 @@
font-size: calc(12px * var(--scale));
font-weight: 500;
padding: 6px 12px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
display: inline-flex;
align-items: center;
justify-content: center;
@@ -57,7 +57,7 @@
position: relative;
width: 34px;
height: 20px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--bubble-user);
flex: none;
transition: background-color var(--hover);
@@ -87,7 +87,7 @@
font-size: calc(12px * var(--scale));
color: var(--text);
padding: 5px 9px;
- border-radius: 10px;
+ border-radius: var(--radius-s);
max-width: 100%;
}
.choice-picker.outlined {
@@ -107,14 +107,14 @@
gap: 2px;
padding: 3px;
background: var(--bubble-user);
- border-radius: 999px;
+ border-radius: var(--radius-pill);
}
.segmented-thumb {
position: absolute;
top: 3px;
bottom: 3px;
left: 3px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--background);
transition: transform var(--morph);
}
@@ -135,7 +135,7 @@
/* Grok Bot's list cards (routines, the computer switch): an outline on the page, no fill. */
.outlined-card {
border: 1px solid var(--border);
- border-radius: 14px;
+ border-radius: var(--radius-l);
}
.tab-choice {
@@ -146,7 +146,7 @@
.tab-choice-option {
height: calc(24px * var(--scale));
padding: 0 calc(10px * var(--scale));
- border-radius: 999px;
+ border-radius: var(--radius-pill);
font-size: calc(13px * var(--scale));
color: var(--secondary);
white-space: nowrap;
@@ -194,7 +194,7 @@
}
.card-section-rows {
background: var(--surface);
- border-radius: 16px;
+ border-radius: var(--radius-l);
display: flex;
flex-direction: column;
}
@@ -210,7 +210,7 @@
min-width: 0;
}
.card-section-footer {
- font-size: calc(10px * var(--scale));
+ font-size: calc(11px * var(--scale));
color: var(--secondary);
line-height: 1.4;
padding: 0 2px;
@@ -242,13 +242,44 @@
gap: 8px;
padding: 7px 10px;
background: var(--bubble-agent);
- border-radius: 999px;
+ border-radius: var(--radius-pill);
font-size: calc(12px * var(--scale));
}
.search-field input {
flex: 1;
min-width: 0;
}
+/* A panel's resizable edge: a hairline with a wider grab area (ResizeHandle). */
+.resize-handle {
+ width: 1px;
+ flex: none;
+ background: var(--border);
+ position: relative;
+ z-index: 7;
+ touch-action: none;
+}
+.resize-handle::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: -4px;
+ width: 9px;
+ cursor: col-resize;
+}
+
+.search-field:focus-within {
+ outline: 2px solid var(--secondary);
+}
+/* The clear button gets a 24 pt target around its small glyph. */
+.search-clear {
+ display: grid;
+ place-items: center;
+ width: 24px;
+ height: 24px;
+ margin: -6px -6px -6px 0;
+ color: var(--tertiary);
+}
.disclosure-label {
display: flex;
@@ -261,13 +292,13 @@
display: inline-flex;
align-items: center;
padding: 5px 9px;
- border-radius: 10px;
+ border-radius: var(--radius-s);
}
.progress-track {
width: 100%;
height: 4px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--bubble-user);
overflow: hidden;
}
diff --git a/apps/desktop/src/renderer/components/overlay.css b/apps/desktop/src/renderer/components/overlay.css
index 542f677e..ac9ed41d 100644
--- a/apps/desktop/src/renderer/components/overlay.css
+++ b/apps/desktop/src/renderer/components/overlay.css
@@ -9,16 +9,16 @@
.modal-dim {
position: absolute;
inset: 0;
- background: rgba(0, 0, 0, 0.4);
+ background: var(--scrim);
opacity: 0;
transition: opacity var(--layout);
}
.modal-content {
position: relative;
background: var(--background);
- border-radius: 20px;
+ border-radius: var(--radius-xl);
overflow: hidden;
- box-shadow: 0 12px 60px rgba(0, 0, 0, 0.3);
+ box-shadow: var(--shadow-xl);
opacity: 0;
transform: scale(0.96);
transition: opacity var(--layout), transform var(--layout);
@@ -83,7 +83,7 @@
.dialog-dim {
position: absolute;
inset: 0;
- background: rgba(0, 0, 0, 0.35);
+ background: var(--scrim);
}
.dialog-card {
position: relative;
@@ -92,8 +92,8 @@
width: min(320px, calc(100vw - 48px));
padding: 18px;
background: var(--bubble-agent);
- border-radius: 22px;
- box-shadow: 0 10px 48px rgba(0, 0, 0, 0.25);
+ border-radius: var(--radius-xl);
+ box-shadow: var(--shadow-xl);
display: flex;
flex-direction: column;
gap: 14px;
@@ -104,6 +104,7 @@
gap: 6px;
text-align: center;
color: var(--text);
+ overflow-wrap: anywhere;
}
.dialog-buttons {
display: flex;
@@ -115,7 +116,7 @@
font-weight: 500;
text-align: center;
padding: 8px 0;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--bubble-user);
color: var(--text);
transition: transform var(--press), opacity var(--press);
@@ -124,9 +125,12 @@
background: var(--accent-fill);
color: var(--on-accent);
}
+[data-modal-card]:focus {
+ outline: none;
+}
.dialog-button.destructive {
- background: var(--danger);
- color: #fff;
+ background: var(--danger-fill);
+ color: var(--on-danger);
}
.dialog-button:active {
transform: scale(0.98);
@@ -155,8 +159,8 @@
}
.anchored-panel {
background: var(--bubble-agent);
- border-radius: 14px;
- box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
+ border-radius: var(--radius-l);
+ box-shadow: var(--shadow-l);
overflow: hidden;
transform: scale(0.98);
transition: transform var(--layout);
@@ -182,7 +186,7 @@
gap: 10px;
width: 100%;
padding: 6px 10px;
- border-radius: 8px;
+ border-radius: var(--radius-s);
font-size: calc(12px * var(--scale));
color: var(--text);
transition: background-color var(--hover);
diff --git a/apps/desktop/src/renderer/lib/fonts.ts b/apps/desktop/src/renderer/lib/fonts.ts
index b51ade62..9557e47a 100644
--- a/apps/desktop/src/renderer/lib/fonts.ts
+++ b/apps/desktop/src/renderer/lib/fonts.ts
@@ -11,9 +11,10 @@ export const TextStyle = {
body: 13,
callout: 12,
subheadline: 11,
- footnote: 10,
- caption: 10,
- caption2: 10,
+ // macOS draws these at 10; 11 is the floor for text people read or click.
+ footnote: 11,
+ caption: 11,
+ caption2: 11,
/** Codync's compact desktop body (12) and secondary (11). */
compactBody: 12,
compactSecondary: 11,
diff --git a/apps/desktop/src/renderer/lib/theme.ts b/apps/desktop/src/renderer/lib/theme.ts
index 2bbbc496..6a98a3e1 100644
--- a/apps/desktop/src/renderer/lib/theme.ts
+++ b/apps/desktop/src/renderer/lib/theme.ts
@@ -38,11 +38,11 @@ export function useReduceMotion() {
export const isDark = darkQuery.get
export const reduceMotion = motionQuery.get
-/** Palette values for drawing code (canvas) that can't read CSS variables. */
+/** Palette values for drawing code (canvas) that can't read CSS variables; they match theme.css. */
export const palette = (dark: boolean) => ({
- text: dark ? [242, 242, 242] : [20, 20, 20],
- secondary: dark ? '#9a9a9a' : '#6b6b6b',
- background: dark ? '#0a0a0a' : '#ffffff',
+ text: dark ? [250, 250, 250] : [20, 20, 20],
+ warning: '#F0A030',
+ danger: dark ? '#F0A7A7' : '#C23A2B',
})
export interface Swatch {
diff --git a/apps/desktop/src/renderer/styles/theme.css b/apps/desktop/src/renderer/styles/theme.css
index 187beb1b..3d8738d1 100644
--- a/apps/desktop/src/renderer/styles/theme.css
+++ b/apps/desktop/src/renderer/styles/theme.css
@@ -10,13 +10,17 @@
--text: #141414;
--text-rgb: 20, 20, 20;
--secondary: #6b6b6b;
- --tertiary: #767676;
+ --tertiary: #6e6e6e;
--accent-fill: #000000;
--accent: #000000;
--on-accent: #ffffff;
--accent-dim: #d9d9d9;
--danger: #c23a2b;
+ /* Destructive buttons: a deeper red that keeps white text readable in both schemes. */
+ --danger-fill: #c23a2b;
+ --on-danger: #ffffff;
--warning: #f0a030;
+ --on-warning: #000000;
--attention: #936000;
--code-background: #f4f4f4;
--added: #2e7d32;
@@ -29,12 +33,26 @@
/* Floating transcript controls (chevrons, Jump to latest, inspector actions). */
--chat-button: #eeeeee;
--composer-fill: #f3f3f3;
- --chrome-fill: #fafafa;
+ --chrome-fill: #f3f3f3;
--chrome-stroke: rgba(0, 0, 0, 0.09);
- --composer-stroke: rgba(0, 0, 0, 0.14);
- --roster-selected: #e7e7e7;
+ --stroke-strong: rgba(0, 0, 0, 0.14);
+ --roster-selected: #ececec;
/* Grok's frosted floating surfaces (title pill, call bar). */
--frosted: rgba(244, 244, 244, 0.82);
+ /* The dim behind sheets and dialogs. */
+ --scrim: rgba(0, 0, 0, 0.4);
+
+ /* Corner radii and shadows: one scale for every surface. */
+ --radius-xs: 6px;
+ --radius-s: 10px;
+ --radius-m: 12px;
+ --radius-l: 16px;
+ --radius-xl: 22px;
+ --radius-pill: 999px;
+ --shadow-s: 0 2px 20px rgba(0, 0, 0, 0.06);
+ --shadow-m: 0 4px 32px rgba(0, 0, 0, 0.12);
+ --shadow-l: 0 8px 40px rgba(0, 0, 0, 0.25);
+ --shadow-xl: 0 12px 60px rgba(0, 0, 0, 0.3);
/* The Mac text preference: conversation size / 12 pt scales the chrome too. */
--scale: 1;
@@ -44,6 +62,8 @@
/* Grok Bot's motion. */
--ease: cubic-bezier(0.25, 0.1, 0.25, 1);
+ /* Arrivals: fast out, a long settle, no overshoot. */
+ --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--hover: 0.12s var(--ease);
--fade: 0.12s var(--ease);
--press: 0.05s var(--ease);
@@ -51,7 +71,6 @@
/* Critically damped 0.3 s spring. */
--spring: linear(0, 0.0712, 0.2244, 0.3992, 0.5638, 0.7018, 0.8077, 0.8834, 0.9342, 0.9663, 0.9853, 0.9958, 1.0009, 1.0028, 1.0029, 1);
--layout: 0.3s var(--spring);
- --conversation-motion: 0.42s var(--spring);
--font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif;
--mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'DejaVu Sans Mono', monospace;
@@ -67,12 +86,13 @@
--text: #fafafa;
--text-rgb: 250, 250, 250;
--secondary: #a0a0a0;
- --tertiary: #929292;
+ --tertiary: #9a9a9a;
--accent-fill: #ffffff;
--accent: #ffffff;
--on-accent: #000000;
--accent-dim: #333333;
--danger: #f0a7a7;
+ --danger-fill: #b3261e;
--code-background: #111111;
--attention: #ecaf52;
--added: #8fd18b;
@@ -84,7 +104,7 @@
--composer-fill: #2f2f2f;
--chrome-fill: #181818;
--chrome-stroke: rgba(255, 255, 255, 0.10);
- --composer-stroke: rgba(255, 255, 255, 0.17);
+ --stroke-strong: rgba(255, 255, 255, 0.17);
--roster-selected: #292929;
--frosted: rgba(35, 35, 35, 0.82);
}
@@ -97,7 +117,6 @@
--press: 0s;
--morph: 0s;
--layout: 0s;
- --conversation-motion: 0s;
}
}
@@ -183,6 +202,24 @@ a {
color: inherit;
}
+/* Headings carry structure; each sets its own type with font(). */
+h1,
+h2,
+h3 {
+ margin: 0;
+ font: inherit;
+}
+
+/* The shared fade for views and rows that appear. */
+@keyframes fade-in {
+ from {
+ opacity: 0;
+ }
+}
+.fade-in {
+ animation: fade-in var(--fade) both;
+}
+
/* Hover/press feedback shared by plain buttons (PressScale). */
.press {
transition: transform var(--press);
diff --git a/apps/desktop/src/renderer/views/AccountWelcomeView.tsx b/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
index f2d80290..e6f522b6 100644
--- a/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
+++ b/apps/desktop/src/renderer/views/AccountWelcomeView.tsx
@@ -41,7 +41,7 @@ export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
const rise = (shown: boolean): CSSProperties => ({
opacity: shown ? 1 : 0,
transform: shown ? 'none' : 'translateY(14px)',
- transition: 'opacity 0.6s cubic-bezier(0.34, 1.3, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.3, 0.64, 1)',
+ transition: 'opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out)',
})
return (
@@ -89,7 +89,7 @@ export function AccountWelcomeView({ onContinue }: { onContinue: () => void }) {
{!account.isConfigured ? (
<div style={{ ...font('footnote'), color: 'var(--tertiary)' }}>Sign-in isn't configured in this build. You can still use Codync on this {deviceName}.</div>
) : null}
- {account.errorMessage ? <div style={{ ...font('footnote'), color: 'var(--warning)' }}>{account.errorMessage}</div> : null}
+ {account.errorMessage ? <div style={{ ...font('footnote'), color: 'var(--attention)' }}>{account.errorMessage}</div> : null}
</div>
</div>
</div>
@@ -127,7 +127,7 @@ function WelcomeCrew({ shown }: { shown: boolean }) {
position: 'absolute', left: '50%', top: '50%',
transform: `translate(calc(-50% + ${m.x}px), calc(-50% + ${m.y + (reduce ? 0 : Math.sin(t * 1.3 + i * 1.7) * 5)}px)) scale(${shown ? 1 : 0.3})`,
opacity: shown ? 1 : 0,
- transition: `opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) ${i * 0.07}s, scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) ${i * 0.07}s`,
+ transition: `opacity 0.7s var(--ease-out) ${i * 0.07}s, scale 0.7s var(--ease-out) ${i * 0.07}s`,
}}
>
<CharacterAvatar shape={m.shape} color={m.color} size={m.size} mood={m.mood} />
@@ -146,7 +146,7 @@ function WelcomeChatGlimpse({ shown }: { shown: boolean }) {
const timer = setTimeout(() => setReplied(true), reduce ? 0 : 1600)
return () => clearTimeout(timer)
}, [shown, reduce])
- const rise: CSSProperties = { opacity: shown ? 1 : 0, transform: shown ? 'none' : 'translateY(14px)', transition: 'opacity 0.6s, transform 0.6s cubic-bezier(0.34, 1.3, 0.64, 1)' }
+ const rise: CSSProperties = { opacity: shown ? 1 : 0, transform: shown ? 'none' : 'translateY(14px)', transition: 'opacity 0.6s, transform 0.6s var(--ease-out)' }
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
<div style={{ display: 'flex', justifyContent: 'flex-end', ...rise }}>
@@ -155,7 +155,7 @@ function WelcomeChatGlimpse({ shown }: { shown: boolean }) {
<div style={{ display: 'flex', alignItems: 'flex-end', gap: 8, ...rise }}>
<CharacterAvatar shape="blob" color="blue" size={28} mood={replied ? 'idle' : 'working'} />
{replied ? (
- <span style={{ ...font('subheadline'), color: 'var(--text)', padding: '9px 14px', background: 'var(--bubble-agent)', borderRadius: 18, animation: 'bubble-in 0.45s cubic-bezier(0.34, 1.3, 0.64, 1) both', transformOrigin: 'bottom left' }}>
+ <span style={{ ...font('subheadline'), color: 'var(--text)', padding: '9px 14px', background: 'var(--bubble-agent)', borderRadius: 18, animation: 'bubble-in 0.45s var(--ease-out) both', transformOrigin: 'bottom left' }}>
Done. It raced the session refresh; tests pass on fix/login.
</span>
) : (
diff --git a/apps/desktop/src/renderer/views/BotRoster.tsx b/apps/desktop/src/renderer/views/BotRoster.tsx
index 8bdc666d..010989ff 100644
--- a/apps/desktop/src/renderer/views/BotRoster.tsx
+++ b/apps/desktop/src/renderer/views/BotRoster.tsx
@@ -118,7 +118,7 @@ function RosterRow({ background, compact, label, title, selected, onHover, onCli
className="roster-row"
style={{ padding: compact ? 0 : '0 8px', background }}
aria-label={label}
- aria-selected={selected}
+ aria-current={selected || undefined}
title={title}
draggable
onMouseEnter={() => onHover(true)}
diff --git a/apps/desktop/src/renderer/views/BotRow.tsx b/apps/desktop/src/renderer/views/BotRow.tsx
index 1ba41927..75fbf572 100644
--- a/apps/desktop/src/renderer/views/BotRow.tsx
+++ b/apps/desktop/src/renderer/views/BotRow.tsx
@@ -51,7 +51,7 @@ const line: React.CSSProperties = { ...font('callout'), whiteSpace: 'nowrap', ov
function Preview({ bot, store }: { bot: Bot; store: BotStore }) {
if (needsInput(bot)) {
return (
- <span style={{ display: 'flex', alignItems: 'center', gap: 6, color: 'var(--warning)', minWidth: 0 }}>
+ <span style={{ display: 'flex', alignItems: 'center', gap: 6, color: 'var(--attention)', minWidth: 0 }}>
<ThinkingOrb state="listening" size={16} color="var(--warning)" />
<span style={line}>{bot.activity || 'Needs your approval'}</span>
</span>
diff --git a/apps/desktop/src/renderer/views/ChatWindow.tsx b/apps/desktop/src/renderer/views/ChatWindow.tsx
index bb09fb75..fd1fb885 100644
--- a/apps/desktop/src/renderer/views/ChatWindow.tsx
+++ b/apps/desktop/src/renderer/views/ChatWindow.tsx
@@ -3,7 +3,7 @@ import type { WindowCommand } from '@shared/ipc'
import { isSSHConnecting, showsChat as shouldShowChat } from '@shared/ssh-startup'
import { draftOf, type Bot, type BotDraft } from '@shared/models'
import { CharacterAvatar } from '../components/Avatar'
-import { Button, ChoicePicker, IconButton } from '../components/Controls'
+import { Button, ChoicePicker, IconButton, ResizeHandle } from '../components/Controls'
import { AnchoredMenu, Dialog, ModalHeader, Sheet, type MenuItem } from '../components/Overlay'
import { font } from '../lib/fonts'
import { useModels } from '../lib/observable'
@@ -46,8 +46,6 @@ export function ChatWindow() {
const [accessSetup, setAccessSetup] = usePref(prefs.computerAccessSetup)
const [showAccess, setShowAccess] = useState(false)
const [confirmReset, setConfirmReset] = useState(false)
- useTraySummary(app)
- useIslandSummary(app)
useSSHAttachments(app)
const ssh = useSSH()
const showsChat = shouldShowChat(app.host.state.kind, app.computers.length, ssh.state)
@@ -101,6 +99,7 @@ export function ChatWindow() {
const approval = app.currentApproval
return (
<div className="chat-window">
+ <Summaries />
{onboarded ? (
accessSetup === null ? (
<ComputerAccessView onContinue={(ready) => setAccessSetup(ready ? 'ready' : 'later')} />
@@ -138,6 +137,14 @@ export function ChatWindow() {
)
}
+/** Keeps the tray and the approval island current: it follows every store, so it renders nothing. */
+function Summaries() {
+ const app = useApp()
+ useTraySummary(app)
+ useIslandSummary(app)
+ return null
+}
+
interface BotTarget {
bot: Bot
store: BotStore
@@ -278,17 +285,12 @@ function ChatSplitView() {
}
// The sidebar's edge drags its width; narrower than 180 collapses it to the rail.
- const dragStart = useRef<{ x: number; width: number } | null>(null)
- const onDividerDown = (e: React.PointerEvent) => {
- ;(e.target as HTMLElement).setPointerCapture(e.pointerId)
- dragStart.current = { x: e.clientX, width: compact ? 76 : sidebarWidth }
- }
- const onDividerMove = (e: React.PointerEvent) => {
- if (!dragStart.current) return
- const proposed = dragStart.current.width + e.clientX - dragStart.current.x
+ const [resizing, setResizing] = useState(false)
+ const sidebarMax = Math.min(420, window.innerWidth - 420)
+ const resizeSidebar = (proposed: number) => {
const nextCompact = proposed < 180
if (nextCompact !== compact) setCompact(nextCompact)
- if (!nextCompact) setSidebarWidth(Math.min(Math.max(260, proposed), Math.min(420, window.innerWidth - 420)))
+ if (!nextCompact) setSidebarWidth(Math.min(Math.max(260, proposed), sidebarMax))
}
const errorMessage = app.errorMessage
@@ -343,13 +345,13 @@ function ChatSplitView() {
const width = compact ? 76 : sidebarWidth
return (
<div className="split" style={{ pointerEvents: showAccount || contextBot ? 'none' : undefined }}>
- <aside className={`sidebar ${compact ? 'compact' : ''}`} style={{ width }}>
- <div className="sidebar-header drag" style={{ paddingLeft: compact ? 0 : isMac ? 80 : 18, opacity: compact ? 0 : 1, pointerEvents: compact ? 'none' : undefined }} aria-hidden={compact}>
+ <aside className={`sidebar ${compact ? 'compact' : ''} ${resizing ? 'resizing' : ''}`} style={{ width }}>
+ <div className="sidebar-header drag" style={{ paddingLeft: compact ? 0 : isMac ? 80 : 18, opacity: compact ? 0 : 1 }} inert={compact}>
<span style={{ flex: 1 }} />
<div className="no-drag" style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<ComputerFilterHeader hidden={hidden} setHidden={setHidden} manage={() => setSettings('computers')} compact />
<IconButton title="Search" icon="magnifyingglass" size={32} className="sidebar-header-action" onClick={() => setSearching(true)} />
- <IconButton title="New" icon="plus" size={32} className="sidebar-header-action" buttonRef={newButton} onClick={() => setNewMenu((o) => !o)} disabled={!onlineStores.length} />
+ <IconButton title="New" icon="plus" size={32} className="sidebar-header-action" buttonRef={newButton} menuOpen={newMenu} onClick={() => setNewMenu((o) => !o)} disabled={!onlineStores.length} />
</div>
<AnchoredMenu open={newMenu} onClose={() => setNewMenu(false)} anchor={newButton} items={newItems} />
</div>
@@ -372,7 +374,7 @@ function ChatSplitView() {
{compact ? (
<div className="rail-actions">
<IconButton title="Search" icon="magnifyingglass" onClick={() => setSearching(true)} />
- <IconButton title="New" icon="plus" size={36} buttonRef={railNewButton} disabled={!onlineStores.length} onClick={() => setRailNewMenu((o) => !o)} />
+ <IconButton title="New" icon="plus" size={36} buttonRef={railNewButton} menuOpen={railNewMenu} disabled={!onlineStores.length} onClick={() => setRailNewMenu((o) => !o)} />
<AnchoredMenu open={railNewMenu} onClose={() => setRailNewMenu(false)} anchor={railNewButton} items={newItems} />
<IconButton title="Extensions" icon="square.grid.2x2" size={36} onClick={openMarketplace} />
<UpdateBadge size={32} />
@@ -384,7 +386,7 @@ function ChatSplitView() {
<SidebarFooter accountOpen={showAccount} onAccount={() => setShowAccount((s) => !s)} onExtensions={openMarketplace} />
)}
</aside>
- <div className="sidebar-divider" onPointerDown={onDividerDown} onPointerMove={onDividerMove} onPointerUp={() => (dragStart.current = null)} role="separator" aria-label="Resize sidebar" aria-valuenow={width} />
+ <ResizeHandle label="Resize sidebar" width={width} min={76} max={sidebarMax} edge="trailing" onResize={resizeSidebar} onDragging={setResizing} />
<main className="detail">
{/* The call bar's settings open this window's Settings at Voice chat. */}
<OpenVoiceSettings.Provider value={openVoiceSettings}>{detail}</OpenVoiceSettings.Provider>
diff --git a/apps/desktop/src/renderer/views/PairingWindow.tsx b/apps/desktop/src/renderer/views/PairingWindow.tsx
index 2dfb2db0..5527220a 100644
--- a/apps/desktop/src/renderer/views/PairingWindow.tsx
+++ b/apps/desktop/src/renderer/views/PairingWindow.tsx
@@ -59,7 +59,7 @@ export function PairingWindow() {
Scan with the Codync app or the iPhone Camera. No Tailscale or open ports needed: your iPhone connects directly on the same Wi-Fi, and through the encrypted relay anywhere else.
</div>
{cloud?.enabled !== true ? (
- <div style={{ ...font('caption'), color: 'var(--warning)', textAlign: 'center' }}>
+ <div style={{ ...font('caption'), color: 'var(--attention)', textAlign: 'center' }}>
{info.urls.length === 0
? 'No network address found and “Reach from anywhere” is off. Connect to Wi-Fi or turn it on.'
: `“Reach from anywhere” is off, so the iPhone only reaches ${name} on the same network.`}
diff --git a/apps/desktop/src/renderer/views/PanelMenus.tsx b/apps/desktop/src/renderer/views/PanelMenus.tsx
index 30439b91..16848910 100644
--- a/apps/desktop/src/renderer/views/PanelMenus.tsx
+++ b/apps/desktop/src/renderer/views/PanelMenus.tsx
@@ -96,7 +96,7 @@ export function AccountPanelLayer({ compact, approvals, onDismiss, onUsage, onSe
}
/>
{page === 'main' && errorMessage ? (
- <div style={{ ...font(12), color: 'var(--warning)', padding: '8px 10px' }}>{errorMessage}</div>
+ <div style={{ ...font(12), color: 'var(--attention)', padding: '8px 10px' }}>{errorMessage}</div>
) : null}
</div>
</div>
diff --git a/apps/desktop/src/renderer/views/bots/AgentModelPicker.tsx b/apps/desktop/src/renderer/views/bots/AgentModelPicker.tsx
index 8f64127c..b13bbe17 100644
--- a/apps/desktop/src/renderer/views/bots/AgentModelPicker.tsx
+++ b/apps/desktop/src/renderer/views/bots/AgentModelPicker.tsx
@@ -81,7 +81,7 @@ export function AgentModelPicker({ backend, models, selection, onChange, options
)
})}
{!custom && !loading && failure ? (
- <span style={{ ...font('caption'), color: 'var(--warning)' }}>{failure}</span>
+ <span style={{ ...font('caption'), color: 'var(--attention)' }}>{failure}</span>
) : !custom && !loading && empty ? (
<span style={{ ...font('caption'), color: 'var(--secondary)' }}>This agent doesn't advertise a model list. Leave Default or enter a model ID.</span>
) : null}
diff --git a/apps/desktop/src/renderer/views/bots/BotEditorView.tsx b/apps/desktop/src/renderer/views/bots/BotEditorView.tsx
index 90b2f33b..17990481 100644
--- a/apps/desktop/src/renderer/views/bots/BotEditorView.tsx
+++ b/apps/desktop/src/renderer/views/bots/BotEditorView.tsx
@@ -153,7 +153,7 @@ function BotSettingsForm({ draft, onChange, error, plugins, part = 'all' }: {
onChange={(id) => set('backend', id)}
/>
</ValueRow>
- {backend && !backend.available ? <span style={{ ...font('caption'), color: 'var(--warning)' }}>{backend.installHint}</span> : null}
+ {backend && !backend.available ? <span style={{ ...font('caption'), color: 'var(--attention)' }}>{backend.installHint}</span> : null}
{draft.backend === 'custom' ? (
<input
className="field-box fade-in"
diff --git a/apps/desktop/src/renderer/views/bots/bots.css b/apps/desktop/src/renderer/views/bots/bots.css
index 615dafeb..888817d1 100644
--- a/apps/desktop/src/renderer/views/bots/bots.css
+++ b/apps/desktop/src/renderer/views/bots/bots.css
@@ -6,7 +6,7 @@
width: 100%;
padding: 8px 10px;
background: var(--background);
- border-radius: 12px;
+ border-radius: var(--radius-m);
color: var(--text);
user-select: text;
cursor: text;
@@ -14,6 +14,10 @@
textarea.field-box {
line-height: 1.3;
}
+/* Like a macOS text field: a ring while it has focus. */
+.field-box:focus {
+ outline: 2px solid var(--secondary);
+}
.bot-form {
height: 100%;
@@ -31,12 +35,12 @@ textarea.field-box {
.avatar-button {
padding: 12px;
background: var(--bubble-agent);
- border-radius: 20px;
+ border-radius: var(--radius-xl);
display: flex;
}
.avatar-button.small {
padding: 5px;
- border-radius: 10px;
+ border-radius: var(--radius-s);
}
/* A selectable avatar shape or color, ringed when chosen. */
@@ -65,7 +69,7 @@ textarea.field-box {
gap: 6px;
padding: 5px 6px 5px 8px;
background: var(--bubble-agent);
- border-radius: 999px;
+ border-radius: var(--radius-pill);
flex: none;
animation: chip-in var(--layout) both;
}
@@ -90,7 +94,7 @@ textarea.field-box {
gap: 12px;
width: 100%;
padding: 8px 12px;
- border-radius: 12px;
+ border-radius: var(--radius-m);
transition: background-color var(--hover), transform var(--press);
}
.pick-row.hover:hover {
@@ -101,19 +105,19 @@ textarea.field-box {
min-height: 18px;
display: grid;
place-items: center;
- border-radius: 4px;
+ border-radius: var(--radius-xs);
background: var(--background);
color: var(--secondary);
font-family: var(--mono);
- font-size: calc(10px * var(--scale));
+ font-size: calc(11px * var(--scale));
}
.compose-list {
max-height: 460px;
overflow-y: auto;
background: var(--surface);
- border-radius: 18px;
- box-shadow: 0 6px 32px rgba(0, 0, 0, 0.08);
+ border-radius: var(--radius-l);
+ box-shadow: var(--shadow-m);
max-width: 620px;
margin: 10px 22px 0;
padding: 8px;
@@ -127,8 +131,8 @@ textarea.field-box {
margin: 16px;
padding: 6px 6px 6px 18px;
background: var(--bubble-user);
- border-radius: 24px;
- box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
+ border-radius: var(--radius-xl);
+ box-shadow: var(--shadow-s);
}
.compose-box textarea {
flex: 1;
@@ -157,15 +161,6 @@ textarea.field-box {
}
}
-.fade-in {
- animation: fade-in var(--fade) both;
-}
-@keyframes fade-in {
- from {
- opacity: 0;
- }
-}
-
/* Group editor (Grok Bot's group details): identity on top, then a plain member list. */
.group-form {
display: flex;
@@ -215,7 +210,7 @@ textarea.field-box {
min-height: 48px;
margin: 0 -8px;
padding: 4px 8px;
- border-radius: 12px;
+ border-radius: var(--radius-m);
text-align: left;
transition: background-color var(--hover), transform var(--press);
}
diff --git a/apps/desktop/src/renderer/views/bots/memory.css b/apps/desktop/src/renderer/views/bots/memory.css
index d1bcc892..69d17d25 100644
--- a/apps/desktop/src/renderer/views/bots/memory.css
+++ b/apps/desktop/src/renderer/views/bots/memory.css
@@ -3,7 +3,7 @@
.memory-layer-note { display: flex; align-items: flex-start; gap: 8px; }
.memory-layer-note > p { flex: 1; min-width: 0; }
.memory-header-actions { display: flex; align-items: center; gap: 2px; }
-.memory-menu { width: 28px; height: 28px; border-radius: 8px; }
+.memory-menu { width: 28px; height: 28px; border-radius: var(--radius-s); }
.memory-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; text-align: center; color: var(--secondary); line-height: 1.45; }
.memory-item { display: flex; align-items: flex-start; gap: 8px; }
.memory-item .memory-menu { margin: -4px -6px 0 0; }
@@ -13,10 +13,10 @@
.memory-content small, .memory-muted { color: var(--secondary); }
.memory-archived { color: var(--tertiary); }
.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: 8px; font: inherit; resize: vertical; }
+.memory-editor textarea { padding: 10px; background: var(--surface); color: var(--text); border: 0; border-radius: var(--radius-s); font: inherit; resize: vertical; }
.memory-history { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; user-select: text; margin: 0; }
-.memory-error { color: var(--danger, #df665e); white-space: pre-wrap; }
-.memory-notes-header { display: flex; align-items: center; justify-content: space-between; color: var(--secondary); font-size: 12px; font-weight: 600; }
+.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: calc(12px * var(--scale)); font-weight: 600; }
.memory-attention { color: var(--attention); }
.memory-file-sheet { display: flex; flex-direction: column; height: 100%; background: var(--background); }
-.memory-file-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; font: 12px/1.5 var(--mono, ui-monospace, monospace); }
+.memory-file-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; font: calc(12px * var(--scale))/1.5 var(--mono); }
diff --git a/apps/desktop/src/renderer/views/bots/parts.tsx b/apps/desktop/src/renderer/views/bots/parts.tsx
index 3dd9cc50..82e54a55 100644
--- a/apps/desktop/src/renderer/views/bots/parts.tsx
+++ b/apps/desktop/src/renderer/views/bots/parts.tsx
@@ -1,4 +1,4 @@
-import { useEffect, useLayoutEffect, useRef, useState, type ReactNode, type RefObject } from 'react'
+import { useEffect, useId, useLayoutEffect, useRef, useState, type ReactNode, type RefObject } from 'react'
import { createPortal } from 'react-dom'
import type { Bot } from '@shared/models'
import { BotAvatar } from '../../components/Avatar'
@@ -8,13 +8,14 @@ import { usePresence } from '../../components/Overlay'
import { font } from '../../lib/fonts'
import './bots.css'
-/** A labeled input inside a section row: label (and an optional note) over the field. */
+/** A labeled input inside a section row: label (and an optional note) over the field, which they name. */
export function Field({ label, detail, children }: { label: string; detail?: string | null; children: ReactNode }) {
+ const id = useId()
return (
- <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
+ <div role="group" aria-labelledby={`${id}-label`} aria-describedby={detail ? `${id}-detail` : undefined} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
- <span style={{ color: 'var(--text)' }}>{label}</span>
- {detail ? <span className="detail-note" title={detail} style={{ ...font('caption'), color: 'var(--secondary)', lineHeight: 1.35 }}>{detail}</span> : null}
+ <span id={`${id}-label`} style={{ color: 'var(--text)' }}>{label}</span>
+ {detail ? <span id={`${id}-detail`} className="detail-note" title={detail} style={{ ...font('caption'), color: 'var(--secondary)', lineHeight: 1.35 }}>{detail}</span> : null}
</div>
{children}
</div>
diff --git a/apps/desktop/src/renderer/views/call/call.css b/apps/desktop/src/renderer/views/call/call.css
index dd464e0c..f305b521 100644
--- a/apps/desktop/src/renderer/views/call/call.css
+++ b/apps/desktop/src/renderer/views/call/call.css
@@ -15,11 +15,11 @@
align-items: center;
gap: 10px;
padding: 10px 10px 10px 18px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--frosted);
backdrop-filter: blur(24px) saturate(1.8);
-webkit-backdrop-filter: blur(24px) saturate(1.8);
- box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
+ box-shadow: var(--shadow-l);
}
.call-avatar {
@@ -51,8 +51,8 @@
color: var(--on-accent);
}
.call-round.end {
- background: var(--danger);
- color: #fff;
+ background: var(--danger-fill);
+ color: var(--on-danger);
}
.call-round:active {
transform: scale(0.98);
@@ -60,20 +60,14 @@
/* One line under the bar: why the call fell back, or why it can't listen. */
.call-line {
- font-size: calc(10px * var(--scale));
+ font-size: calc(11px * var(--scale));
text-align: center;
padding: 8px 12px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--bubble-user);
- box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
- animation: call-line-in var(--fade) both;
+ box-shadow: var(--shadow-s);
+ animation: fade-in var(--fade) both;
}
-@keyframes call-line-in {
- from {
- opacity: 0;
- }
-}
-
@media (prefers-reduced-motion: reduce) {
.call-avatar.speaking {
animation: none;
diff --git a/apps/desktop/src/renderer/views/chat-window.css b/apps/desktop/src/renderer/views/chat-window.css
index d1ae602a..06ce5890 100644
--- a/apps/desktop/src/renderer/views/chat-window.css
+++ b/apps/desktop/src/renderer/views/chat-window.css
@@ -31,6 +31,9 @@
overflow: hidden;
transition: width var(--layout);
}
+.sidebar.resizing {
+ transition: none;
+}
.sidebar-header {
display: flex;
align-items: center;
@@ -51,12 +54,16 @@
outline: none;
position: relative;
}
+.roster:focus-visible {
+ outline: 2px solid var(--secondary);
+ outline-offset: -2px;
+}
.sidebar.compact .roster {
padding-top: 4px;
}
.roster-row {
width: 100%;
- border-radius: 12px;
+ border-radius: var(--radius-m);
display: flex;
transition: background-color var(--hover);
flex: none;
@@ -97,28 +104,12 @@
.rail-profile {
width: 44px;
height: 44px;
- border-radius: 12px;
+ border-radius: var(--radius-m);
display: grid;
place-items: center;
margin-top: 4px;
}
-.sidebar-divider {
- width: 1px;
- flex: none;
- background: var(--border);
- position: relative;
- z-index: 2;
-}
-.sidebar-divider::after {
- content: '';
- position: absolute;
- top: 0;
- bottom: 0;
- left: -4px;
- width: 9px;
- cursor: col-resize;
-}
.detail {
flex: 1;
@@ -163,16 +154,16 @@
position: absolute;
padding: 7px;
background: var(--panel);
- box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
+ box-shadow: var(--shadow-l);
animation: panel-in var(--fade) both;
}
.account-panel {
- border-radius: 18px;
+ border-radius: var(--radius-l);
transform-origin: bottom left;
}
.action-menu {
width: 260px;
- border-radius: 14px;
+ border-radius: var(--radius-l);
}
@keyframes panel-in {
from {
@@ -187,7 +178,7 @@
width: 100%;
height: 30px;
padding: 0 10px;
- border-radius: 10px;
+ border-radius: var(--radius-s);
}
.panel-row.highlight {
background: rgba(var(--text-rgb), 0.08);
diff --git a/apps/desktop/src/renderer/views/computer-access/computer-access.css b/apps/desktop/src/renderer/views/computer-access/computer-access.css
index e8cb5003..90868041 100644
--- a/apps/desktop/src/renderer/views/computer-access/computer-access.css
+++ b/apps/desktop/src/renderer/views/computer-access/computer-access.css
@@ -8,16 +8,16 @@
.computer-access-identity { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.computer-access-identity img { flex: none; }
.computer-access-identity div { display: grid; gap: 3px; min-width: 0; }
-.computer-access-identity span { color: var(--secondary); font-size: 11px; }
-.computer-access-identity strong { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
-.computer-access h1 { font-size: 26px; letter-spacing: -.65px; line-height: 1.2; font-weight: 600; margin: 0 0 10px; text-wrap: balance; }
-.computer-access p { color: var(--secondary); font-size: 12px; line-height: 1.6; margin: 0; text-wrap: pretty; }
-.computer-access-header > p { font-size: 13px; max-width: 480px; }
-.computer-access-section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 11px; color: var(--secondary); }
+.computer-access-identity span { color: var(--secondary); font-size: calc(11px * var(--scale)); }
+.computer-access-identity strong { font-size: calc(12px * var(--scale)); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.computer-access h1 { font-size: calc(26px * var(--scale)); letter-spacing: -.65px; line-height: 1.2; font-weight: 600; margin: 0 0 10px; text-wrap: balance; }
+.computer-access p { color: var(--secondary); font-size: calc(12px * var(--scale)); line-height: 1.6; margin: 0; text-wrap: pretty; }
+.computer-access-header > p { font-size: calc(13px * var(--scale)); max-width: 480px; }
+.computer-access-section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: calc(11px * var(--scale)); color: var(--secondary); }
.computer-access-section-label > :first-child { color: var(--text); font-weight: 500; }
.computer-access-section-label > :last-child { display: inline-flex; align-items: center; gap: 4px; margin-right: -4px; }
/* The requested outline matches the desktop toolbar/composer treatment; outlined, so no fill. */
-.computer-access-steps { border: 1px solid var(--composer-stroke); border-radius: 16px; overflow: hidden; }
+.computer-access-steps { border: 1px solid var(--stroke-strong); border-radius: var(--radius-l); overflow: hidden; }
.computer-access-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; }
.computer-access-row + .computer-access-row { border-top: 1px solid var(--border); }
/* The badge carries the state: a check when granted, the step's symbol otherwise. */
@@ -25,32 +25,32 @@
.computer-access-row.current .computer-access-badge { background: rgba(var(--text-rgb), .12); color: var(--text); }
.computer-access-row.granted .computer-access-badge { background: var(--accent-fill); color: var(--on-accent); }
.computer-access-row-body { flex: 1; min-width: 0; }
-.computer-access h2 { font-size: 13px; line-height: 28px; font-weight: 600; margin: 0; transition: color var(--fade); }
+.computer-access h2 { font-size: calc(13px * var(--scale)); line-height: 28px; font-weight: 600; margin: 0; transition: color var(--fade); }
/* A step that can't be acted on yet recedes. */
.computer-access-row.waiting:not(:has(button)) h2 { color: var(--secondary); }
.computer-access-row.waiting:not(:has(button)) p { color: var(--tertiary); }
.computer-access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.computer-access-actions:not(:empty) { margin-top: 12px; }
-.computer-access .styled-button { min-height: 30px; font-size: 11px; padding: 6px 12px; }
-.computer-access .styled-button.secondary { background: transparent; border: 1px solid var(--composer-stroke); }
+.computer-access .styled-button { min-height: 30px; font-size: calc(11px * var(--scale)); padding: 6px 12px; }
+.computer-access .styled-button.secondary { background: transparent; border: 1px solid var(--stroke-strong); }
.computer-access .styled-button.secondary:hover:not(:disabled) { background: var(--chrome-fill); }
.computer-access .styled-button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
-.computer-access .computer-access-inline-note { flex-basis: 100%; font-size: 11px; margin-bottom: 2px; }
+.computer-access .computer-access-inline-note { flex-basis: 100%; font-size: calc(11px * var(--scale)); margin-bottom: 2px; }
.computer-access-inline-note strong { font-weight: 500; color: var(--text); }
.computer-access-notes { display: grid; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; color: var(--tertiary); }
.computer-access-notes li { display: flex; align-items: flex-start; gap: 8px; }
.computer-access-notes li > :first-child { margin-top: 2px; flex: none; }
-.computer-access .computer-access-notes p { font-size: 11px; color: var(--tertiary); }
+.computer-access .computer-access-notes p { font-size: calc(11px * var(--scale)); color: var(--tertiary); }
.computer-access-footer { display: flex; justify-content: flex-end; margin-top: 24px; }
-.computer-access-notice { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--composer-stroke); border-radius: 12px; padding: 12px 14px; margin-bottom: 20px; }
+.computer-access-notice { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--stroke-strong); border-radius: var(--radius-m); padding: 12px 14px; margin-bottom: 20px; }
.computer-access-notice > :first-child { margin-top: 2px; color: var(--secondary); }
-.computer-access-notice strong { font-size: 12px; font-weight: 500; }
-.computer-access-notice p { font-size: 11px; margin-top: 3px; }
+.computer-access-notice strong { font-size: calc(12px * var(--scale)); font-weight: 500; }
+.computer-access-notice p { font-size: calc(11px * var(--scale)); margin-top: 3px; }
.computer-access-notice.error { border-color: var(--danger); }
.computer-access-notice.error strong, .computer-access-notice.error > :first-child { color: var(--danger); }
@media (max-width: 440px) {
.computer-access.onboarding { padding: 24px 16px; }
.computer-access-row { padding: 14px 12px; gap: 10px; }
- .computer-access h1 { font-size: 24px; }
+ .computer-access h1 { font-size: calc(24px * var(--scale)); }
}
@media (prefers-reduced-motion: reduce) { .computer-access { animation: none; } }
diff --git a/apps/desktop/src/renderer/views/computer-roster.css b/apps/desktop/src/renderer/views/computer-roster.css
index 14974443..e7c8e0f6 100644
--- a/apps/desktop/src/renderer/views/computer-roster.css
+++ b/apps/desktop/src/renderer/views/computer-roster.css
@@ -23,7 +23,7 @@
min-width: 0;
padding: 5px 4px;
color: var(--secondary);
- border-radius: 8px;
+ border-radius: var(--radius-s);
cursor: grab;
}
@@ -49,12 +49,12 @@
.computer-roster-label > span {
color: var(--tertiary);
- font-size: calc(10px * var(--scale));
+ font-size: calc(11px * var(--scale));
white-space: nowrap;
}
.computer-roster-label > .warning {
- color: var(--warning);
+ color: var(--attention);
}
.computer-roster-chevron {
diff --git a/apps/desktop/src/renderer/views/island/IslandWindow.tsx b/apps/desktop/src/renderer/views/island/IslandWindow.tsx
index 5348266c..08b0e3f5 100644
--- a/apps/desktop/src/renderer/views/island/IslandWindow.tsx
+++ b/apps/desktop/src/renderer/views/island/IslandWindow.tsx
@@ -8,6 +8,7 @@ import { useCrossFade } from './island-motion'
import { Approval, Empty, Message, Notice, Overview, Wings } from './IslandViews'
import { UsageMeter, UsageView } from './IslandUsage'
import './island.css'
+import './island-views.css'
/** How long the views stay on screen while the shape folds back into the notch (its 0.34 s close). */
const FOLD_MS = 340
diff --git a/apps/desktop/src/renderer/views/island/island-parts.tsx b/apps/desktop/src/renderer/views/island/island-parts.tsx
index b938fa80..78455b67 100644
--- a/apps/desktop/src/renderer/views/island/island-parts.tsx
+++ b/apps/desktop/src/renderer/views/island/island-parts.tsx
@@ -4,7 +4,7 @@ import { CharacterAvatar, type Mood } from '../../components/Avatar'
import { Icon } from '../../components/Icon'
import { ThinkingOrb } from '../../components/ThinkingOrb'
import { useArrivals, useFlip } from './island-motion'
-import { avatarColor, withAlpha } from '../../lib/theme'
+import { avatarColor, palette, withAlpha } from '../../lib/theme'
// Pieces the island's views share: the big character with its glow and
// badge, the agent row, the column of other bots and the key hint on a button.
@@ -12,7 +12,7 @@ import { avatarColor, withAlpha } from '../../lib/theme'
export type Badge = 'working' | 'needsInput' | 'finished' | 'failed' | null
/** State colors: amber needs you, green done, red failed (Codync's palette has no others). */
-export const AMBER = '#F0A030'
+export const AMBER = palette(true).warning
export const GREEN = '#34D399'
export const RED = '#F4505E'
diff --git a/apps/desktop/src/renderer/views/island/island-views.css b/apps/desktop/src/renderer/views/island/island-views.css
new file mode 100644
index 00000000..e7dae4b8
--- /dev/null
+++ b/apps/desktop/src/renderer/views/island/island-views.css
@@ -0,0 +1,429 @@
+/* The island's open views: the big character, overview, alerts, limits, the empty state,
+ messaging a bot and the fold countdown. The shape and its motion live in island.css. */
+
+/* The big character: glow behind, badge on its top left. */
+.island-big {
+ position: relative;
+ flex: none;
+ background: none;
+}
+.island-big canvas {
+ position: relative;
+}
+.island-glow {
+ position: absolute;
+ inset: -18px;
+ border-radius: 50%;
+}
+.island-badge {
+ position: absolute;
+ left: -5px;
+ top: 3px;
+ z-index: 1;
+ width: 18px;
+ height: 18px;
+ border-radius: 50%;
+ box-shadow: 0 0 0 2.5px var(--island-shape);
+ display: grid;
+ place-items: center;
+ color: var(--on-accent);
+}
+.island-badge.orb {
+ left: -7px;
+ top: 1px;
+ width: 22px;
+ height: 22px;
+ background: var(--island-shape);
+ box-shadow: 0 0 0 1.5px rgba(var(--text-rgb), 0.14);
+}
+.island-badge.dots {
+ left: -6px;
+ top: 4px;
+ width: auto;
+ height: 16px;
+ padding: 0 4px;
+ border-radius: 8px;
+ background: var(--text);
+ display: flex;
+ align-items: center;
+ gap: 2px;
+}
+.island-badge.dots i {
+ width: 3px;
+ height: 3px;
+ border-radius: 50%;
+ background: var(--on-accent);
+}
+.island-badge.small {
+ left: -4px;
+ top: -3px;
+ width: 9px;
+ height: 9px;
+ box-shadow: 0 0 0 1.5px var(--island-shape);
+}
+.island-badge.dots.small {
+ width: auto;
+ height: 7px;
+ padding: 0 2px;
+ gap: 1px;
+}
+.island-badge.dots.small i {
+ width: 1.5px;
+ height: 1.5px;
+}
+
+.island-agent {
+ display: flex;
+ align-items: center;
+ gap: 7px;
+ min-width: 0;
+ height: 26px;
+}
+.island-dot {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ flex: none;
+}
+.island-agent-name {
+ font-size: 14px;
+ font-weight: 600;
+ white-space: nowrap;
+}
+.island-agent-subtitle {
+ font-size: 13px;
+ color: var(--secondary);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ min-width: 0;
+}
+.island-ellipsis {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ min-width: 0;
+}
+
+/* Overview: the bot in focus and its steps, the others as pills. */
+.island-focus {
+ display: flex;
+ align-items: center;
+ gap: 13px;
+ padding: 0 14px 0 19px;
+ text-align: left;
+ font: inherit;
+}
+.island-focus-text {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+}
+.island-step {
+ height: 30px;
+ display: flex;
+ align-items: center;
+ gap: 9px;
+ font-size: 13px;
+ color: var(--tertiary);
+ min-width: 0;
+}
+.island-step.current {
+ font-size: 15px;
+ font-weight: 500;
+ color: var(--text);
+}
+.island-pills {
+ flex: 1;
+ min-width: 0;
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 8px;
+ align-content: center;
+ padding: 0 8px;
+}
+.island-pill {
+ height: 34px;
+ border-radius: 17px;
+ padding: 0 10px 0 5px;
+ display: flex;
+ align-items: center;
+ gap: 7px;
+ font: inherit;
+ font-size: 12px;
+ font-weight: 500;
+ min-width: 0;
+ transition: filter var(--hover);
+}
+.island-pill:hover {
+ filter: brightness(1.25);
+}
+.island-pill-bot,
+.island-mini {
+ position: relative;
+ flex: none;
+ background: none;
+}
+.island-status-dot {
+ position: absolute;
+ left: -1px;
+ top: -1px;
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ box-shadow: 0 0 0 1.5px var(--island-shape);
+}
+.island-cluster .island-status-dot {
+ width: 4px;
+ height: 4px;
+ left: -2px;
+ top: -2px;
+}
+
+/* Alerts: approval, done, failed. */
+.island-alert {
+ display: flex;
+ align-items: center;
+ gap: 24px;
+ padding: 0 20px 0 24px;
+}
+.island-alert-text {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 9px;
+}
+.island-alert .island-agent-name {
+ font-size: 15px;
+}
+.island-alert .island-agent-subtitle {
+ font-size: 14px;
+}
+.island-code {
+ align-self: flex-start;
+ max-width: 100%;
+ box-sizing: border-box;
+ padding: 8px 12px;
+ border-radius: 10px;
+ background: var(--island-raised);
+ font-family: var(--mono);
+ font-size: 13px;
+ color: var(--text);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.island-title {
+ font-size: 17px;
+ font-weight: 700;
+}
+.island-error {
+ font-size: 13px;
+ line-height: 1.4;
+ color: var(--danger);
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+.island-buttons {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ flex-wrap: wrap;
+}
+.island .styled-button {
+ height: 32px;
+ border-radius: 16px;
+ padding: 0 14px;
+ font-size: 13px;
+ font-weight: 500;
+ gap: 8px;
+}
+.island-key {
+ min-width: 16px;
+ height: 16px;
+ box-sizing: border-box;
+ padding: 0 3px;
+ border-radius: 5px;
+ border: 1.5px solid;
+ opacity: 0.55;
+ display: grid;
+ place-items: center;
+ font-size: 10px;
+}
+.island-minis {
+ width: 42px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 6px;
+ padding-top: 4px;
+}
+
+/* Codync's own: the plan limits. */
+.island-meter {
+ height: 30px;
+ padding: 0 6px;
+ border-radius: 15px;
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ background: transparent;
+ color: var(--secondary);
+ font-size: 12px;
+ font-variant-numeric: tabular-nums;
+ transition: background-color var(--hover), color var(--hover);
+}
+.island-meter:hover {
+ background: var(--island-fill);
+ color: var(--text);
+}
+.island-meter-bar {
+ width: 28px;
+ display: flex;
+}
+.island-usage {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ gap: 8px;
+ padding: 0 18px;
+}
+.island-usage-row {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ font-size: 12px;
+ white-space: nowrap;
+}
+.island-usage-title {
+ width: 56px;
+ flex: none;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.island-usage-value {
+ width: 34px;
+ flex: none;
+ text-align: right;
+ font-variant-numeric: tabular-nums;
+}
+.island-usage-reset {
+ width: 66px;
+ flex: none;
+ text-align: right;
+ color: var(--secondary);
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+/* Nothing running. */
+.island-empty {
+ display: flex;
+ align-items: center;
+ gap: 28px;
+ padding: 0 22px 0 29px;
+}
+.island-empty-text {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 5px;
+}
+.island-empty .island-title {
+ font-size: 16px;
+}
+.island-subtitle {
+ font-size: 13px;
+ line-height: 1.35;
+ color: var(--secondary);
+}
+
+/* Message a bot. */
+.island-message {
+ display: flex;
+ align-items: center;
+ gap: 22px;
+ padding: 0 18px 0 20px;
+}
+.island-message-body {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 9px;
+}
+.island-chip {
+ height: 26px;
+ border-radius: 13px;
+ padding: 0 9px 0 4px;
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ font: inherit;
+ font-size: 12px;
+ font-weight: 500;
+ flex: none;
+}
+.island-field {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ height: 40px;
+ border-radius: 20px;
+ background: var(--island-raised);
+ padding: 0 5px 0 16px;
+ margin: 0;
+}
+.island-field input {
+ flex: 1;
+ min-width: 0;
+ border: 0;
+ outline: none;
+ background: transparent;
+ color: var(--text);
+ font: inherit;
+ font-size: 14px;
+ user-select: text;
+}
+.island-field input::placeholder {
+ color: var(--island-quiet);
+}
+.island-send {
+ width: 30px;
+ height: 30px;
+ border-radius: 15px;
+ display: grid;
+ place-items: center;
+ background: var(--text);
+ color: var(--on-accent);
+}
+.island-send:disabled {
+ opacity: 0.35;
+}
+
+/* Folding soon: a line that runs out. */
+.island-countdown {
+ position: absolute;
+ bottom: 4px;
+ left: 50%;
+ transform: translateX(-50%);
+ height: 2px;
+ border-radius: 1px;
+ background: rgba(var(--text-rgb), 0.35);
+ animation: island-countdown linear forwards;
+}
+@keyframes island-countdown {
+ from {
+ width: 160px;
+ }
+ to {
+ width: 0;
+ }
+}
diff --git a/apps/desktop/src/renderer/views/island/island.css b/apps/desktop/src/renderer/views/island/island.css
index 4cf86fa4..d21a859d 100644
--- a/apps/desktop/src/renderer/views/island/island.css
+++ b/apps/desktop/src/renderer/views/island/island.css
@@ -18,6 +18,13 @@ html[data-window='island'] #root {
--island-card: #141518;
--bubble-agent: rgba(255, 255, 255, 0.12);
--warning: #f0a030;
+ --island-shape: #000000;
+ --island-raised: #22242a;
+ --island-fill: rgba(255, 255, 255, 0.08);
+ --island-quiet: #6b7079;
+ /* A spring with a little overshoot to open, a plain ease to fold. */
+ --island-spring: var(--island-spring);
+ --island-fold: var(--island-fold);
--scale: 1;
position: absolute;
top: 0;
@@ -25,11 +32,10 @@ html[data-window='island'] #root {
transform: translateX(-50%);
color: var(--text);
font-size: 13px;
- /* A spring with a little overshoot to open, none to close. */
- transition: width 0.52s cubic-bezier(0.32, 1.22, 0.42, 1), height 0.52s cubic-bezier(0.32, 1.22, 0.42, 1), opacity 0.2s var(--ease);
+ transition: width 0.52s var(--island-spring), height 0.52s var(--island-spring), opacity 0.2s var(--ease);
}
.island.shrinking {
- transition: width 0.34s cubic-bezier(0.45, 0, 0.2, 1), height 0.34s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.2s var(--ease);
+ transition: width 0.34s var(--island-fold), height 0.34s var(--island-fold), opacity 0.2s var(--ease);
}
/* Resting over the notch (or as a strip at a plain top edge): nothing to see. Folding into it,
the shape shrinks first and only then fades, so it visibly goes back into the notch. */
@@ -37,7 +43,7 @@ html[data-window='island'] #root {
opacity: 0;
}
.island.shrinking[data-mode='hidden'] {
- transition: width 0.34s cubic-bezier(0.45, 0, 0.2, 1), height 0.34s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.16s var(--ease) 0.3s;
+ transition: width 0.34s var(--island-fold), height 0.34s var(--island-fold), opacity 0.16s var(--ease) 0.3s;
}
/* The wings or the open views; leaving, they blur away while the shape folds. */
@@ -57,7 +63,7 @@ html[data-window='island'] #root {
position: absolute;
inset: 0;
overflow: hidden;
- background: #000;
+ background: var(--island-shape);
transition: border-radius 0.34s var(--ease);
}
@@ -70,11 +76,11 @@ html[data-window='island'] #root {
}
.island-ear.left {
left: -14px;
- background: radial-gradient(circle at 0 100%, transparent 13.5px, #000 14px);
+ background: radial-gradient(circle at 0 100%, transparent 13.5px, var(--island-shape) 14px);
}
.island-ear.right {
right: -14px;
- background: radial-gradient(circle at 100% 100%, transparent 13.5px, #000 14px);
+ background: radial-gradient(circle at 100% 100%, transparent 13.5px, var(--island-shape) 14px);
}
.island.edge .island-ear {
width: 10px;
@@ -82,11 +88,11 @@ html[data-window='island'] #root {
}
.island.edge .island-ear.left {
left: -10px;
- background: radial-gradient(circle at 0 100%, transparent 9.5px, #000 10px);
+ background: radial-gradient(circle at 0 100%, transparent 9.5px, var(--island-shape) 10px);
}
.island.edge .island-ear.right {
right: -10px;
- background: radial-gradient(circle at 100% 100%, transparent 9.5px, #000 10px);
+ background: radial-gradient(circle at 100% 100%, transparent 9.5px, var(--island-shape) 10px);
}
/* Bare buttons; :where keeps this below each element's own padding. */
@@ -122,7 +128,7 @@ html[data-window='island'] #root {
inset: 0;
display: grid;
place-items: center;
- font-size: 11.5px;
+ font-size: 12px;
color: var(--secondary);
}
.island-wing-avatar {
@@ -167,11 +173,11 @@ html[data-window='island'] #root {
transition: background-color var(--hover), color var(--hover);
}
.island-tab:hover {
- background: rgba(255, 255, 255, 0.08);
+ background: var(--island-fill);
color: var(--text);
}
.island-tab.selected {
- background: rgba(255, 255, 255, 0.12);
+ background: var(--bubble-agent);
color: var(--text);
}
.island-count {
@@ -182,7 +188,7 @@ html[data-window='island'] #root {
/* Another bot takes a slot (or joins a row): it springs in out of a blur. */
.island-swap {
- animation: island-swap 0.38s cubic-bezier(0.32, 1.22, 0.42, 1) both;
+ animation: island-swap 0.38s var(--island-spring) both;
}
@keyframes island-swap {
from {
@@ -260,433 +266,6 @@ html[data-window='island'] #root {
min-width: 0;
}
-/* The big character: glow behind, badge on its top left. */
-.island-big {
- position: relative;
- flex: none;
- background: none;
-}
-.island-big canvas {
- position: relative;
-}
-.island-glow {
- position: absolute;
- inset: -18px;
- border-radius: 50%;
-}
-.island-badge {
- position: absolute;
- left: -5px;
- top: 3px;
- z-index: 1;
- width: 18px;
- height: 18px;
- border-radius: 50%;
- box-shadow: 0 0 0 2.5px #000;
- display: grid;
- place-items: center;
- color: #0b0c0e;
-}
-.island-badge.orb {
- left: -7px;
- top: 1px;
- width: 22px;
- height: 22px;
- background: #000;
- box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.14);
-}
-.island-badge.dots {
- left: -6px;
- top: 4px;
- width: auto;
- height: 16px;
- padding: 0 4px;
- border-radius: 8px;
- background: #f5f6f8;
- display: flex;
- align-items: center;
- gap: 2px;
-}
-.island-badge.dots i {
- width: 3px;
- height: 3px;
- border-radius: 50%;
- background: #0b0c0e;
-}
-.island-badge.small {
- left: -4px;
- top: -3px;
- width: 9px;
- height: 9px;
- box-shadow: 0 0 0 1.5px #000;
-}
-.island-badge.dots.small {
- width: auto;
- height: 7px;
- padding: 0 2px;
- gap: 1px;
-}
-.island-badge.dots.small i {
- width: 1.5px;
- height: 1.5px;
-}
-
-.island-agent {
- display: flex;
- align-items: center;
- gap: 7px;
- min-width: 0;
- height: 26px;
-}
-.island-dot {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- flex: none;
-}
-.island-agent-name {
- font-size: 14px;
- font-weight: 600;
- white-space: nowrap;
-}
-.island-agent-subtitle {
- font-size: 13px;
- color: var(--secondary);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- min-width: 0;
-}
-.island-ellipsis {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- min-width: 0;
-}
-
-/* Overview: the bot in focus and its steps, the others as pills. */
-.island-focus {
- display: flex;
- align-items: center;
- gap: 13px;
- padding: 0 14px 0 19px;
- text-align: left;
- font: inherit;
-}
-.island-focus-text {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
-}
-.island-step {
- height: 30px;
- display: flex;
- align-items: center;
- gap: 9px;
- font-size: 13px;
- color: var(--tertiary);
- min-width: 0;
-}
-.island-step.current {
- font-size: 15px;
- font-weight: 500;
- color: #e8eaed;
-}
-.island-pills {
- flex: 1;
- min-width: 0;
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 8px;
- align-content: center;
- padding: 0 8px;
-}
-.island-pill {
- height: 34px;
- border-radius: 17px;
- padding: 0 10px 0 5px;
- display: flex;
- align-items: center;
- gap: 7px;
- font: inherit;
- font-size: 12.5px;
- font-weight: 500;
- min-width: 0;
- transition: filter var(--hover);
-}
-.island-pill:hover {
- filter: brightness(1.25);
-}
-.island-pill-bot,
-.island-mini {
- position: relative;
- flex: none;
- background: none;
-}
-.island-status-dot {
- position: absolute;
- left: -1px;
- top: -1px;
- width: 6px;
- height: 6px;
- border-radius: 50%;
- box-shadow: 0 0 0 1.5px #000;
-}
-.island-cluster .island-status-dot {
- width: 4px;
- height: 4px;
- left: -2px;
- top: -2px;
-}
-
-/* Alerts: approval, done, failed. */
-.island-alert {
- display: flex;
- align-items: center;
- gap: 24px;
- padding: 0 20px 0 24px;
-}
-.island-alert-text {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- gap: 9px;
-}
-.island-alert .island-agent-name {
- font-size: 15px;
-}
-.island-alert .island-agent-subtitle {
- font-size: 14px;
-}
-.island-code {
- align-self: flex-start;
- max-width: 100%;
- box-sizing: border-box;
- padding: 8px 12px;
- border-radius: 10px;
- background: #22242a;
- font-family: var(--mono);
- font-size: 13.5px;
- color: #e8eaed;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.island-title {
- font-size: 17px;
- font-weight: 700;
-}
-.island-error {
- font-size: 13.5px;
- line-height: 1.4;
- color: var(--danger);
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
-}
-.island-buttons {
- display: flex;
- align-items: center;
- gap: 8px;
- flex-wrap: wrap;
-}
-.island .styled-button {
- height: 32px;
- border-radius: 16px;
- padding: 0 14px;
- font-size: 13px;
- font-weight: 500;
- gap: 8px;
-}
-.island-key {
- min-width: 16px;
- height: 16px;
- box-sizing: border-box;
- padding: 0 3px;
- border-radius: 5px;
- border: 1.5px solid;
- opacity: 0.55;
- display: grid;
- place-items: center;
- font-size: 10px;
-}
-.island-minis {
- width: 42px;
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 6px;
- padding-top: 4px;
-}
-
-/* Codync's own: the plan limits. */
-.island-meter {
- height: 30px;
- padding: 0 6px;
- border-radius: 15px;
- display: flex;
- align-items: center;
- gap: 6px;
- background: transparent;
- color: var(--secondary);
- font-size: 12px;
- font-variant-numeric: tabular-nums;
- transition: background-color var(--hover), color var(--hover);
-}
-.island-meter:hover {
- background: rgba(255, 255, 255, 0.08);
- color: var(--text);
-}
-.island-meter-bar {
- width: 28px;
- display: flex;
-}
-.island-usage {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- justify-content: center;
- gap: 8px;
- padding: 0 18px;
-}
-.island-usage-row {
- display: flex;
- align-items: center;
- gap: 10px;
- font-size: 12.5px;
- white-space: nowrap;
-}
-.island-usage-title {
- width: 56px;
- flex: none;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.island-usage-value {
- width: 34px;
- flex: none;
- text-align: right;
- font-variant-numeric: tabular-nums;
-}
-.island-usage-reset {
- width: 66px;
- flex: none;
- text-align: right;
- color: var(--secondary);
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-/* Nothing running. */
-.island-empty {
- display: flex;
- align-items: center;
- gap: 28px;
- padding: 0 22px 0 29px;
-}
-.island-empty-text {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- gap: 5px;
-}
-.island-empty .island-title {
- font-size: 16px;
-}
-.island-subtitle {
- font-size: 13.5px;
- line-height: 1.35;
- color: var(--secondary);
-}
-
-/* Message a bot. */
-.island-message {
- display: flex;
- align-items: center;
- gap: 22px;
- padding: 0 18px 0 20px;
-}
-.island-message-body {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- gap: 9px;
-}
-.island-chip {
- height: 26px;
- border-radius: 13px;
- padding: 0 9px 0 4px;
- display: flex;
- align-items: center;
- gap: 6px;
- font: inherit;
- font-size: 12.5px;
- font-weight: 500;
- flex: none;
-}
-.island-field {
- display: flex;
- align-items: center;
- gap: 8px;
- height: 40px;
- border-radius: 20px;
- background: #22242a;
- padding: 0 5px 0 16px;
- margin: 0;
-}
-.island-field input {
- flex: 1;
- min-width: 0;
- border: 0;
- outline: none;
- background: transparent;
- color: var(--text);
- font: inherit;
- font-size: 14px;
- user-select: text;
-}
-.island-field input::placeholder {
- color: #6b7079;
-}
-.island-send {
- width: 30px;
- height: 30px;
- border-radius: 15px;
- display: grid;
- place-items: center;
- background: #f5f6f8;
- color: #0b0c0e;
-}
-.island-send:disabled {
- opacity: 0.35;
-}
-
-/* Folding soon: a line that runs out. */
-.island-countdown {
- position: absolute;
- bottom: 4px;
- left: 50%;
- transform: translateX(-50%);
- height: 2px;
- border-radius: 1px;
- background: rgba(255, 255, 255, 0.35);
- animation: island-countdown linear forwards;
-}
-@keyframes island-countdown {
- from {
- width: 160px;
- }
- to {
- width: 0;
- }
-}
-
@media (prefers-reduced-motion: reduce) {
.island,
.island.shrinking,
diff --git a/apps/desktop/src/renderer/views/marketplace/credentials.css b/apps/desktop/src/renderer/views/marketplace/credentials.css
index b99effa9..51d42b5a 100644
--- a/apps/desktop/src/renderer/views/marketplace/credentials.css
+++ b/apps/desktop/src/renderer/views/marketplace/credentials.css
@@ -26,7 +26,7 @@
gap: 12px;
padding: 14px 16px;
background: var(--surface);
- border-radius: 12px;
+ border-radius: var(--radius-m);
}
.credential-storage strong { font-weight: 500; }
.credential-storage p { margin: 4px 0 0; color: var(--secondary); font-size: calc(11px * var(--scale)); }
@@ -36,12 +36,12 @@
min-height: 36px;
padding: 9px 12px;
background: var(--surface);
- border-radius: 9px;
+ 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; }
-.credentials-page .plain-row-button { min-height: 38px; padding: 8px 10px; border-radius: 8px; }
+.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); }
@media (max-width: 600px) {
.credentials-page .card-form-content { padding: 16px; }
diff --git a/apps/desktop/src/renderer/views/marketplace/marketplace.css b/apps/desktop/src/renderer/views/marketplace/marketplace.css
index 570e4451..b34e36c7 100644
--- a/apps/desktop/src/renderer/views/marketplace/marketplace.css
+++ b/apps/desktop/src/renderer/views/marketplace/marketplace.css
@@ -53,7 +53,7 @@
padding: 0 14px;
height: 38px;
background: var(--bubble-agent);
- border-radius: 12px;
+ border-radius: var(--radius-m);
}
.market-search input {
flex: 1;
@@ -84,7 +84,7 @@
align-items: center;
gap: 12px;
padding: 12px 14px;
- border-radius: 12px;
+ border-radius: var(--radius-m);
background: var(--bubble-agent);
}
@@ -95,7 +95,7 @@
text-align: left;
gap: 12px;
padding: 10px 12px;
- border-radius: 12px;
+ border-radius: var(--radius-m);
min-width: 0;
background: transparent;
transition: background-color var(--hover), transform var(--press);
@@ -112,7 +112,7 @@
align-items: center;
gap: 14px;
padding: 10px 12px;
- border-radius: 16px;
+ border-radius: var(--radius-l);
min-width: 0;
transition: background-color var(--hover);
}
@@ -126,7 +126,7 @@
color: var(--text);
padding: 7px 16px;
background: var(--bubble-agent);
- border-radius: 999px;
+ border-radius: var(--radius-pill);
white-space: nowrap;
flex: none;
transition: transform var(--press), opacity var(--press);
@@ -182,7 +182,7 @@ textarea.market-field {
/* A chat request card has no fill, so each of its fields gets one (fill, no border). */
.request-card .market-field {
padding: 7px 12px;
- border-radius: 10px;
+ border-radius: var(--radius-s);
background: var(--bubble-agent);
box-sizing: border-box;
}
@@ -199,15 +199,6 @@ textarea.market-field {
background: transparent !important;
}
-.fade-in {
- animation: market-fade-in var(--fade) both;
-}
-@keyframes market-fade-in {
- from {
- opacity: 0;
- }
-}
-
.market-heading { display: flex; align-items: center; gap: 12px; padding-right: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
.market-page-content { padding: 28px 18px; }
diff --git a/apps/desktop/src/renderer/views/routines/RoutineEditorView.tsx b/apps/desktop/src/renderer/views/routines/RoutineEditorView.tsx
index 9bb211de..7bc2c047 100644
--- a/apps/desktop/src/renderer/views/routines/RoutineEditorView.tsx
+++ b/apps/desktop/src/renderer/views/routines/RoutineEditorView.tsx
@@ -5,7 +5,8 @@ import { Dialog, ModalHeader } from '../../components/Overlay'
import { font } from '../../lib/fonts'
import { useStore } from '../../store/context'
import { emptyDraft, errorText, sameDraft, type Routine, type RoutineScheduleDraft, type RoutineSchedulePreview } from './routine'
-import { Field, RoutineWebhookPanel } from './RoutineWebhookPanel'
+import { Field } from '../bots/parts'
+import { RoutineWebhookPanel } from './RoutineWebhookPanel'
import './routines.css'
const caption = { ...font('caption'), paddingLeft: 4, lineHeight: 1.4 } as const
diff --git a/apps/desktop/src/renderer/views/routines/RoutineWebhookPanel.tsx b/apps/desktop/src/renderer/views/routines/RoutineWebhookPanel.tsx
index b8d0e842..06b3efaa 100644
--- a/apps/desktop/src/renderer/views/routines/RoutineWebhookPanel.tsx
+++ b/apps/desktop/src/renderer/views/routines/RoutineWebhookPanel.tsx
@@ -3,21 +3,9 @@ import { IconButton } from '../../components/Controls'
import { Dialog } from '../../components/Overlay'
import { font } from '../../lib/fonts'
import { useStore } from '../../store/context'
+import { Field } from '../bots/parts'
import { errorText, type RoutineWebhook } from './routine'
-/** A labelled form field (kit's `Field`): the label, an optional detail, then the control. */
-export function Field({ label, detail, children }: { label: string; detail?: string; children: ReactNode }) {
- return (
- <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
- <div style={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
- <span style={{ color: 'var(--text)' }}>{label}</span>
- {detail ? <span style={{ ...font('caption'), color: 'var(--secondary)', lineHeight: 1.4 }}>{detail}</span> : null}
- </div>
- {children}
- </div>
- )
-}
-
/** A saved webhook routine's address and key: copy either, reveal or replace the key. */
export function RoutineWebhookPanel({ botId, routineId }: { botId: string; routineId: string }) {
const store = useStore()
diff --git a/apps/desktop/src/renderer/views/routines/routines.css b/apps/desktop/src/renderer/views/routines/routines.css
index 190f2fd4..1b120b04 100644
--- a/apps/desktop/src/renderer/views/routines/routines.css
+++ b/apps/desktop/src/renderer/views/routines/routines.css
@@ -4,13 +4,16 @@
padding: 12px;
border: none;
outline: none;
- border-radius: 12px;
+ border-radius: var(--radius-m);
background: var(--bubble-user);
color: var(--text);
font: inherit;
user-select: text;
resize: none;
}
+.routine-input:focus {
+ outline: 2px solid var(--secondary);
+}
.routine-input::placeholder {
color: var(--secondary);
}
@@ -71,10 +74,5 @@ textarea.routine-input {
}
.routine-fade {
- animation: routine-fade var(--hover) both;
-}
-@keyframes routine-fade {
- from {
- opacity: 0;
- }
+ animation: fade-in var(--hover) both;
}
diff --git a/apps/desktop/src/renderer/views/search-palette.css b/apps/desktop/src/renderer/views/search-palette.css
index 21b94739..3aa8d9e3 100644
--- a/apps/desktop/src/renderer/views/search-palette.css
+++ b/apps/desktop/src/renderer/views/search-palette.css
@@ -34,7 +34,7 @@
width: 100%;
min-height: 56px;
padding: 8px 12px;
- border-radius: 12px;
+ border-radius: var(--radius-m);
text-align: left;
transition: background-color var(--hover);
}
@@ -52,7 +52,7 @@
font-size: calc(12px * var(--scale));
padding: 0 6px;
height: 22px;
- border-radius: 6px;
+ border-radius: var(--radius-xs);
}
.palette-empty {
padding: 28px 0;
diff --git a/apps/desktop/src/renderer/views/settings/ComputersView.tsx b/apps/desktop/src/renderer/views/settings/ComputersView.tsx
index b8d44232..f46463a6 100644
--- a/apps/desktop/src/renderer/views/settings/ComputersView.tsx
+++ b/apps/desktop/src/renderer/views/settings/ComputersView.tsx
@@ -72,7 +72,7 @@ export function ComputersView() {
<ComputerBadge computer={store.computer} size={22} />
<div className="settings-stack">
<span style={font('callout', 'medium')}>{store.hostName}</span>
- <span style={{ ...font('caption'), color: stale ? 'var(--warning)' : 'var(--secondary)' }}>
+ <span style={{ ...font('caption'), color: stale ? 'var(--attention)' : 'var(--secondary)' }}>
{stale ? `Older copy of this computer · ${statusText(store)}` : statusText(store)}
</span>
</div>
@@ -209,7 +209,7 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
<Switch key="cloud" on={cloud?.enabled ?? false} disabled={busy || !online} onChange={(on) => run(() => app.cloud.setCloud(store, on))}>
<span className="settings-stack">
<span>Reach from anywhere</span>
- <span style={{ ...font('caption'), color: cloud?.lastError ? 'var(--warning)' : 'var(--secondary)' }}>{cloudLine}</span>
+ <span style={{ ...font('caption'), color: cloud?.lastError ? 'var(--attention)' : 'var(--secondary)' }}>{cloudLine}</span>
</span>
</Switch>,
accountLine,
@@ -223,7 +223,7 @@ function ManagedComputerCard({ store, ssh: overSSH }: { store: BotStore; ssh: bo
>
<span className="settings-stack settings-appear">
<span>Skip the 6-digit check</span>
- <span style={{ ...font('caption'), color: autoApproval ? 'var(--warning)' : 'var(--secondary)' }}>
+ <span style={{ ...font('caption'), color: autoApproval ? 'var(--attention)' : 'var(--secondary)' }}>
{autoApproval ? 'Devices on your account get in on their own.' : 'Each new device shows a code you approve here.'}
</span>
</span>
@@ -353,7 +353,7 @@ function PairingPanel({ store }: { store: BotStore }) {
Scan with the Codync app or the iPhone Camera. No Tailscale or open ports needed: your iPhone connects directly on the same Wi-Fi, and through the encrypted relay anywhere else.
</div>
{store.cloud?.enabled !== true ? (
- <div style={{ ...caption, color: 'var(--warning)' }}>
+ <div style={{ ...caption, color: 'var(--attention)' }}>
{info.urls.length === 0
? 'No network address found and “Reach from anywhere” is off. Connect to Wi-Fi or turn it on.'
: `“Reach from anywhere” is off, so the iPhone only reaches ${name} on the same network.`}
diff --git a/apps/desktop/src/renderer/views/settings/SSHRow.tsx b/apps/desktop/src/renderer/views/settings/SSHRow.tsx
index cc023d92..bdcbd808 100644
--- a/apps/desktop/src/renderer/views/settings/SSHRow.tsx
+++ b/apps/desktop/src/renderer/views/settings/SSHRow.tsx
@@ -37,7 +37,7 @@ export function SSHRow({ profile, status, edit, attached = true }: { profile: SS
</span>
<div className="settings-stack" style={{ flex: 1 }}>
<span style={font('callout', 'medium')}>{profile.name || profile.host}</span>
- <span style={{ ...font('caption'), color: problem ? 'var(--warning)' : 'var(--secondary)' }}>{line}</span>
+ <span style={{ ...font('caption'), color: problem ? 'var(--attention)' : 'var(--secondary)' }}>{line}</span>
</div>
{active ? (
<IconButton title="Disconnect" icon="stop.circle" onClick={() => bridge.disconnect(profile.id)} />
diff --git a/apps/desktop/src/renderer/views/settings/SettingsView.tsx b/apps/desktop/src/renderer/views/settings/SettingsView.tsx
index c7daa067..783cb131 100644
--- a/apps/desktop/src/renderer/views/settings/SettingsView.tsx
+++ b/apps/desktop/src/renderer/views/settings/SettingsView.tsx
@@ -44,7 +44,7 @@ export function SettingsView({ page: initial }: { page: SettingsPage }) {
<div key={group} style={{ display: 'contents' }}>
<div className="settings-group" style={{ paddingTop: group === 'Personal' ? 0 : 16 }}>{group}</div>
{pages.filter((p) => p.group === group).map((item) => (
- <button key={item.id} className={`settings-item ${item.id === page ? 'selected' : ''}`} aria-selected={item.id === page} onClick={() => setPage(item.id)}>
+ <button key={item.id} className={`settings-item ${item.id === page ? 'selected' : ''}`} aria-current={item.id === page ? 'page' : undefined} onClick={() => setPage(item.id)}>
<span style={{ width: 18, display: 'flex', justifyContent: 'center', color: 'var(--secondary)' }}>
<Icon name={item.icon} size={13} />
</span>
@@ -256,7 +256,7 @@ function UpdateSettings() {
...(updates.error
? [
<div key="error" className="settings-row settings-appear">
- <span style={{ flex: 1, color: 'var(--warning)' }}>{updates.error}</span>
+ <span style={{ flex: 1, color: 'var(--attention)' }}>{updates.error}</span>
<Button kind="secondary" onClick={() => window.codync.updates.check()} disabled={updates.checking}>
Retry
</Button>
diff --git a/apps/desktop/src/renderer/views/settings/UsageLimits.tsx b/apps/desktop/src/renderer/views/settings/UsageLimits.tsx
index a9c4ed2a..f1156285 100644
--- a/apps/desktop/src/renderer/views/settings/UsageLimits.tsx
+++ b/apps/desktop/src/renderer/views/settings/UsageLimits.tsx
@@ -1,4 +1,5 @@
import type { Usage } from '@shared/models'
+import { ProgressBar } from '../../components/Controls'
import { font } from '../../lib/fonts'
import { prefs, usePref } from '../../lib/prefs'
import { ProviderMascot } from '../usage/ProviderMascot'
@@ -33,8 +34,11 @@ export function UsageLimits({ usage }: { usage: Usage }) {
export function UsageBar({ percent, tint }: { percent: number; tint: string }) {
const fill = percent >= 90 ? 'var(--danger)' : percent >= 70 ? 'var(--warning)' : tint
return (
- <span style={{ flex: 1, minWidth: 0, height: 6, borderRadius: 3, background: 'var(--bubble-agent)', overflow: 'hidden' }}>
- <span style={{ display: 'block', height: '100%', borderRadius: 3, background: fill, width: `${Math.min(1, Math.max(0.02, percent / 100)) * 100}%`, transition: 'width var(--layout)' }} />
- </span>
+ <ProgressBar
+ value={Math.min(1, Math.max(0.02, percent / 100))}
+ label={`${Math.round(percent)}% used`}
+ fill={fill}
+ style={{ flex: 1, minWidth: 0, height: 6, background: 'var(--bubble-agent)' }}
+ />
)
}
diff --git a/apps/desktop/src/renderer/views/settings/settings.css b/apps/desktop/src/renderer/views/settings/settings.css
index 34bef5e4..bc1f6ff9 100644
--- a/apps/desktop/src/renderer/views/settings/settings.css
+++ b/apps/desktop/src/renderer/views/settings/settings.css
@@ -25,7 +25,7 @@
gap: 10px;
height: 32px;
padding: 0 10px;
- border-radius: 10px;
+ border-radius: var(--radius-s);
font-size: calc(13px * var(--scale));
color: var(--text);
transition: background-color var(--hover);
@@ -48,25 +48,19 @@
flex: 1;
min-height: 0;
padding: 0 18px;
- animation: settings-fade var(--fade) both;
+ animation: fade-in var(--fade) both;
}
.settings-close {
position: absolute;
top: 14px;
right: 14px;
}
-@keyframes settings-fade {
- from {
- opacity: 0;
- }
-}
-
/* One filled group, like a CardSection's. */
.settings-card {
padding: 16px;
width: 100%;
background: var(--surface);
- border-radius: 16px;
+ border-radius: var(--radius-l);
margin-bottom: 8px;
display: flex;
flex-direction: column;
@@ -97,17 +91,17 @@
}
.settings-code {
font-family: var(--mono);
- font-size: calc(10px * var(--scale));
+ font-size: calc(11px * var(--scale));
padding: 6px;
flex: 1;
min-width: 0;
background: var(--code-background);
- border-radius: 6px;
+ border-radius: var(--radius-xs);
}
/* A row that appears fades in. */
.settings-appear {
- animation: settings-fade var(--layout) both;
+ animation: fade-in var(--layout) both;
}
/* Show/hide: fade with a short drop from the top (`.opacity.combined(with: .move(edge: .top))`). */
diff --git a/apps/desktop/src/renderer/views/sidebar-footer.css b/apps/desktop/src/renderer/views/sidebar-footer.css
index bbb56738..dc25aa43 100644
--- a/apps/desktop/src/renderer/views/sidebar-footer.css
+++ b/apps/desktop/src/renderer/views/sidebar-footer.css
@@ -57,7 +57,7 @@
flex: 1;
min-width: 0;
height: 34px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
padding: 0 12px;
display: flex;
align-items: center;
@@ -66,11 +66,10 @@
white-space: nowrap;
font-size: calc(13px * var(--scale));
font-weight: 500;
- background: var(--chrome-fill);
border: 1px solid var(--chrome-stroke);
transition: background-color var(--hover), transform var(--hover);
}
-.extensions:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface)); }
+.extensions:hover { background: rgba(var(--text-rgb), 0.05); }
.extensions:active,
.sidebar-account:active { transform: scale(.97); }
.extensions-logos { display: flex; flex: none; }
diff --git a/apps/desktop/src/renderer/views/sidebar-header.css b/apps/desktop/src/renderer/views/sidebar-header.css
index e2dd1f3e..be8a56cc 100644
--- a/apps/desktop/src/renderer/views/sidebar-header.css
+++ b/apps/desktop/src/renderer/views/sidebar-header.css
@@ -37,11 +37,10 @@
.sidebar-header .sidebar-header-action {
border-radius: 50% !important;
border: 1px solid var(--chrome-stroke);
- background: var(--chrome-fill);
color: var(--text);
}
.sidebar-header .sidebar-header-action:hover {
- background: color-mix(in srgb, var(--text) 5%, var(--chrome-fill));
+ background: rgba(var(--text-rgb), 0.05);
}
@media (prefers-reduced-transparency: reduce) {
.sidebar:not(.compact) .sidebar-header::before { backdrop-filter: none; }
@@ -53,10 +52,9 @@
justify-content: center;
flex: none;
border: 1px solid var(--chrome-stroke);
- border-radius: 999px;
- background: var(--chrome-fill);
+ border-radius: var(--radius-pill);
transition: background-color var(--hover);
}
.computer-filter-action:hover {
- background: color-mix(in srgb, var(--text) 5%, var(--chrome-fill));
+ background: rgba(var(--text-rgb), 0.05);
}
diff --git a/apps/desktop/src/renderer/views/startup-recovery.css b/apps/desktop/src/renderer/views/startup-recovery.css
index 52849485..671459e5 100644
--- a/apps/desktop/src/renderer/views/startup-recovery.css
+++ b/apps/desktop/src/renderer/views/startup-recovery.css
@@ -29,6 +29,6 @@
align-items: flex-start;
padding: 18px;
margin-top: 12px;
- border-radius: 14px;
+ border-radius: var(--radius-l);
background: var(--surface);
}
diff --git a/apps/desktop/src/renderer/views/thread/ChatRows.tsx b/apps/desktop/src/renderer/views/thread/ChatRows.tsx
index 269a9e29..e2a3e8de 100644
--- a/apps/desktop/src/renderer/views/thread/ChatRows.tsx
+++ b/apps/desktop/src/renderer/views/thread/ChatRows.tsx
@@ -2,7 +2,7 @@ import { FileDownloadCard } from './FileDownloadCard'
import { memo, useEffect, useRef, useState } from 'react'
import { isGroup, isWorking, needsInput, type Bot, type Entry, type ThreadSummary } from '@shared/models'
import { BotAvatar } from '../../components/Avatar'
-import { IconButton } from '../../components/Controls'
+import { Hairline, IconButton } from '../../components/Controls'
import { Icon } from '../../components/Icon'
import { AnchoredMenu, useContextMenu, type MenuItem, type ReactionPick } from '../../components/Overlay'
import { ThinkingOrb } from '../../components/ThinkingOrb'
@@ -180,20 +180,16 @@ function UserStatus({ entry, botWorking, hovering }: { entry: Entry; botWorking:
return <span style={caption}>{botWorking ? 'Queued until this response finishes' : 'Queued'}</span>
case 'failed':
return (
- <span style={{ display: 'flex', alignItems: 'center', gap: 10, ...font('caption2', 'semibold') }}>
- <span style={{ color: 'var(--danger)' }}>Failed to send</span>
- <button title="Resend" aria-label="Resend" style={{ display: 'flex' }} onClick={() => store.retry(entry)}>
- <Icon name="arrow.clockwise" size={10} weight="semibold" />
- </button>
- <button title="Delete" aria-label="Delete" style={{ display: 'flex' }} onClick={() => store.discard(entry)}>
- <Icon name="trash" size={10} weight="semibold" />
- </button>
+ <span style={{ display: 'flex', alignItems: 'center', gap: 2, ...font('caption2', 'semibold') }}>
+ <span style={{ color: 'var(--danger)', marginRight: 4 }}>Failed to send</span>
+ <IconButton title="Resend" icon="arrow.clockwise" size={24} onClick={() => store.retry(entry)} />
+ <IconButton title="Delete" icon="trash" size={24} onClick={() => store.discard(entry)} />
</span>
)
case 'cancelled':
return <span style={caption}>Not sent — stopped</span>
default:
- return <span style={{ ...font(10), color: 'var(--tertiary)', opacity: hovering ? 1 : 0, transition: 'opacity var(--hover)' }}>{relativeTime.time(entry.createdAt)}</span>
+ return <span style={{ ...font(11), color: 'var(--tertiary)', opacity: hovering ? 1 : 0, transition: 'opacity var(--hover)' }}>{relativeTime.time(entry.createdAt)}</span>
}
}
@@ -236,9 +232,9 @@ export function NoticeRow({ entry }: { entry: Entry }) {
case 'divider':
return (
<div style={{ display: 'flex', alignItems: 'center', gap: 10, padding: '6px 0' }}>
- <div style={{ flex: 1, height: 1, background: 'var(--border)' }} />
+ <Hairline style={{ flex: 1 }} />
<span style={{ ...font('caption2'), color: 'var(--tertiary)', textAlign: 'center', maxWidth: 260 }}>{text}</span>
- <div style={{ flex: 1, height: 1, background: 'var(--border)' }} />
+ <Hairline style={{ flex: 1 }} />
</div>
)
case 'error':
@@ -265,7 +261,7 @@ export function WorkingIndicator({ bot, thinking }: { bot: Bot; thinking: string
<button className="working" disabled={!thinking} onClick={() => setExpanded((e) => !e)} aria-expanded={thinking ? expanded : undefined}>
<span style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
<ThinkingOrb state={waiting ? 'listening' : 'working'} size={16} color={waiting ? 'var(--warning)' : 'var(--secondary)'} />
- <span style={{ ...font('subheadline'), color: waiting ? 'var(--warning)' : 'var(--secondary)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{bot.activity || 'Working…'}</span>
+ <span style={{ ...font('subheadline'), color: waiting ? 'var(--attention)' : 'var(--secondary)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{bot.activity || 'Working…'}</span>
{bot.startedAt ? <Timer since={bot.startedAt} /> : null}
{thinking ? (
<span style={{ display: 'flex', transform: `rotate(${expanded ? 180 : 0}deg)`, transition: 'transform var(--layout)' }}>
diff --git a/apps/desktop/src/renderer/views/thread/ChatSidePanel.tsx b/apps/desktop/src/renderer/views/thread/ChatSidePanel.tsx
index f404ae0f..14a219af 100644
--- a/apps/desktop/src/renderer/views/thread/ChatSidePanel.tsx
+++ b/apps/desktop/src/renderer/views/thread/ChatSidePanel.tsx
@@ -1,33 +1,27 @@
import { useRef, useState, type ReactNode } from 'react'
+import { ResizeHandle } from '../../components/Controls'
import { usePresence } from '../../components/Overlay'
-/** Animate the available conversation width on both opening and closing; the border drags the width. */
-export function ChatSidePanel({ open, width, onResize, children }: { open: boolean; width: number; onResize: (width: number) => void; children: ReactNode }) {
+/** Animate the available conversation width on both opening and closing; its edge drags the width. */
+export function ChatSidePanel({ open, width, min, max, onResize, children }: {
+ open: boolean
+ width: number
+ min: number
+ max: number
+ onResize: (width: number) => void
+ children: ReactNode
+}) {
// Animate explicit open/close actions without animating the initial mount.
const { mounted, shown } = usePresence(open, 300, false)
const last = useRef({ width, children })
- const dragStart = useRef<{ x: number; width: number } | null>(null)
const [resizing, setResizing] = useState(false)
if (open) last.current = { width, children }
const content = open ? { width, children } : last.current
- const onDown = (e: React.PointerEvent) => {
- e.currentTarget.setPointerCapture(e.pointerId)
- dragStart.current = { x: e.clientX, width }
- setResizing(true)
- }
- const onMove = (e: React.PointerEvent) => {
- if (dragStart.current) onResize(dragStart.current.width + dragStart.current.x - e.clientX)
- }
- const onUp = () => {
- dragStart.current = null
- setResizing(false)
- }
return (
<div className={`side-panel ${shown ? 'shown' : ''} ${resizing ? 'resizing' : ''}`} inert={!open}
style={{ width: shown ? content.width + 1 : 0 }}>
{mounted ? <>
- <div className="side-panel-border" onPointerDown={onDown} onPointerMove={onMove} onPointerUp={onUp} onPointerCancel={onUp}
- role="separator" aria-label="Resize panel" aria-valuenow={content.width} />
+ <ResizeHandle label="Resize panel" width={content.width} min={min} max={max} edge="leading" onResize={onResize} onDragging={setResizing} />
<div style={{ width: content.width, height: '100%', flex: 'none' }}>{content.children}</div>
</> : null}
</div>
diff --git a/apps/desktop/src/renderer/views/thread/Composer.tsx b/apps/desktop/src/renderer/views/thread/Composer.tsx
index 09436bcb..b5ae80a5 100644
--- a/apps/desktop/src/renderer/views/thread/Composer.tsx
+++ b/apps/desktop/src/renderer/views/thread/Composer.tsx
@@ -161,8 +161,8 @@ function DestinationComposer({ botId, thread, onCall, onInterrupt }: {
call: ['waveform', 'Call'],
send: ['arrow.up', 'Send'],
} as const)[trailing]
- const fill = trailing === 'interrupt' ? 'var(--danger)' : trailing === 'send' ? (canSend ? 'var(--accent-fill)' : 'var(--accent-dim)') : 'var(--accent-fill)'
- const ink = trailing === 'interrupt' ? '#fff' : trailing === 'send' ? (canSend ? 'var(--on-accent)' : 'var(--tertiary)') : 'var(--on-accent)'
+ const fill = trailing === 'interrupt' ? 'var(--danger-fill)' : trailing === 'send' ? (canSend ? 'var(--accent-fill)' : 'var(--accent-dim)') : 'var(--accent-fill)'
+ const ink = trailing === 'interrupt' ? 'var(--on-danger)' : trailing === 'send' ? (canSend ? 'var(--on-accent)' : 'var(--tertiary)') : 'var(--on-accent)'
const enabled = trailing !== 'send' || canSend
return (
diff --git a/apps/desktop/src/renderer/views/thread/ComposerAttachment.tsx b/apps/desktop/src/renderer/views/thread/ComposerAttachment.tsx
index 462137f0..fdfad437 100644
--- a/apps/desktop/src/renderer/views/thread/ComposerAttachment.tsx
+++ b/apps/desktop/src/renderer/views/thread/ComposerAttachment.tsx
@@ -34,7 +34,7 @@ export function ComposerAttachment({ file, remove }: { file: OutgoingFile; remov
<span className="file-chip">
<Icon name={attachmentSymbol(file.name)} size={10} color="var(--secondary)" />
<span style={{ ...font('footnote'), color: 'var(--text)', maxWidth: 160, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{file.name}</span>
- <button aria-label={`Remove ${file.name}`} title="Remove" style={{ display: 'flex' }} onClick={remove}>
+ <button className="file-chip-remove" aria-label={`Remove ${file.name}`} title="Remove" onClick={remove}>
<Icon name="xmark" size={10} weight="bold" color="var(--secondary)" />
</button>
</span>
diff --git a/apps/desktop/src/renderer/views/thread/Markdown.tsx b/apps/desktop/src/renderer/views/thread/Markdown.tsx
index 36ddbfe3..3f2ed44b 100644
--- a/apps/desktop/src/renderer/views/thread/Markdown.tsx
+++ b/apps/desktop/src/renderer/views/thread/Markdown.tsx
@@ -1,5 +1,6 @@
import { memo, type ReactNode } from 'react'
import { parseMarkdown, type Block } from './markdown-blocks.ts'
+import { Hairline } from '../../components/Controls'
// The Mac's Markdown for messages: the blocks from `markdown-blocks.ts`, with inline styling like
// `AttributedString(markdown:)`.
@@ -75,7 +76,7 @@ const MarkdownBlock = memo(function MarkdownBlock({ block }: { block: Block }) {
</div>
)
case 'rule':
- return <div style={{ height: 1, background: 'var(--border)', margin: '4px 0' }} />
+ return <Hairline style={{ margin: '4px 0' }} />
case 'table': {
const columns = Math.max(block.header.length, ...block.rows.map((r) => r.length))
const cols = Array.from({ length: columns }, (_, i) => i)
@@ -86,7 +87,7 @@ const MarkdownBlock = memo(function MarkdownBlock({ block }: { block: Block }) {
<span key={`h${i}`} style={{ fontWeight: 600 }}>{inline(block.header[i] ?? '', `h${i}`)}</span>
))}
{block.rows.map((row, r) => [
- <div key={`l${r}`} style={{ gridColumn: `1 / span ${columns}`, height: 1, background: 'var(--border)' }} />,
+ <Hairline key={`l${r}`} style={{ gridColumn: `1 / span ${columns}` }} />,
...cols.map((i) => <span key={`${r}-${i}`}>{inline(row[i] ?? '', `${r}-${i}`)}</span>),
])}
</div>
diff --git a/apps/desktop/src/renderer/views/thread/RepliesView.tsx b/apps/desktop/src/renderer/views/thread/RepliesView.tsx
index f3c57a7a..710ee4d9 100644
--- a/apps/desktop/src/renderer/views/thread/RepliesView.tsx
+++ b/apps/desktop/src/renderer/views/thread/RepliesView.tsx
@@ -1,6 +1,6 @@
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
import { isWorkingIn } from '@shared/models'
-import { IconButton } from '../../components/Controls'
+import { Hairline, IconButton } from '../../components/Controls'
import { Sheet } from '../../components/Overlay'
import { font } from '../../lib/fonts'
import { useStore } from '../../store/context'
@@ -57,7 +57,7 @@ export function RepliesView({ botId, rootId, close }: { botId: string; rootId: s
<span style={{ ...font('caption'), color: 'var(--tertiary)', whiteSpace: 'nowrap' }}>
{replyCount(root.data.thread?.count ?? 0)}
</span>
- <div style={{ flex: 1, height: 1, background: 'var(--border)' }} />
+ <Hairline style={{ flex: 1 }} />
</div>
</>
) : null}
diff --git a/apps/desktop/src/renderer/views/thread/ThreadView.tsx b/apps/desktop/src/renderer/views/thread/ThreadView.tsx
index c829d047..b5b44293 100644
--- a/apps/desktop/src/renderer/views/thread/ThreadView.tsx
+++ b/apps/desktop/src/renderer/views/thread/ThreadView.tsx
@@ -1,9 +1,9 @@
-import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'
+import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'
import { draftOf, isGroup, isWorkingIn, type Bot, type BotDraft } from '@shared/models'
import { BotAvatar, GroupAvatar } from '../../components/Avatar'
import { Spinner } from '../../components/Controls'
import { Icon } from '../../components/Icon'
-import { Sheet } from '../../components/Overlay'
+import { Sheet, usePresence } from '../../components/Overlay'
import { font } from '../../lib/fonts'
import { prefs, usePref } from '../../lib/prefs'
import { useStore } from '../../store/context'
@@ -32,7 +32,7 @@ const WIDE = 680
* calls and thinking live in the "Full conversation" sheet. Any message can start a thread,
* which opens beside the chat.
*/
-export function ThreadView({ botId }: { botId: string }) {
+export const ThreadView = memo(function ThreadView({ botId }: { botId: string }) {
const store = useStore()
const bot = store.bots.get(botId) ?? null
const [showTrace, setShowTrace] = useState(false)
@@ -50,7 +50,12 @@ export function ThreadView({ botId }: { botId: string }) {
const [routineRequest, setRoutineRequest] = useState(0)
const root = useRef<HTMLDivElement>(null)
const dock = useRef<HTMLDivElement>(null)
- const [width, setWidth] = useState(800)
+ // The width is measured, not rendered: resizing re-renders only when `wide` flips, or while the
+ // window is narrow enough to squeeze the open side panel.
+ const width = useRef(800)
+ const [wide, setWide] = useState(true)
+ const [, setSqueezed] = useState(0)
+ const squeezeBelow = useRef(0)
const [detailsWidth, setDetailsWidth] = usePref(prefs.detailsPanelWidth)
const [repliesWidth, setRepliesWidth] = usePref(prefs.repliesPanelWidth)
useReading(store, botId, null)
@@ -58,7 +63,12 @@ export function ThreadView({ botId }: { botId: string }) {
useLayoutEffect(() => {
const el = root.current
if (!el) return
- const observer = new ResizeObserver(([e]) => setWidth(e!.contentRect.width))
+ const observer = new ResizeObserver(([e]) => {
+ const w = e!.contentRect.width
+ width.current = w
+ setWide(w >= WIDE)
+ setSqueezed(w - 380 < squeezeBelow.current ? w : 0)
+ })
observer.observe(el)
// The composer floats over the transcript; its height becomes the transcript's bottom padding.
const docked = new ResizeObserver(([e]) => el.style.setProperty('--composer-height', `${Math.ceil(e!.borderBoxSize[0]!.blockSize)}px`))
@@ -69,9 +79,11 @@ export function ThreadView({ botId }: { botId: string }) {
}
}, [])
- const wide = width >= WIDE
- // The side panel's border drags its width, leaving the conversation at least 380 wide.
- const panelWidth = (w: number) => Math.min(Math.max(260, w), width - 380)
+ const panelOpen = wide && (!!openThread || showSettings)
+ const preferredPanel = openThread ? repliesWidth : detailsWidth
+ squeezeBelow.current = panelOpen ? preferredPanel : 0
+ // The side panel's edge drags its width, leaving the conversation at least 380 wide.
+ const panelWidth = (w: number) => Math.min(Math.max(260, w), width.current - 380)
// A compact Details presentation dismisses once the window is wide enough for the inspector.
useEffect(() => {
if (wide) setCompactDetails(false)
@@ -99,14 +111,14 @@ export function ThreadView({ botId }: { botId: string }) {
const openThreadOn = useCallback((root: { id: string }) => setOpenThread(root.id), [])
const closeThread = useCallback(() => setOpenThread(null), [])
- const presentRoutine = (id: string | null) => {
+ const presentRoutine = useCallback((id: string | null) => {
setRoutineId(id)
setRoutineRequest((r) => r + 1)
setDetailsTab('details')
setOpenThread(null)
setShowSettings(true)
if (!wide) setCompactDetails(true)
- }
+ }, [wide])
const details = (
<DetailsPanel
@@ -139,7 +151,7 @@ export function ThreadView({ botId }: { botId: string }) {
) : null}
</div>
{/* The call bar takes the pill's place; its frosted glass would show the name blurred. */}
- <button className={`title-pill ${calling ? 'hidden-by-call' : ''}`} inert={calling} onClick={toggleDetails} aria-label="View conversation details" title="View conversation details">
+ <button className={`title-pill ${calling ? 'hidden-by-call' : ''}`} inert={calling} onClick={toggleDetails} aria-label={`${bot?.name ?? 'Conversation'}, view details`} title="View conversation details">
<span style={{ display: 'flex', alignItems: 'center', gap: 7 }}>
{bot ? isGroup(bot) ? <GroupAvatar members={store.members(bot)} size={22} /> : <BotAvatar bot={bot} size={22} /> : null}
<span style={{ ...font(13, 'medium'), color: 'var(--text)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{bot?.name ?? ''}</span>
@@ -173,8 +185,10 @@ export function ThreadView({ botId }: { botId: string }) {
) : null}
</div>
<ChatSidePanel
- open={wide && (!!openThread || showSettings)}
- width={panelWidth(openThread ? repliesWidth : detailsWidth)}
+ open={panelOpen}
+ width={panelWidth(preferredPanel)}
+ min={260}
+ max={width.current - 380}
onResize={(w) => (openThread ? setRepliesWidth : setDetailsWidth)(panelWidth(w))}
>
{openThread ? <RepliesView key={openThread} botId={botId} rootId={openThread} close={closeThread} /> : details}
@@ -200,7 +214,7 @@ export function ThreadView({ botId }: { botId: string }) {
</Sheet>
</div>
)
-}
+})
/** The top edge of the chat: messages fade out gradually as they scroll under the title pill. */
function TopFade() {
@@ -227,7 +241,7 @@ function ConnectionSubtitle() {
return store.hostRoute === 'relay' ? 'Connected through Cloudflare' : store.hostRoute === 'direct' ? 'Connected over Wi-Fi or Tailscale' : store.hostRoute === 'loopback' ? 'Connected locally' : 'Connected'
})()
return (
- <span style={{ display: 'flex', alignItems: 'center', gap: 6, ...font(10, 'medium'), color: 'var(--secondary)' }} title={`${store.hostName} · ${description}`} aria-label={`${store.hostName}, ${description}`}>
+ <span style={{ display: 'flex', alignItems: 'center', gap: 6, ...font(11, 'medium'), color: 'var(--secondary)' }} title={`${store.hostName} · ${description}`} aria-label={`${store.hostName}, ${description}`}>
<span style={{ width: 12, display: 'flex', justifyContent: 'center' }}>{connecting ? <Spinner size={8} /> : <Icon name={symbol} size={8} weight="medium" />}</span>
<span style={{ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{store.connectionLabel}</span>
</span>
@@ -237,12 +251,13 @@ function ConnectionSubtitle() {
/** The messages: every loaded message, brought to the newest as it changes while the reader is at the bottom. */
const PAGE = 40
-function Transcript({ botId, openTrace, openThread, openRoutine, openBotChat }: { botId: string; openTrace: () => void; openThread: (e: { id: string }) => void; openRoutine: (id: string | null) => void; openBotChat: (peerId: string) => void }) {
+const Transcript = memo(function Transcript({ botId, openTrace, openThread, openRoutine, openBotChat }: { botId: string; openTrace: () => void; openThread: (e: { id: string }) => void; openRoutine: (id: string | null) => void; openBotChat: (peerId: string) => void }) {
const store = useStore()
const bot = store.bots.get(botId) ?? null
- const thread = store.chat(botId)
const live = !!bot && isWorkingIn(bot, botId, null) && !store.isOffline
- const all = buildChat(thread, true)
+ // Rebuilt only when this chat changes: the store replaces a chat's list on every change.
+ const entries = store.allEntries(botId)
+ const all = useMemo(() => buildChat(store.chat(botId), true), [store, botId, entries])
// The newest 40 items first; older pages come in near the top.
const [firstShown, setFirstShown] = useState<string | null>(null)
const [loadingEarlier, setLoadingEarlier] = useState(false)
@@ -259,6 +274,7 @@ function Transcript({ botId, openTrace, openThread, openRoutine, openBotChat }:
const lastScrollTop = useRef(0)
const keepPlace = useRef<number | null>(null)
const last = items[items.length - 1]
+ const jump = usePresence(!following && items.length > 0, 200)
const arrivals = useArrivals([...items.map((i) => i.id), ...(live ? ['working'] : [])], following)
const toBottom = (smooth = false) => {
@@ -320,6 +336,8 @@ function Transcript({ botId, openTrace, openThread, openRoutine, openBotChat }:
<div
className="transcript"
ref={scroller}
+ role="log"
+ aria-label="Messages"
onScroll={(e) => {
const el = e.currentTarget
const atEnd = el.scrollHeight - el.scrollTop - el.clientHeight < 8
@@ -349,8 +367,8 @@ function Transcript({ botId, openTrace, openThread, openRoutine, openBotChat }:
<div style={{ height: 8 }} />
</div>
</div>
- {!following && items.length ? (
- <div className="jump-to-latest" style={{ bottom: 'calc(var(--composer-height, 70px) + 10px)' }}>
+ {jump.mounted ? (
+ <div className={`jump-to-latest ${jump.shown ? 'shown' : ''}`} inert={!jump.shown} style={{ bottom: 'calc(var(--composer-height, 70px) + 10px)' }}>
<MacChatButton
title="Jump to latest"
icon="arrow.down"
@@ -364,7 +382,7 @@ function Transcript({ botId, openTrace, openThread, openRoutine, openBotChat }:
) : null}
</div>
)
-}
+})
function Row({ item, chat, openTrace, openThread, openRoutine, openBotChat }: { item: ChatItem; chat: Bot | null; openTrace: () => void; openThread: (e: { id: string }) => void; openRoutine: (id: string | null) => void; openBotChat: (peerId: string) => void }) {
if (item.kind === 'separator') {
diff --git a/apps/desktop/src/renderer/views/thread/chat-controls.css b/apps/desktop/src/renderer/views/thread/chat-controls.css
index 5039f445..0d06baff 100644
--- a/apps/desktop/src/renderer/views/thread/chat-controls.css
+++ b/apps/desktop/src/renderer/views/thread/chat-controls.css
@@ -76,18 +76,24 @@
mask-image: linear-gradient(to top, #000 40%, transparent);
background: linear-gradient(to top, color-mix(in srgb, var(--background) 90%, transparent) 0%, color-mix(in srgb, var(--background) 45%, transparent) 40%, transparent 100%);
}
+@media (prefers-reduced-transparency: reduce) {
+ .composer-fade {
+ backdrop-filter: none;
+ background: linear-gradient(to top, var(--background) 40%, transparent);
+ }
+}
.jump-to-latest {
position: absolute;
left: 50%;
z-index: 5;
transform: translateX(-50%);
border-radius: 50%;
- box-shadow: 0 3px 20px rgba(0, 0, 0, 0.12);
- animation: jump-in var(--morph) both;
+ box-shadow: var(--shadow-m);
+ opacity: 0;
+ translate: 0 6px;
+ transition: opacity var(--morph), translate var(--morph);
}
-@keyframes jump-in {
- from {
- opacity: 0;
- translate: 0 6px;
- }
+.jump-to-latest.shown {
+ opacity: 1;
+ translate: none;
}
diff --git a/apps/desktop/src/renderer/views/thread/composer.css b/apps/desktop/src/renderer/views/thread/composer.css
index 405337b2..3a8c4cb5 100644
--- a/apps/desktop/src/renderer/views/thread/composer.css
+++ b/apps/desktop/src/renderer/views/thread/composer.css
@@ -3,8 +3,7 @@
height: 25px;
border-radius: 50%;
background: color-mix(in srgb, var(--text) 9%, var(--composer-fill));
- border: 1px solid var(--chrome-stroke);
- box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
+ box-shadow: var(--shadow-s);
display: grid;
place-items: center;
flex: none;
@@ -15,9 +14,8 @@
flex: 1;
min-width: 0;
background: var(--composer-fill);
- border-radius: 22px;
- border: 1px solid var(--composer-stroke);
- box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
+ border-radius: var(--radius-xl);
+ box-shadow: var(--shadow-s);
display: flex;
flex-direction: column;
}
@@ -25,7 +23,7 @@
display: flex;
align-items: flex-end;
gap: 8px;
- padding: 6px 7px;
+ padding: 7px 8px;
}
.composer-field {
flex: 1;
@@ -91,13 +89,13 @@
color: var(--text);
}
.composer-mic.on {
- background: var(--danger);
- color: #fff;
+ background: var(--danger-fill);
+ color: var(--on-danger);
}
.composer-send {
width: 25px;
height: 25px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
display: grid;
place-items: center;
flex: none;
@@ -113,8 +111,8 @@
bottom: calc(100% + 8px);
z-index: 20;
background: var(--bubble-agent);
- border-radius: 14px;
- box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
+ border-radius: var(--radius-l);
+ box-shadow: var(--shadow-m);
overflow: hidden;
opacity: 0;
transform: translateY(4px);
@@ -140,5 +138,5 @@
color: var(--secondary);
}
.command-detail.warning {
- color: var(--warning);
+ color: var(--attention);
}
diff --git a/apps/desktop/src/renderer/views/thread/details-panel.css b/apps/desktop/src/renderer/views/thread/details-panel.css
index 3722a05b..57598d4a 100644
--- a/apps/desktop/src/renderer/views/thread/details-panel.css
+++ b/apps/desktop/src/renderer/views/thread/details-panel.css
@@ -100,7 +100,7 @@
.details-tab .card-section-rows {
background: none;
border: 1px solid var(--border);
- border-radius: 14px;
+ border-radius: var(--radius-l);
}
.details-tab .field-box {
background: var(--surface);
diff --git a/apps/desktop/src/renderer/views/thread/handoff.css b/apps/desktop/src/renderer/views/thread/handoff.css
index 0062c2ec..39c3073f 100644
--- a/apps/desktop/src/renderer/views/thread/handoff.css
+++ b/apps/desktop/src/renderer/views/thread/handoff.css
@@ -1,9 +1,9 @@
-.handoff-line { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--secondary); min-width: 0; }
+.handoff-line { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--scale)); color: var(--secondary); min-width: 0; }
.handoff-line span { overflow-wrap: anywhere; }
.handoff-center { display: flex; justify-content: center; }
.handoff-folded { max-width: 620px; margin: 0 auto; padding: 0 12px; }
-.handoff-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bubble-agent); max-width: 560px; }
+.handoff-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius-l); background: var(--bubble-agent); max-width: 560px; }
.handoff-actions { display: flex; align-items: center; gap: 8px; }
-.handoff-text { margin: 0; font-size: 12px; color: var(--secondary); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; line-height: 1.45; }
+.handoff-text { margin: 0; font-size: calc(12px * var(--scale)); color: var(--secondary); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; line-height: 1.45; }
.handoff-carried { font-family: var(--mono, ui-monospace, monospace); max-height: 320px; overflow: auto; }
.handoff-editor { display: flex; flex-direction: column; height: 100%; background: var(--background); }
diff --git a/apps/desktop/src/renderer/views/thread/thread.css b/apps/desktop/src/renderer/views/thread/thread.css
index 79659229..bfd97d82 100644
--- a/apps/desktop/src/renderer/views/thread/thread.css
+++ b/apps/desktop/src/renderer/views/thread/thread.css
@@ -7,6 +7,8 @@
/* Chat text follows the selected size without an extra platform offset. */
--conversation: var(--chat);
--md-scale: var(--chat-scale);
+ /* Messages and the composer share one readable column that grows with the text size. */
+ --column: calc(820px * var(--scale));
flex: 1;
min-width: 0;
height: 100%;
@@ -62,20 +64,22 @@
-webkit-mask-image: linear-gradient(to bottom, #000, transparent 50%);
mask-image: linear-gradient(to bottom, #000, transparent 50%);
}
+@media (prefers-reduced-transparency: reduce) {
+ .top-fade::before {
+ backdrop-filter: none;
+ }
+}
.title-pill {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
- padding: 6px 12px 6px 8px;
+ padding: 7px 13px 7px 9px;
background: var(--chrome-fill);
- border: 1px solid var(--chrome-stroke);
- border-radius: 999px;
- box-shadow: 0 4px 32px rgba(0, 0, 0, 0.12);
+ border-radius: var(--radius-pill);
+ box-shadow: var(--shadow-m);
max-width: 60%;
-}
-.title-pill {
transition: opacity var(--layout), transform var(--layout);
}
.title-pill-chevron {
@@ -95,25 +99,6 @@
opacity: 0;
transform: translateY(-8px);
}
-.frosted-circle {
- border-radius: 50%;
- background: var(--frosted);
- backdrop-filter: blur(20px);
- display: flex;
-}
-.frosted-circle .icon-button {
- border-radius: 50% !important;
-}
-.round-button {
- width: 32px;
- height: 32px;
- border-radius: 50%;
- background: var(--frosted);
- backdrop-filter: blur(20px);
- display: grid;
- place-items: center;
- flex: none;
-}
.transcript-frame {
position: absolute;
@@ -126,7 +111,7 @@
}
.transcript-content {
container-type: inline-size;
- max-width: 1120px;
+ max-width: var(--column);
margin: 0 auto;
/* The floating title pill and composer sit over the list; messages pass underneath. */
padding: 64px 14px var(--composer-height, 70px);
@@ -136,7 +121,7 @@
width: 100%;
text-align: center;
padding: 12px 0;
- font-size: calc(10px * var(--scale));
+ font-size: calc(11px * var(--scale));
color: var(--secondary);
}
.intro-card {
@@ -188,7 +173,7 @@
}
.bubble {
padding: 8px 10px;
- border-radius: 16px;
+ border-radius: var(--radius-l);
max-width: 100%;
min-width: 0;
}
@@ -229,7 +214,7 @@
}
.reaction-chip {
padding: 3px 8px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--surface);
}
.thread-chip {
@@ -237,7 +222,7 @@
align-items: center;
gap: 6px;
padding: 5px 10px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--surface);
}
.working {
@@ -245,7 +230,7 @@
flex-direction: column;
gap: 8px;
padding: 12px;
- border-radius: 22px;
+ border-radius: var(--radius-xl);
background: var(--bubble-agent);
text-align: left;
min-width: 0;
@@ -269,7 +254,7 @@
align-items: center;
gap: 6px;
padding: 6px 10px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--surface);
flex: none;
}
@@ -278,19 +263,10 @@
align-items: flex-end;
gap: 8px;
padding: 8px 14px 14px;
- max-width: 1120px;
+ max-width: var(--column);
margin: 0 auto;
width: 100%;
}
-.symbol-swap {
- animation: symbol-in var(--morph) both;
-}
-@keyframes symbol-in {
- from {
- opacity: 0;
- transform: scale(0.6);
- }
-}
.file-chips {
display: flex;
gap: 6px;
@@ -305,7 +281,7 @@
width: 80px;
height: 80px;
flex: none;
- border-radius: 16px;
+ border-radius: var(--radius-l);
overflow: hidden;
background: var(--surface);
}
@@ -331,10 +307,18 @@
align-items: center;
gap: 6px;
padding: 6px 10px;
- border-radius: 999px;
+ border-radius: var(--radius-pill);
background: var(--surface);
flex: none;
}
+/* The remove glyph is small; its target is 24 pt. */
+.file-chip-remove {
+ display: grid;
+ place-items: center;
+ width: 24px;
+ height: 24px;
+ margin: -6px -8px -6px -4px;
+}
.call-overlay {
position: absolute;
@@ -359,56 +343,16 @@
flex: none;
opacity: 0;
transition: width var(--layout), opacity var(--morph);
- /* The margin lets the border's drag area reach into the conversation. */
+ /* The margin lets the edge's drag area reach into the conversation. */
overflow: clip;
overflow-clip-margin: 4px;
}
.side-panel.shown { opacity: 1; }
.side-panel.resizing { transition: none; }
-.side-panel-border {
- width: 1px;
- background: var(--border);
- flex: none;
- position: relative;
- z-index: 7;
-}
-.side-panel-border::after {
- content: '';
- position: absolute;
- top: 0;
- bottom: 0;
- left: -4px;
- width: 9px;
- cursor: col-resize;
-}
-@keyframes panel-slide {
- from {
- opacity: 0;
- transform: translateX(20px);
- }
-}
-.panel-slide.from-trailing {
- animation: from-trailing var(--layout) both;
-}
-.panel-slide.from-leading {
- animation: from-leading var(--layout) both;
-}
-@keyframes from-trailing {
- from {
- opacity: 0;
- transform: translateX(30%);
- }
-}
-@keyframes from-leading {
- from {
- opacity: 0;
- transform: translateX(-30%);
- }
-}
/* A message arriving while the list follows the newest pops in from its bubble's side (Grok Bot's). */
.row-in {
- animation: row-in 0.24s cubic-bezier(0.23, 1, 0.32, 1) both;
+ animation: row-in 0.24s var(--ease-out) both;
transform-origin: bottom left;
}
.row-in.mine {
@@ -422,11 +366,6 @@
}
@media (prefers-reduced-motion: reduce) {
.row-in {
- animation: row-fade 0.12s both;
- }
-}
-@keyframes row-fade {
- from {
- opacity: 0;
+ animation: fade-in 0.12s both;
}
}
diff --git a/apps/desktop/src/renderer/views/tray-summary.ts b/apps/desktop/src/renderer/views/tray-summary.ts
index 872c9f2a..a20b1ff0 100644
--- a/apps/desktop/src/renderer/views/tray-summary.ts
+++ b/apps/desktop/src/renderer/views/tray-summary.ts
@@ -4,7 +4,7 @@ import { isGroup, isWorking, needsInput, folderName, type Bot, type UsageWindow
import { drawCharacter, moodOf } from '../components/Avatar'
import { useModels } from '../lib/observable'
import { prefs, usePref } from '../lib/prefs'
-import { avatarColor, isDark } from '../lib/theme'
+import { avatarColor, isDark, palette } from '../lib/theme'
import type { AppModel } from '../store/app-model'
import { providerTint, resetDate, untilText, windowTitle } from './usage/usage-model'
import { mascotDataURL } from './usage/ProviderMascot'
@@ -35,7 +35,7 @@ function avatarIcon(bot: Bot) {
return canvasURL(key, 20, 20, (ctx) => {
const dark = isDark()
drawCharacter(ctx, { shape: bot.avatarShape, fill: avatarColor(bot.avatarColor), size: 20, mood: moodOf(bot, false), dark, t: 0, still: true })
- const badge = needsInput(bot) ? '#F0A030' : bot.unread > 0 ? (dark ? '#FFFFFF' : '#000000') : null
+ const badge = needsInput(bot) ? palette(dark).warning : bot.unread > 0 ? (dark ? '#FFFFFF' : '#000000') : null
if (badge) {
const r = needsInput(bot) ? 3.6 : 2.8
ctx.beginPath()
@@ -60,7 +60,7 @@ function barIcon(providerId: string, window: UsageWindow) {
const percent = Math.round(window.percent)
return canvasURL(`bar|${providerId}|${percent}`, 60, 16, (ctx) => {
const dark = isDark()
- const color = window.percent >= 90 ? (dark ? '#F0A7A7' : '#C23A2B') : window.percent >= 70 ? '#F0A030' : providerTint(providerId)
+ const color = window.percent >= 90 ? palette(dark).danger : window.percent >= 70 ? palette(dark).warning : providerTint(providerId)
ctx.fillStyle = dark ? 'rgba(255,255,255,0.12)' : 'rgba(0,0,0,0.12)'
ctx.beginPath()
ctx.roundRect(0, 5.5, 60, 5, 2.5)
diff --git a/apps/desktop/src/renderer/views/usage/ProviderMascot.tsx b/apps/desktop/src/renderer/views/usage/ProviderMascot.tsx
index 09a93986..0e2573a7 100644
--- a/apps/desktop/src/renderer/views/usage/ProviderMascot.tsx
+++ b/apps/desktop/src/renderer/views/usage/ProviderMascot.tsx
@@ -2,6 +2,7 @@ import type { UsageProvider } from '@shared/models'
import { agentIconURL, AgentIcon } from '../../components/AgentIcon'
import { CharacterAvatar, drawCharacter } from '../../components/Avatar'
import { Icon } from '../../components/Icon'
+import { palette } from '../../lib/theme'
import { mascotShape, providerRegistry, providerTint, providerTintCSS, tightest } from './usage-model'
/** A provider's character, with a red "!" once any of its limits is nearly used up. */
@@ -59,7 +60,7 @@ export function mascotDataURL(provider: UsageProvider, size: number, style: 'cha
if (full) {
ctx.beginPath()
ctx.arc(size * 0.92, size * 0.08, size * 0.17, 0, Math.PI * 2)
- ctx.fillStyle = dark ? '#F0A7A7' : '#C23A2B'
+ ctx.fillStyle = palette(dark).danger
ctx.fill()
}
return canvas.toDataURL('image/png')
diff --git a/docs/design/ui-conventions.md b/docs/design/ui-conventions.md
index 4aa2c6bf..b03b6c98 100644
--- a/docs/design/ui-conventions.md
+++ b/docs/design/ui-conventions.md
@@ -52,7 +52,7 @@ The chat window's account menu copies Grok Bot's: Usage, Get Codync for mobile,
The iPhone and the desktop no longer share UI code. `CodyncUI` (`apps/ios/Kit/`) is the iPhone app's own package; the desktop app (`apps/desktop/src/renderer/`) is a TypeScript port of the same screens with its own `BotStore`, chat items (`views/thread/chat-items.ts`) and Markdown blocks (`markdown-blocks.ts`).
- The iPhone chat's chrome is in `ThreadView.swift` (`body`, `chrome`, `header`). The iPhone conversation (chat and thread) is a UIKit collection view of hosted SwiftUI rows (`ConversationList.swift`): it loads earlier messages from the computer as the reader scrolls up, runs under the bars and the composer (the list sits in the safe area and reaches past it, so rows never get a safe area of their own), follows the newest message until they scroll away (with a round "Jump to latest" button), and pops each new message in ([chat messages](../features/chat-messages.md)).
-- The desktop UI rules (custom controls, no system menus except the tray, icon-only buttons, fill or border) are implemented in `apps/desktop/src/renderer/components/` (`Controls.tsx`, `Overlay.tsx`, `Icon.tsx`).
+- The desktop UI rules (custom controls, no system menus except the tray, icon-only buttons, fill or border) are implemented in `apps/desktop/src/renderer/components/` (`Controls.tsx`, `Overlay.tsx`, `Icon.tsx`). Chrome on the sidebar (its header actions, the computer filter, Extensions) is outlined; chrome floating over the conversation (the title pill, the composer) is filled with a shadow. Corner radii and shadows come from the `--radius-*` and `--shadow-*` scale in `styles/theme.css`. Status text uses `--attention` (`--warning` is for dots and fills only), and destructive fills use `--danger-fill` with `--on-danger`, so both stay readable in light and dark. Sheets and dialogs hold focus while open: the window behind goes inert, Tab cycles inside, and focus returns to where it was on close.
- The Android app (`apps/android/`) ports the iPhone screens one to one in Compose. Where iOS uses system UI (the tab bar, menus, sheets, Liquid Glass), Android draws the same look with its `design` module: glass from Kyant's backdrop library (blur, lens refraction and highlight on RenderEffect/RuntimeShader), the iOS sheet with its grabber and drag-to-close, glass menus and context menus, Inter for SF Pro and Material Symbols for SF Symbols (`Symbol("sf.name")`), and the soft scroll edge under its bars (`ScrollEdge`: the content behind the header, composer and tab bar blurs and washes out). Android has no Liquid Glass of its own; Material widgets aren't used.
- A change to one lands in the other and the TUI in the same change; see [native client parity](#native-client-parity).
@@ -90,7 +90,7 @@ Model discovery keeps loading and refresh in one fixed-size slot beside the Mode
## Desktop conversation details
-Desktop conversations start with the details inspector closed; the title menu opens it on demand. Keep the transcript and composer aligned within a 1120-point maximum width. The roster selection, composer and outgoing messages have separate surface tokens so selection and input do not compete with the conversation. Roster names use body text and previews use callout text; previews show the first nonempty line without common Markdown heading, quote, bold or code delimiters, matching the terminal roster.
+Desktop conversations start with the details inspector closed; the title menu opens it on demand. Keep the transcript and composer aligned in one reading column, 820 points wide and scaled with the text size (`--column`). The inspector, or a thread's replies in its place, is resized by dragging its edge or with ←/→ while the edge has focus, like the sidebar (`ResizeHandle`); each keeps its own width, at least 260 points, leaving the conversation at least 380. The roster selection, composer and outgoing messages have separate surface tokens so selection and input do not compete with the conversation. Roster names use body text and previews use callout text; previews show the first nonempty line without common Markdown heading, quote, bold or code delimiters, matching the terminal roster.
Preserve the original character avatar design: dotted shading, highlight-only color, silhouettes and animation. Desktop roster avatars remain 30 points and iPhone roster avatars remain 46 points. iPhone shares readable secondary text and message previews; its native navigation remains platform-specific. Terminal avatars already use solid color and the terminal has no persistent details inspector; its secondary text uses the same readable palette.