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(ui): refine chat appearance and scrolling

leepokaib021d4676fde
diff --git a/apps/desktop/src/renderer/assets/gmail.png b/apps/desktop/src/renderer/assets/gmail.png
new file mode 100644
index 00000000..9816fe53
Binary files /dev/null and b/apps/desktop/src/renderer/assets/gmail.png differ
diff --git a/apps/desktop/src/renderer/assets/google-calendar.png b/apps/desktop/src/renderer/assets/google-calendar.png
new file mode 100644
index 00000000..544f380d
Binary files /dev/null and b/apps/desktop/src/renderer/assets/google-calendar.png differ
diff --git a/apps/desktop/src/renderer/assets/google-drive.png b/apps/desktop/src/renderer/assets/google-drive.png
new file mode 100644
index 00000000..c5ca4848
Binary files /dev/null and b/apps/desktop/src/renderer/assets/google-drive.png differ
diff --git a/apps/desktop/src/renderer/lib/message-preview.test.ts b/apps/desktop/src/renderer/lib/message-preview.test.ts
new file mode 100644
index 00000000..4eef8178
--- /dev/null
+++ b/apps/desktop/src/renderer/lib/message-preview.test.ts
@@ -0,0 +1,11 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { messagePreview } from './message-preview.ts'
+
+test('roster previews read formatted replies without markdown markers', () => {
+ assert.equal(messagePreview('算好了:**123 × 45 = 5,535** ✅\nDetails'), '算好了:123 × 45 = 5,535 ✅')
+ assert.equal(messagePreview('\n > **Ready**: `my_file.ts`\r\nMore'), 'Ready: my_file.ts')
+ assert.equal(messagePreview('### Release notes'), 'Release notes')
+ assert.equal(messagePreview(' \n\t'), '')
+ assert.equal(messagePreview('2 * 3 = 6; my_file.ts'), '2 * 3 = 6; my_file.ts')
+})
diff --git a/apps/desktop/src/renderer/lib/message-preview.ts b/apps/desktop/src/renderer/lib/message-preview.ts
new file mode 100644
index 00000000..663b1a4b
--- /dev/null
+++ b/apps/desktop/src/renderer/lib/message-preview.ts
@@ -0,0 +1,5 @@
+/** Match the terminal roster: first nonempty line, without block/bold/code markers. */
+export function messagePreview(text: string): string {
+ const first = text.split(/\r?\n/).map((line) => line.trim()).find(Boolean) ?? ''
+ return first.replace(/^[#>\-* ]+/, '').replaceAll('**', '').replaceAll('`', '')
+}
diff --git a/apps/desktop/src/renderer/lib/prefs.ts b/apps/desktop/src/renderer/lib/prefs.ts
index 88c74f80..fe48de4c 100644
--- a/apps/desktop/src/renderer/lib/prefs.ts
+++ b/apps/desktop/src/renderer/lib/prefs.ts
@@ -55,7 +55,7 @@ export function stepTextSize(size: number, up: boolean) {
export const prefs = {
textSize: pref('conversationFontSize', DEFAULT_TEXT_SIZE),
sidebarCompact: pref('sidebarCompact', false),
- sidebarWidth: pref('desktopSidebarWidth', 296),
+ sidebarWidth: pref('desktopSidebarWidth', 266),
hiddenComputers: pref('hiddenComputers', ''),
usageIconStyle: pref<'character' | 'original'>('usageIconStyle', 'character'),
onboardingDone: pref('macAccountOnboardingCompleted', false),
@@ -67,9 +67,9 @@ export function applyTextSize(size: number) {
const clamped = Number.isFinite(size) ? Math.min(Math.max(size, 11), 18) : DEFAULT_TEXT_SIZE
document.documentElement.style.setProperty('--scale', String(clamped / DEFAULT_TEXT_SIZE))
document.documentElement.style.setProperty('--conversation', `${clamped}px`)
- // The chat itself reads two points larger than the chrome (Grok's desktop chat).
- document.documentElement.style.setProperty('--chat', `${clamped + 2}px`)
- document.documentElement.style.setProperty('--chat-scale', String((clamped + 2) / DEFAULT_TEXT_SIZE))
+ // Match the reference chat at the selected size; keep larger text an explicit preference.
+ document.documentElement.style.setProperty('--chat', `${clamped}px`)
+ document.documentElement.style.setProperty('--chat-scale', String(clamped / DEFAULT_TEXT_SIZE))
}
prefs.textSize.subscribe(() => applyTextSize(prefs.textSize.get()))
diff --git a/apps/desktop/src/renderer/styles/theme.css b/apps/desktop/src/renderer/styles/theme.css
index b73c68f6..91aecc4f 100644
--- a/apps/desktop/src/renderer/styles/theme.css
+++ b/apps/desktop/src/renderer/styles/theme.css
@@ -10,7 +10,7 @@
--text: #141414;
--text-rgb: 20, 20, 20;
--secondary: #6b6b6b;
- --tertiary: #9b9b9b;
+ --tertiary: #767676;
--accent-fill: #000000;
--accent: #000000;
--on-accent: #ffffff;
@@ -27,6 +27,11 @@
--chat-user: #e2e2e2;
/* Floating transcript controls (chevrons, Jump to latest, inspector actions). */
--chat-button: #eeeeee;
+ --composer-fill: #f3f3f3;
+ --chrome-fill: #fafafa;
+ --chrome-stroke: rgba(0, 0, 0, 0.09);
+ --composer-stroke: rgba(0, 0, 0, 0.14);
+ --roster-selected: #e7e7e7;
/* Grok's frosted floating surfaces (title pill, call bar). */
--frosted: rgba(244, 244, 244, 0.82);
@@ -53,15 +58,15 @@
@media (prefers-color-scheme: dark) {
:root {
- --background: #0a0a0a;
- --surface: #141414;
+ --background: #070707;
+ --surface: #111111;
--bubble-agent: #1c1c1c;
--bubble-user: #3a3a3a;
--border: #262626;
- --text: #f2f2f2;
- --text-rgb: 242, 242, 242;
- --secondary: #9a9a9a;
- --tertiary: #6e6e6e;
+ --text: #fafafa;
+ --text-rgb: 250, 250, 250;
+ --secondary: #a0a0a0;
+ --tertiary: #929292;
--accent-fill: #ffffff;
--accent: #ffffff;
--on-accent: #000000;
@@ -72,8 +77,13 @@
--removed: #f0a7a7;
--panel: #1b1b1b;
--chat-agent: #262626;
- --chat-user: #545454;
+ --chat-user: #363636;
--chat-button: #303030;
+ --composer-fill: #2f2f2f;
+ --chrome-fill: #181818;
+ --chrome-stroke: rgba(255, 255, 255, 0.10);
+ --composer-stroke: rgba(255, 255, 255, 0.17);
+ --roster-selected: #292929;
--frosted: rgba(35, 35, 35, 0.82);
}
}
@@ -133,8 +143,10 @@ button {
cursor: default;
text-align: inherit;
}
-button:focus-visible {
- outline: none;
+button:focus-visible,
+[role="separator"]:focus-visible {
+ outline: 2px solid var(--secondary);
+ outline-offset: -2px;
}
button:disabled {
cursor: default;
diff --git a/apps/desktop/src/renderer/views/BotRow.tsx b/apps/desktop/src/renderer/views/BotRow.tsx
index 7237b190..1ba41927 100644
--- a/apps/desktop/src/renderer/views/BotRow.tsx
+++ b/apps/desktop/src/renderer/views/BotRow.tsx
@@ -4,24 +4,25 @@ import { AvatarWithStatus } from '../components/Avatar'
import { Icon } from '../components/Icon'
import { ThinkingOrb } from '../components/ThinkingOrb'
import { font } from '../lib/fonts'
+import { messagePreview } from '../lib/message-preview'
import type { BotStore } from '../store/bot-store'
/** A roster row: avatar with status, name, and the live activity or last message (Grok Bot's desktop sidebar). */
export const BotRow = memo(function BotRow({ bot, store, compact, usingComputer, members }: { bot: Bot; store: BotStore; compact: boolean; usingComputer: boolean; members: Bot[] }) {
return (
- <div style={{ display: 'flex', alignItems: 'center', gap: compact ? 0 : 8, padding: '6px 0', width: '100%', justifyContent: compact ? 'center' : 'flex-start' }}>
+ <div style={{ display: 'flex', alignItems: 'center', gap: compact ? 0 : 10, padding: '9px 0', width: '100%', justifyContent: compact ? 'center' : 'flex-start' }}>
<AvatarWithStatus bot={bot} members={members} size={30} />
<div
aria-hidden={compact}
style={{
- display: 'flex', flexDirection: 'column', gap: 1, minWidth: 0, overflow: 'hidden',
+ display: 'flex', flexDirection: 'column', gap: 2, lineHeight: 'calc(16px * var(--scale))', minWidth: 0, overflow: 'hidden',
width: compact ? 0 : undefined, flex: compact ? 'none' : 1, opacity: compact ? 0 : 1,
transition: 'opacity var(--layout)',
}}
>
<div style={{ display: 'flex', alignItems: 'baseline', gap: 4, minWidth: 0 }}>
{bot.pinned ? <Icon name="pin.fill" size={10} color="var(--tertiary)" /> : null}
- <span style={{ ...font('compactBody', 'semibold'), color: 'var(--text)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{bot.name}</span>
+ <span style={{ ...font('body', bot.unread > 0 ? 'semibold' : 'medium'), color: 'var(--text)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{bot.name}</span>
{usingComputer ? <Icon name="cursorarrow.motionlines" size={10} color="var(--accent)" title="Using the computer" /> : null}
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 6, minWidth: 0 }}>
@@ -44,13 +45,7 @@ export const BotRow = memo(function BotRow({ bot, store, compact, usingComputer,
)
})
-/** `lineLimit(1)`: the first line, with an ellipsis when there is more. */
-const firstLine = (text: string) => {
- const nl = text.indexOf('\n')
- return nl < 0 ? text : `${text.slice(0, nl)}…`
-}
-
-const line: React.CSSProperties = { ...font('compactSecondary'), whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', minWidth: 0 }
+const line: React.CSSProperties = { ...font('callout'), whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', minWidth: 0 }
/** Live activity while working, otherwise the last message (Grok Bot row behavior). */
function Preview({ bot, store }: { bot: Bot; store: BotStore }) {
@@ -70,6 +65,6 @@ function Preview({ bot, store }: { bot: Bot; store: BotStore }) {
</span>
)
}
- if (bot.status === 'error') return <span style={{ ...line, color: 'var(--danger)' }}>{firstLine(bot.lastMessage ?? 'Something went wrong')}</span>
- return <span style={{ ...line, color: 'var(--secondary)' }}>{firstLine(bot.lastMessage ?? (isGroup(bot) ? `${bot.members.length} bots` : `${store.backendName(bot.backend)} · ${folderName(bot)}`))}</span>
+ if (bot.status === 'error') return <span style={{ ...line, color: 'var(--danger)' }}>{messagePreview(bot.lastMessage ?? 'Something went wrong')}</span>
+ return <span style={{ ...line, color: 'var(--secondary)' }}>{messagePreview(bot.lastMessage ?? (isGroup(bot) ? `${bot.members.length} bots` : `${store.backendName(bot.backend)} · ${folderName(bot)}`))}</span>
}
diff --git a/apps/desktop/src/renderer/views/ChatWindow.tsx b/apps/desktop/src/renderer/views/ChatWindow.tsx
index a045821e..785bc15c 100644
--- a/apps/desktop/src/renderer/views/ChatWindow.tsx
+++ b/apps/desktop/src/renderer/views/ChatWindow.tsx
@@ -12,6 +12,7 @@ import { useApp, StoreContext } from '../store/context'
import { refKey, sameRef, parseRef, type BotRef } from '../store/app-model'
import type { BotStore } from '../store/bot-store'
import { BotRow } from './BotRow'
+import { SidebarFooter } from './SidebarFooter'
import { ComputerFilterHeader, computerSelection } from './ComputerFilterHeader'
import { ThreadView } from './thread/ThreadView'
import { NewChatView } from './bots/NewChatView'
@@ -29,6 +30,7 @@ import { AccountPanelLayer, DesktopActionMenu, ProfileAvatar } from './PanelMenu
import { useTraySummary } from './tray-summary'
import { useSSHAttachments } from './settings/ssh-model'
import './chat-window.css'
+import './sidebar-header.css'
const isMac = window.codync.platform === 'darwin'
@@ -332,9 +334,9 @@ function ChatSplitView() {
<div className="sidebar-header drag" style={{ paddingLeft: compact ? 0 : isMac ? 80 : 18, opacity: compact ? 0 : 1, pointerEvents: compact ? 'none' : undefined }} aria-hidden={compact}>
<span style={{ flex: 1 }} />
<div className="no-drag" style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <ComputerFilterHeader hidden={hidden} setHidden={setHidden} manage={() => setSettings('computers')} />
- <IconButton title="Search" icon="magnifyingglass" onClick={() => setSearching(true)} />
- <IconButton title="New" icon="plus" buttonRef={newButton} onClick={() => setNewMenu((o) => !o)} disabled={!onlineStores.length} />
+ <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} />
</div>
<AnchoredMenu open={newMenu} onClose={() => setNewMenu(false)} anchor={newButton} items={newItems} />
</div>
@@ -364,7 +366,7 @@ function ChatSplitView() {
className="roster-row"
style={{
padding: compact ? 0 : '0 8px',
- background: isSelected ? 'var(--bubble-user)' : hovered === key ? 'var(--bubble-agent)' : 'transparent',
+ background: isSelected ? 'var(--roster-selected)' : hovered === key ? 'var(--bubble-agent)' : 'transparent',
}}
aria-label={stores.length > 1 ? `${item.bot.name}, on ${item.store.hostName}` : item.bot.name}
aria-selected={isSelected}
@@ -393,24 +395,13 @@ function ChatSplitView() {
<IconButton title="Search" icon="magnifyingglass" onClick={() => setSearching(true)} />
<IconButton title="New" icon="plus" size={36} buttonRef={railNewButton} disabled={!onlineStores.length} onClick={() => setRailNewMenu((o) => !o)} />
<AnchoredMenu open={railNewMenu} onClose={() => setRailNewMenu(false)} anchor={railNewButton} items={newItems} />
- <IconButton title="Marketplace" icon="square.grid.2x2" size={36} onClick={openMarketplace} />
+ <IconButton title="Connect apps" icon="square.grid.2x2" size={36} onClick={openMarketplace} />
<button className="rail-profile" style={{ background: showAccount ? 'var(--bubble-agent)' : undefined }} aria-label="Open account menu for Account" title="Account" onClick={() => setShowAccount((s) => !s)}>
<ProfileAvatar />
</button>
</div>
) : (
- <div className="sidebar-footer">
- <button className="footer-row" onClick={openMarketplace}>
- <span className="footer-icon">
- <Icon name="square.grid.2x2" size={14} />
- </span>
- <span>Marketplace</span>
- </button>
- <button className={`footer-row account ${showAccount ? 'active' : ''}`} aria-label="Open account menu for Account" title="Account menu" onClick={() => setShowAccount((s) => !s)}>
- <ProfileAvatar />
- <span style={{ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>Account</span>
- </button>
- </div>
+ <SidebarFooter accountOpen={showAccount} onAccount={() => setShowAccount((s) => !s)} onConnectApps={openMarketplace} />
)}
</aside>
<div className="sidebar-divider" onPointerDown={onDividerDown} onPointerMove={onDividerMove} onPointerUp={() => (dragStart.current = null)} role="separator" aria-label="Resize sidebar" aria-valuenow={width} />
@@ -455,7 +446,7 @@ function ChatSplitView() {
<Sheet open={marketplace !== null} onClose={() => setMarketplace(null)} width={Math.min(920, windowSize.width - 80)} height={sheetHeight}>
{marketplace && app.store(marketplace) ? (
<StoreContext.Provider value={app.store(marketplace)!}>
- <MarketplaceView key={marketplace} computers={onlineStores.map((s) => ({ id: s.computer.id, name: s.hostName }))} computer={marketplace} onComputer={setMarketplace} />
+ <MarketplaceView appsFirst key={marketplace} computers={onlineStores.map((s) => ({ id: s.computer.id, name: s.hostName }))} computer={marketplace} onComputer={setMarketplace} />
</StoreContext.Provider>
) : null}
</Sheet>
diff --git a/apps/desktop/src/renderer/views/SidebarFooter.tsx b/apps/desktop/src/renderer/views/SidebarFooter.tsx
new file mode 100644
index 00000000..9b3ce9cc
--- /dev/null
+++ b/apps/desktop/src/renderer/views/SidebarFooter.tsx
@@ -0,0 +1,33 @@
+import { ProfileAvatar } from './PanelMenus'
+import gmail from '../assets/gmail.png'
+import calendar from '../assets/google-calendar.png'
+import drive from '../assets/google-drive.png'
+import './sidebar-footer.css'
+
+/** Account and app connections float above the scrolling roster. */
+export function SidebarFooter({ accountOpen, onAccount, onConnectApps }: {
+ accountOpen: boolean
+ onAccount: () => void
+ onConnectApps: () => void
+}) {
+ return (
+ <div className="sidebar-footer">
+ <div className="sidebar-footer-fade" aria-hidden />
+ <button
+ className={`sidebar-account ${accountOpen ? 'active' : ''}`}
+ aria-label="Open account menu for Account"
+ aria-expanded={accountOpen}
+ title="Account menu"
+ onClick={onAccount}
+ >
+ <ProfileAvatar />
+ </button>
+ <button className="connect-apps" onClick={onConnectApps}>
+ <span>Connect apps</span>
+ <span className="connect-apps-logos" aria-hidden>
+ {[gmail, calendar, drive].map((src) => <img key={src} src={src} alt="" draggable={false} />)}
+ </span>
+ </button>
+ </div>
+ )
+}
diff --git a/apps/desktop/src/renderer/views/chat-window.css b/apps/desktop/src/renderer/views/chat-window.css
index 507272c7..0fce37e2 100644
--- a/apps/desktop/src/renderer/views/chat-window.css
+++ b/apps/desktop/src/renderer/views/chat-window.css
@@ -22,6 +22,7 @@
}
.sidebar {
+ position: relative;
flex: none;
height: 100%;
background: var(--surface);
@@ -34,8 +35,8 @@
display: flex;
align-items: center;
gap: 6px;
- height: 44px;
- padding-right: 18px;
+ height: 54px;
+ padding-right: 14px;
flex: none;
transition: opacity var(--layout), padding var(--layout);
}
@@ -43,7 +44,7 @@
.roster {
flex: 1;
overflow-y: auto;
- padding: 4px 12px 0;
+ padding: 0 10px;
display: flex;
flex-direction: column;
gap: 2px;
@@ -55,7 +56,7 @@
}
.roster-row {
width: 100%;
- border-radius: 10px;
+ border-radius: 12px;
display: flex;
transition: background-color var(--hover);
flex: none;
@@ -71,41 +72,6 @@
pointer-events: none;
}
-.sidebar-footer {
- display: flex;
- flex-direction: column;
- gap: 4px;
- padding: 6px 12px 10px;
- font-size: calc(13px * var(--scale));
- font-weight: 500;
- color: var(--text);
- flex: none;
-}
-.footer-row {
- display: flex;
- align-items: center;
- gap: 10px;
- height: 36px;
- padding: 0 8px;
- border-radius: 10px;
- transition: background-color var(--hover);
-}
-.footer-row.account {
- height: 38px;
-}
-.footer-row:hover,
-.footer-row.active {
- background: var(--bubble-agent);
-}
-.footer-icon {
- width: 30px;
- height: 30px;
- border-radius: 50%;
- background: rgba(var(--text-rgb), 0.025);
- display: grid;
- place-items: center;
- flex: none;
-}
.profile-avatar {
width: 28px;
height: 28px;
diff --git a/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx b/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx
index caef343d..f6e844dd 100644
--- a/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx
+++ b/apps/desktop/src/renderer/views/marketplace/MarketplaceView.tsx
@@ -25,7 +25,7 @@ const connectorId = (c: MarketConnector) => c.name
* computer; each bot turns connectors and skills on in its settings.
* With more than one computer, the header switches between them (the caller swaps the store).
*/
-export function MarketplaceView({ computers, computer, onComputer }: { computers: { id: string; name: string }[]; computer: string; onComputer: (id: string) => void }) {
+export function MarketplaceView({ computers, computer, onComputer, appsFirst = false }: { appsFirst?: boolean; computers: { id: string; name: string }[]; computer: string; onComputer: (id: string) => void }) {
const store = useStore()
const plugins = usePlugins(store)
const dismiss = useDismiss()
@@ -140,7 +140,7 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
<div style={{ display: 'flex', alignItems: 'center', gap: 10, minWidth: 0 }}>
<ComputerBadge computer={store.computer} size={32} />
<div style={{ display: 'flex', flexDirection: 'column', minWidth: 0, whiteSpace: 'nowrap' }}>
- <span style={{ ...font('title2', 'semibold'), color: 'var(--text)' }}>Marketplace</span>
+ <span style={{ ...font('title2', 'semibold'), color: 'var(--text)' }}>{appsFirst ? 'Connect apps' : 'Marketplace'}</span>
{computers.length > 1 ? (
<DropdownMenu
title="Switch computer"
@@ -213,6 +213,7 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
<div className="market-page-content">
{header}
{searchField}
+ {appsFirst ? <ComposioSection query={query} searchToken={searchToken} /> : null}
{agents.length > 0 ? (
<MarketSection title={query ? `Agents matching “${query}”` : 'Agents'}>
<div className="agent-grid">
@@ -250,7 +251,7 @@ export function MarketplaceView({ computers, computer, onComputer }: { computers
</>
)}
</MarketSection>
- <ComposioSection query={query} searchToken={searchToken} />
+ {!appsFirst ? <ComposioSection query={query} searchToken={searchToken} /> : null}
<MarketSection title="Skills">
{loadingSkills ? (
<SkeletonGrid />
diff --git a/apps/desktop/src/renderer/views/sidebar-footer.css b/apps/desktop/src/renderer/views/sidebar-footer.css
new file mode 100644
index 00000000..3ecc4910
--- /dev/null
+++ b/apps/desktop/src/renderer/views/sidebar-footer.css
@@ -0,0 +1,86 @@
+.sidebar:not(.compact) .roster {
+ padding-bottom: 72px;
+ scroll-padding-bottom: 72px;
+}
+
+.sidebar-footer {
+ position: absolute;
+ z-index: 2;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 10px 14px 14px;
+ isolation: isolate;
+}
+
+.sidebar-footer-fade {
+ position: absolute;
+ z-index: -1;
+ inset: -38px 0 0;
+ pointer-events: none;
+ background: linear-gradient(to top, var(--surface) 22%, color-mix(in srgb, var(--surface) 90%, transparent) 54%, transparent);
+}
+.sidebar-footer-fade::before,
+.sidebar-footer-fade::after {
+ content: '';
+ position: absolute;
+ inset: 0;
+ -webkit-backdrop-filter: blur(8px);
+ backdrop-filter: blur(8px);
+ -webkit-mask-image: linear-gradient(to top, black 40%, transparent);
+ mask-image: linear-gradient(to top, black 40%, transparent);
+}
+.sidebar-footer-fade::after {
+ -webkit-backdrop-filter: blur(20px);
+ backdrop-filter: blur(20px);
+ -webkit-mask-image: linear-gradient(to top, black 18%, transparent 75%);
+ mask-image: linear-gradient(to top, black 18%, transparent 75%);
+}
+
+.sidebar-account {
+ flex: none;
+ display: grid;
+ place-items: center;
+ width: 32px;
+ height: 34px;
+ border-radius: 50%;
+ transition: background-color var(--hover), transform var(--hover);
+}
+.sidebar-account .profile-avatar { width: 32px; height: 32px; }
+.sidebar-account:hover,
+.sidebar-account.active { background: var(--bubble-agent); }
+
+.connect-apps {
+ flex: 1;
+ min-width: 0;
+ height: 34px;
+ border-radius: 999px;
+ padding: 0 12px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 9px;
+ 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);
+}
+.connect-apps:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface)); }
+.connect-apps:active,
+.sidebar-account:active { transform: scale(.97); }
+.connect-apps-logos { display: flex; flex: none; }
+.connect-apps-logos img { width: 14px; height: 16px; padding: 1px; background: #fff; border-radius: 3px; object-fit: contain; }
+.connect-apps-logos > * + * { margin-left: -3px; }
+
+@media (prefers-reduced-motion: reduce) {
+ .connect-apps:active, .sidebar-account:active { transform: none; }
+}
+@media (prefers-reduced-transparency: reduce) {
+ .sidebar-footer-fade { background: var(--surface); inset: 0; }
+ .sidebar-footer-fade::before, .sidebar-footer-fade::after { backdrop-filter: none; -webkit-backdrop-filter: none; }
+}
diff --git a/apps/desktop/src/renderer/views/sidebar-header.css b/apps/desktop/src/renderer/views/sidebar-header.css
new file mode 100644
index 00000000..e5ebfc43
--- /dev/null
+++ b/apps/desktop/src/renderer/views/sidebar-header.css
@@ -0,0 +1,34 @@
+/* The reference uses lightly outlined circular actions, not bare toolbar glyphs. */
+.sidebar:not(.compact) .sidebar-header {
+ position: absolute;
+ z-index: 3;
+ inset: 0 0 auto;
+ isolation: isolate;
+}
+.sidebar:not(.compact) .roster {
+ padding-top: 54px;
+ scroll-padding-top: 54px;
+}
+.sidebar:not(.compact) .sidebar-header::before {
+ content: '';
+ position: absolute;
+ z-index: -1;
+ inset: 0 0 -18px;
+ pointer-events: none;
+ background: linear-gradient(to bottom, var(--surface) 50%, transparent);
+ backdrop-filter: blur(16px);
+ -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent);
+ mask-image: linear-gradient(to bottom, black 65%, transparent);
+}
+.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));
+}
+@media (prefers-reduced-transparency: reduce) {
+ .sidebar:not(.compact) .sidebar-header::before { backdrop-filter: none; }
+}
diff --git a/apps/desktop/src/renderer/views/thread/ChatSidePanel.tsx b/apps/desktop/src/renderer/views/thread/ChatSidePanel.tsx
index 0fc4be17..e3e8fe22 100644
--- a/apps/desktop/src/renderer/views/thread/ChatSidePanel.tsx
+++ b/apps/desktop/src/renderer/views/thread/ChatSidePanel.tsx
@@ -3,8 +3,7 @@ import { usePresence } from '../../components/Overlay'
/** Animate the available conversation width on both opening and closing. */
export function ChatSidePanel({ open, width, children }: { open: boolean; width: number; children: ReactNode }) {
- // A new bot mounts a fresh conversation with details already open.
- // Only subsequent open/close actions should animate the available width.
+ // Animate explicit open/close actions without animating the initial mount.
const { mounted, shown } = usePresence(open, 300, false)
const last = useRef({ width, children })
if (open) last.current = { width, children }
diff --git a/apps/desktop/src/renderer/views/thread/ThreadView.tsx b/apps/desktop/src/renderer/views/thread/ThreadView.tsx
index 83490a04..429fe10b 100644
--- a/apps/desktop/src/renderer/views/thread/ThreadView.tsx
+++ b/apps/desktop/src/renderer/views/thread/ThreadView.tsx
@@ -20,6 +20,7 @@ import { BotTemplateView } from '../bots/BotTemplateView'
import { CallView } from '../call/CallView'
import { MacChatButton } from './MacChatButton'
import './thread.css'
+import './composer.css'
import './chat-controls.css'
const WIDE = 680
@@ -36,7 +37,7 @@ export function ThreadView({ botId }: { botId: string }) {
const [openThread, setOpenThread] = useState<string | null>(null)
const [editingGroup, setEditingGroup] = useState(false)
const [templateDraft, setTemplateDraft] = useState<BotDraft | null>(null)
- const [showSettings, setShowSettings] = useState(true)
+ const [showSettings, setShowSettings] = useState(false)
const [editingDetails, setEditingDetails] = useState(false)
const [compactDetails, setCompactDetails] = useState(false)
const [calling, setCalling] = useState(false)
@@ -134,7 +135,7 @@ export function ThreadView({ botId }: { botId: string }) {
<button className={`title-pill ${calling ? 'hidden-by-call' : ''}`} inert={calling} onClick={toggleDetails} aria-label="View conversation 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(14, 'semibold'), color: 'var(--text)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{bot?.name ?? ''}</span>
+ <span style={{ ...font(13, 'medium'), color: 'var(--text)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{bot?.name ?? ''}</span>
</span>
{store.shownConnection.kind !== 'online' || store.mismatch ? <ConnectionSubtitle /> : null}
</button>
@@ -374,7 +375,7 @@ function GroupIntroCard({ group }: { group: Bot }) {
<div style={{ ...font('title2', 'semibold'), color: 'var(--text)' }}>{group.name}</div>
{group.name !== names.join(', ') ? <div style={{ ...font('subheadline'), color: 'var(--secondary)' }}>{names.join(' · ')}</div> : null}
{group.description ? <div style={{ ...font('subheadline'), color: 'var(--secondary)' }}>{group.description}</div> : null}
- <div style={{ ...font('footnote'), color: 'var(--tertiary)', paddingTop: 4, maxWidth: 360, textWrap: 'balance' }}>Everyone answers in turn. @mention a bot to ask just that one.</div>
+ <div style={{ ...font('callout'), color: 'var(--secondary)', paddingTop: 4, lineHeight: 1.5, maxWidth: 360, textWrap: 'balance' }}>Everyone answers in turn. @mention a bot to ask just that one.</div>
</div>
)
}
@@ -385,11 +386,11 @@ function IntroCard({ bot }: { bot: Bot }) {
<div className="intro-card">
<BotAvatar bot={bot} size={72} />
<div style={{ ...font('title2', 'semibold'), color: 'var(--text)' }}>{bot.name}</div>
- <div style={{ ...font('footnote', undefined, 'monospaced'), color: 'var(--tertiary)' }}>
+ <div style={{ ...font('callout'), color: 'var(--secondary)', overflowWrap: 'anywhere' }}>
{bot.managedWorkspace ? `${store.backendName(bot.backend)} · Personal workspace` : `${store.backendName(bot.backend)} in ${bot.cwd}`}
</div>
{bot.description ? <div style={{ ...font('subheadline'), color: 'var(--secondary)' }}>{bot.description}</div> : null}
- <div style={{ ...font('footnote'), color: 'var(--tertiary)', paddingTop: 4 }}>Tell it what you need. You'll get a notification when it's done or needs you.</div>
+ <div style={{ ...font('callout'), color: 'var(--secondary)', paddingTop: 4, lineHeight: 1.5 }}>Tell it what you need. You'll get a notification when it's done or needs you.</div>
</div>
)
}
diff --git a/apps/desktop/src/renderer/views/thread/composer.css b/apps/desktop/src/renderer/views/thread/composer.css
new file mode 100644
index 00000000..34ed8a1a
--- /dev/null
+++ b/apps/desktop/src/renderer/views/thread/composer.css
@@ -0,0 +1,85 @@
+.composer-add {
+ width: 25px;
+ 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);
+ display: grid;
+ place-items: center;
+ flex: none;
+ margin-bottom: calc(max(0px, (round(up, calc(var(--conversation) * 1.25), 1px) + 10px - 25px) / 2));
+}
+.composer-surface {
+ 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);
+ display: flex;
+ flex-direction: column;
+}
+.composer-box {
+ display: flex;
+ align-items: flex-end;
+ gap: 8px;
+ padding: 6px 7px;
+}
+.composer-field {
+ flex: 1;
+ min-width: 0;
+ position: relative;
+}
+.composer-box textarea,
+.composer-measure {
+ flex: 1;
+ min-width: 0;
+ font-size: var(--conversation);
+ line-height: calc(round(up, calc(var(--conversation) * 1.25), 1px));
+ padding: 5px 0;
+ color: var(--text);
+ user-select: text;
+ cursor: text;
+}
+.composer-box textarea {
+ display: block;
+ width: 100%;
+ height: calc(round(up, calc(var(--conversation) * 1.25), 1px) + 10px);
+ transition: height var(--layout);
+}
+.composer-measure {
+ position: absolute;
+ inset: 0 0 auto;
+ visibility: hidden;
+ pointer-events: none;
+ white-space: pre-wrap;
+ overflow-wrap: break-word;
+}
+.composer-reveal {
+ display: grid;
+ grid-template-rows: 0fr;
+ opacity: 0;
+ transition: grid-template-rows var(--layout), opacity var(--morph);
+}
+.composer-reveal.shown { grid-template-rows: 1fr; opacity: 1; }
+.composer-reveal > div { min-height: 0; overflow: hidden; }
+.composer-symbol {
+ grid-area: 1 / 1;
+ display: grid;
+ place-items: center;
+ opacity: 0;
+ transform: scale(0.55) rotate(-35deg);
+ transition: opacity var(--morph), transform var(--morph);
+}
+.composer-symbol.active { opacity: 1; transform: scale(1) rotate(0); }
+.composer-send {
+ width: 25px;
+ height: 25px;
+ border-radius: 999px;
+ display: grid;
+ place-items: center;
+ flex: none;
+ margin-bottom: calc(max(0px, (round(up, calc(var(--conversation) * 1.25), 1px) + 10px - 25px) / 2));
+ transition: background-color var(--morph), color var(--morph), transform var(--press);
+}
diff --git a/apps/desktop/src/renderer/views/thread/thread.css b/apps/desktop/src/renderer/views/thread/thread.css
index 8b593265..31b264fa 100644
--- a/apps/desktop/src/renderer/views/thread/thread.css
+++ b/apps/desktop/src/renderer/views/thread/thread.css
@@ -4,7 +4,7 @@
overflow: hidden;
}
.conversation {
- /* The chat reads two points larger than the chrome (ConversationTypography + 2). */
+ /* Chat text follows the selected size without an extra platform offset. */
--conversation: var(--chat);
--md-scale: var(--chat-scale);
flex: 1;
@@ -68,8 +68,9 @@
flex-direction: column;
align-items: center;
gap: 2px;
- padding: 9px 16px 9px 10px;
- background: var(--surface);
+ padding: 6px 12px 6px 8px;
+ background: var(--chrome-fill);
+ border: 1px solid var(--chrome-stroke);
border-radius: 999px;
box-shadow: 0 4px 32px rgba(0, 0, 0, 0.12);
max-width: 60%;
@@ -112,10 +113,10 @@
}
.transcript-content {
container-type: inline-size;
- max-width: 820px;
+ max-width: 1120px;
margin: 0 auto;
/* The floating title pill and composer sit over the list; messages pass underneath. */
- padding: 72px 16px var(--composer-height, 70px);
+ padding: 64px 14px var(--composer-height, 70px);
}
.load-earlier {
display: block;
@@ -129,7 +130,9 @@
display: flex;
flex-direction: column;
align-items: center;
- gap: 12px;
+ gap: 14px;
+ max-width: 440px;
+ margin: 0 auto;
padding: 0 24px;
text-align: center;
}
@@ -171,8 +174,8 @@
margin-right: 88px;
}
.bubble {
- padding: 8px 12px;
- border-radius: 22px;
+ padding: 8px 10px;
+ border-radius: 16px;
max-width: 100%;
min-width: 0;
}
@@ -180,6 +183,7 @@
background: var(--chat-user);
color: var(--text);
font-size: var(--conversation);
+ line-height: 1.5;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
@@ -260,94 +264,11 @@
display: flex;
align-items: flex-end;
gap: 8px;
- padding: 6px 16px 16px;
- max-width: 820px;
+ padding: 8px 14px 14px;
+ max-width: 1120px;
margin: 0 auto;
width: 100%;
}
-.composer-add {
- width: 28px;
- height: 28px;
- border-radius: 50%;
- background: var(--bubble-user);
- box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
- display: grid;
- place-items: center;
- flex: none;
- margin-bottom: calc(max(0px, (round(up, calc(var(--conversation) * 1.25), 1px) + 14px - 28px) / 2));
-}
-.composer-surface {
- flex: 1;
- min-width: 0;
- background: var(--bubble-user);
- border-radius: 24px;
- box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
- display: flex;
- flex-direction: column;
-}
-.composer-box {
- display: flex;
- align-items: flex-end;
- gap: 8px;
- padding: 4px 6px 4px 8px;
-}
-.composer-field {
- flex: 1;
- min-width: 0;
- position: relative;
-}
-.composer-box textarea,
-.composer-measure {
- flex: 1;
- min-width: 0;
- font-size: var(--conversation);
- line-height: calc(round(up, calc(var(--conversation) * 1.25), 1px));
- padding: 7px 0;
- color: var(--text);
- user-select: text;
- cursor: text;
-}
-.composer-box textarea {
- display: block;
- width: 100%;
- height: calc(round(up, calc(var(--conversation) * 1.25), 1px) + 14px);
- transition: height var(--layout);
-}
-.composer-measure {
- position: absolute;
- inset: 0 0 auto;
- visibility: hidden;
- pointer-events: none;
- white-space: pre-wrap;
- overflow-wrap: break-word;
-}
-.composer-reveal {
- display: grid;
- grid-template-rows: 0fr;
- opacity: 0;
- transition: grid-template-rows var(--layout), opacity var(--morph);
-}
-.composer-reveal.shown { grid-template-rows: 1fr; opacity: 1; }
-.composer-reveal > div { min-height: 0; overflow: hidden; }
-.composer-symbol {
- grid-area: 1 / 1;
- display: grid;
- place-items: center;
- opacity: 0;
- transform: scale(0.55) rotate(-35deg);
- transition: opacity var(--morph), transform var(--morph);
-}
-.composer-symbol.active { opacity: 1; transform: scale(1) rotate(0); }
-.composer-send {
- width: 28px;
- height: 28px;
- border-radius: 999px;
- display: grid;
- place-items: center;
- flex: none;
- margin-bottom: calc(max(0px, (round(up, calc(var(--conversation) * 1.25), 1px) + 14px - 28px) / 2));
- transition: background-color var(--morph), color var(--morph), transform var(--press);
-}
.symbol-swap {
animation: symbol-in var(--morph) both;
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Design/Theme.swift b/apps/ios/Kit/Sources/CodyncKit/Design/Theme.swift
index 1a5a80ae..7cdc427e 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Design/Theme.swift
+++ b/apps/ios/Kit/Sources/CodyncKit/Design/Theme.swift
@@ -31,11 +31,11 @@ public enum Palette {
public static let background = Color(light: 0xFFFFFF, dark: 0x0A0A0A)
public static let surface = Color(light: 0xF4F4F4, dark: 0x141414)
public static let bubbleAgent = Color(light: 0xF0F0F0, dark: 0x1C1C1C)
- public static let bubbleUser = Color(light: 0xE2E2E2, dark: 0x3A3A3A)
+ public static let bubbleUser = Color(light: 0xE2E2E2, dark: 0x363636)
public static let border = Color(light: 0xE6E6E6, dark: 0x262626)
public static let text = Color(light: 0x141414, dark: 0xF2F2F2)
public static let secondary = Color(light: 0x6B6B6B, dark: 0x9A9A9A)
- public static let tertiary = Color(light: 0x9B9B9B, dark: 0x6E6E6E)
+ public static let tertiary = Color(light: 0x767676, dark: 0x929292)
/// Ink used for fills (primary buttons, the send button, unread badges).
public static let accentFill = Color(light: 0x000000, dark: 0xFFFFFF)
/// Ink readable as text and tint on the background.
diff --git a/apps/ios/Kit/Sources/CodyncKit/Models/MessagePreview.swift b/apps/ios/Kit/Sources/CodyncKit/Models/MessagePreview.swift
new file mode 100644
index 00000000..e5a85cac
--- /dev/null
+++ b/apps/ios/Kit/Sources/CodyncKit/Models/MessagePreview.swift
@@ -0,0 +1,13 @@
+import Foundation
+
+/// The roster's first nonempty line, matching desktop and terminal previews.
+public enum MessagePreview {
+ public static func text(_ text: String) -> String {
+ let first = text.components(separatedBy: .newlines)
+ .map { $0.trimmingCharacters(in: .whitespaces) }
+ .first { !$0.isEmpty } ?? ""
+ return String(first.drop { "#>-* ".contains($0) })
+ .replacingOccurrences(of: "**", with: "")
+ .replacingOccurrences(of: "`", with: "")
+ }
+}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Bots/BotRow.swift b/apps/ios/Kit/Sources/CodyncUI/Bots/BotRow.swift
index ef23b8e8..f691e3ba 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Bots/BotRow.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Bots/BotRow.swift
@@ -74,12 +74,12 @@ public struct BotRow: View {
.font(.subheadline)
.foregroundStyle(Palette.secondary)
} else if bot.status == "error" {
- Text(bot.lastMessage ?? "Something went wrong")
+ Text(MessagePreview.text(bot.lastMessage ?? "Something went wrong"))
.font(.subheadline)
.foregroundStyle(Palette.danger)
.lineLimit(1)
} else {
- Text(bot.lastMessage ?? (bot.isGroup ? "\(bot.members.count) bots" : "\(model.backendName(bot.backend)) · \(bot.folderName)"))
+ Text(MessagePreview.text(bot.lastMessage ?? (bot.isGroup ? "\(bot.members.count) bots" : "\(model.backendName(bot.backend)) · \(bot.folderName)")))
.font(.subheadline)
.foregroundStyle(Palette.secondary)
.lineLimit(1)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
index e68fc4bf..57ca4aea 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift
@@ -148,7 +148,7 @@ struct UserBubble: View {
.textSelection(.enabled)
.padding(.horizontal, 16)
.padding(.vertical, 10)
- .background(Palette.bubbleUser, in: RoundedRectangle(cornerRadius: 22, style: .continuous))
+ .background(Palette.bubbleUser, in: RoundedRectangle(cornerRadius: 18, style: .continuous))
.contextActions(reactions: model.reactionPick(entry)) {
var items = [MenuItem("Copy", icon: "square.on.square") { Pasteboard.copy(entry.data.text) }]
if let reply { items.append(MenuItem("Reply in thread", icon: "arrowshape.turn.up.left", action: reply)) }
@@ -204,7 +204,7 @@ struct AgentBubble: View {
.equatable()
.padding(.horizontal, 16)
.padding(.vertical, 10)
- .background(Palette.bubbleAgent, in: RoundedRectangle(cornerRadius: 22, style: .continuous))
+ .background(Palette.bubbleAgent, in: RoundedRectangle(cornerRadius: 18, style: .continuous))
.contextActions(reactions: model.reactionPick(entry)) {
var items = [
MenuItem("Copy", icon: "square.on.square") { Pasteboard.copy(entry.data.text) },
@@ -317,7 +317,7 @@ struct WorkingIndicator: View {
}
.padding(.horizontal, 16)
.padding(.vertical, 12)
- .background(Palette.bubbleAgent, in: RoundedRectangle(cornerRadius: 22, style: .continuous))
+ .background(Palette.bubbleAgent, in: RoundedRectangle(cornerRadius: 18, style: .continuous))
}
.buttonStyle(.plain)
.disabled(thinking == nil)
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationCollectionView.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationCollectionView.swift
new file mode 100644
index 00000000..d6e1a7d6
--- /dev/null
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationCollectionView.swift
@@ -0,0 +1,99 @@
+import UIKit
+
+/// Only one owner moves the list: the reader, a jump animation, or passive end-following.
+class ConversationCollectionView: UICollectionView {
+ static let nearEnd: CGFloat = 32
+ var following = true
+ private(set) var scrollingToEnd = false
+ private var displayLink: CADisplayLink?
+ private var lastFrame: TimeInterval?
+ private var motion = ConversationScrollMotion()
+
+ var endOffset: CGFloat {
+ max(contentSize.height + adjustedContentInset.bottom - bounds.height, -adjustedContentInset.top)
+ }
+
+ override func layoutSubviews() {
+ super.layoutSubviews()
+ if following { pinToEnd() }
+ }
+
+ override func didMoveToWindow() {
+ super.didMoveToWindow()
+ if window == nil { cancelScrollingToEnd() }
+ }
+
+ func pinToEnd() {
+ // Every caller must yield to UIKit until the drag and its rubber-band return finish.
+ guard !scrollingToEnd, !isTracking, !isDragging, !isDecelerating else { return }
+ let end = endOffset
+ if abs(contentOffset.y - end) > 0.5 { contentOffset.y = end }
+ }
+
+ func followingAfterScroll(from previousOffset: CGFloat) -> Bool {
+ // Returning from overscroll moves upward too, but is not reading older messages.
+ if endOffset - contentOffset.y < Self.nearEnd { return true }
+ if contentOffset.y < previousOffset - 0.5 { return false }
+ return following
+ }
+
+ /// Called before enabling following, applying a snapshot, or updating keyboard insets.
+ func prepareToScrollToEnd(animated: Bool) {
+ if animated {
+ scrollingToEnd = true
+ // A jump can be tapped while a previous swipe is still coasting.
+ if isDecelerating { setContentOffset(contentOffset, animated: false) }
+ } else {
+ cancelScrollingToEnd()
+ }
+ }
+
+ func scrollToEnd(animated: Bool) {
+ guard animated, window != nil else {
+ cancelScrollingToEnd()
+ return pinToEnd()
+ }
+ scrollingToEnd = true
+ // Repeated requests retarget the existing motion; they never rewind or restart it.
+ guard displayLink == nil else { return }
+ motion = ConversationScrollMotion()
+ lastFrame = nil
+ let link = CADisplayLink(target: ConversationScrollFrames(self), selector: #selector(ConversationScrollFrames.tick(_:)))
+ displayLink = link
+ link.add(to: .main, forMode: .common)
+ }
+
+ func cancelScrollingToEnd() {
+ displayLink?.invalidate()
+ displayLink = nil
+ lastFrame = nil
+ scrollingToEnd = false
+ }
+
+ fileprivate func advance(_ link: CADisplayLink) {
+ guard following, !isTracking, !isDecelerating else { return cancelScrollingToEnd() }
+ // Measure only the current viewport. Do not jump offscreen to pre-size estimated rows.
+ layoutIfNeeded()
+ let elapsed = lastFrame.map { link.timestamp - $0 } ?? (link.targetTimestamp - link.timestamp)
+ lastFrame = link.timestamp
+ let target = endOffset
+ let next = motion.step(from: contentOffset.y, to: target, elapsed: elapsed)
+ UIView.performWithoutAnimation { contentOffset.y = next }
+ if motion.isSettled(at: contentOffset.y, target: endOffset) {
+ cancelScrollingToEnd()
+ pinToEnd()
+ }
+ }
+}
+
+/// The run loop retains the link, so its target must not retain the collection view.
+@MainActor private final class ConversationScrollFrames: NSObject {
+ private weak var view: ConversationCollectionView?
+
+ init(_ view: ConversationCollectionView) { self.view = view }
+
+ @objc func tick(_ link: CADisplayLink) {
+ guard let view else { return link.invalidate() }
+ view.advance(link)
+ }
+}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationList.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationList.swift
index 24e001bb..21d8c594 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationList.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationList.swift
@@ -128,25 +128,25 @@ private struct ConversationCollection: UIViewRepresentable {
let rows = parent.rows.filter { seen.insert($0.id).inserted }
contents = Dictionary(rows.map { ($0.id, $0.content) }, uniquingKeysWith: { a, _ in a })
- if let container = view.superview as? ConversationContainer, container.outsets != parent.outsets {
- // The keyboard or the composer moved: the end moves with them.
- animate(context.transaction.animation) {
- container.outsets = parent.outsets
- container.layoutIfNeeded()
- }
- }
-
- // "Jump to latest", or the reader's own message just went out.
- let sent = rows.last.map { $0.id != lastId && $0.isUserMessage } ?? false
- var jump = false
+ // Reserve the offset before any snapshot or inset update can lay out the list.
+ // Otherwise enabling following pins it to the end before the animation starts.
+ let sent = lastId != nil && (rows.last.map { $0.id != lastId && $0.isUserMessage } ?? false)
+ let jump = pending == nil && parent.following && !view.following
+ if jump || sent { view.prepareToScrollToEnd(animated: !reduceMotion) }
if let pending {
if parent.following == pending { self.pending = nil }
} else if parent.following != view.following {
view.following = parent.following
- jump = parent.following
}
if sent { setFollowing(true) }
+ if let container = view.superview as? ConversationContainer, container.outsets != parent.outsets {
+ animate(context.transaction.animation) {
+ container.outsets = parent.outsets
+ container.layoutIfNeeded()
+ }
+ }
+
let ids = rows.map(\.id)
let old = dataSource.snapshot().itemIdentifiers
var snapshot = NSDiffableDataSourceSnapshot<Int, String>()
@@ -158,7 +158,7 @@ private struct ConversationCollection: UIViewRepresentable {
let first = lastId == nil
lastId = rows.last?.id
- if old == ids || first {
+ if old == ids || first || view.scrollingToEnd || jump || sent {
dataSource.apply(snapshot, animatingDifferences: false)
} else if view.following, !reduceMotion {
// New rows pop in as the list moves up to them, in one motion (Grok Bot's
@@ -208,6 +208,7 @@ private struct ConversationCollection: UIViewRepresentable {
// MARK: scrolling
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
+ view.cancelScrollingToEnd()
lastOffset = scrollView.contentOffset.y
}
@@ -231,6 +232,7 @@ private struct ConversationCollection: UIViewRepresentable {
}
func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool {
+ view.cancelScrollingToEnd()
setFollowing(false)
return true
}
@@ -240,7 +242,6 @@ private struct ConversationCollection: UIViewRepresentable {
}
func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) {
- view.scrollingToEnd = false
if view.following { view.pinToEnd() }
}
@@ -276,59 +277,6 @@ private final class ConversationLayout: UICollectionViewCompositionalLayout {
}
}
-/// Holds the end in place: while following, every layout pass (a reply growing, a row going
-/// in, the keyboard) ends at the bottom, unless the reader has the list in hand.
-class ConversationCollectionView: UICollectionView {
- static let nearEnd: CGFloat = 32
- var following = true
- /// An animated scroll down is under way; layout leaves it alone.
- var scrollingToEnd = false
-
- var endOffset: CGFloat {
- max(contentSize.height + adjustedContentInset.bottom - bounds.height, -adjustedContentInset.top)
- }
-
- override func layoutSubviews() {
- super.layoutSubviews()
- if following { pinToEnd() }
- }
-
- func pinToEnd() {
- // Every caller must yield to UIKit until the drag and its rubber-band return finish.
- guard !scrollingToEnd, !isTracking, !isDragging, !isDecelerating else { return }
- let end = endOffset
- if abs(contentOffset.y - end) > 0.5 { contentOffset.y = end }
- }
-
- func followingAfterScroll(from previousOffset: CGFloat) -> Bool {
- // Returning from overscroll moves upward too, but is not reading older messages.
- if endOffset - contentOffset.y < Self.nearEnd { return true }
- if contentOffset.y < previousOffset - 0.5 { return false }
- return following
- }
-
- func scrollToEnd(animated: Bool) {
- guard animated, abs(contentOffset.y - endOffset) > 1 else { return pinToEnd() }
- scrollingToEnd = true
- // Rows off screen are still estimates: sized mid-scroll they make the move jerk and the
- // end snap. Size the last screen first (it shifts the end), then start at most one
- // screen above it, so every row the move crosses is already real (all before a frame draws).
- let from = contentOffset.y
- for _ in 0..<3 {
- contentOffset.y = endOffset
- layoutIfNeeded()
- }
- contentOffset.y = max(from, endOffset - bounds.height)
- layoutIfNeeded()
- let end = endOffset
- guard abs(contentOffset.y - end) > 1 else {
- scrollingToEnd = false
- return pinToEnd()
- }
- setContentOffset(CGPoint(x: contentOffset.x, y: end), animated: true)
- }
-}
-
/// Holds the list inside the safe area and lets it reach past it by `outsets`, which become
/// its content insets: rows scroll under the bars and the composer but never get a safe area
/// of their own (a row taking one as padding near an edge would resize itself as it moves).
@@ -394,4 +342,3 @@ struct JumpToLatest: View {
.animation(Motion.reduced(Motion.layout, reduceMotion), value: visible)
}
}
-
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationScrollMotion.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationScrollMotion.swift
new file mode 100644
index 00000000..2c5e0a12
--- /dev/null
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ConversationScrollMotion.swift
@@ -0,0 +1,26 @@
+import Foundation
+
+/// Critically damped motion: one continuous velocity even when self-sizing rows move the end.
+struct ConversationScrollMotion {
+ private(set) var velocity: CGFloat = 0
+
+ mutating func step(from position: CGFloat, to target: CGFloat, elapsed: TimeInterval) -> CGFloat {
+ let dt = CGFloat(min(max(elapsed, 0), 1.0 / 15))
+ let response: CGFloat = 18
+ let distance = position - target
+ let decay = exp(-response * dt)
+ let coefficient = velocity + response * distance
+ let next = target + (distance + coefficient * dt) * decay
+ velocity = (velocity - response * coefficient * dt) * decay
+ // A shrinking row can bring the end into our path. Never bounce past it.
+ if (target - position) * (target - next) <= 0 {
+ velocity = 0
+ return target
+ }
+ return next
+ }
+
+ func isSettled(at position: CGFloat, target: CGFloat) -> Bool {
+ abs(target - position) < 0.5 && abs(velocity) < 5
+ }
+}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
index 3a3f7c1d..607dceab 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
@@ -286,8 +286,8 @@ struct GroupIntroCard: View {
.multilineTextAlignment(.center)
}
Text("Everyone answers in turn. @mention a bot to ask just that one.")
- .font(.footnote)
- .foregroundStyle(Palette.tertiary)
+ .font(.subheadline)
+ .foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
.padding(.top, 4)
}
@@ -305,8 +305,8 @@ struct IntroCard: View {
CharacterAvatar(bot: bot, size: 72)
Text(bot.name).font(.title2.weight(.semibold)).foregroundStyle(Palette.text)
Text(bot.managedWorkspace ? "\(model.backendName(bot.backend)) · Personal workspace" : "\(model.backendName(bot.backend)) in \(bot.cwd)")
- .font(.footnote.monospaced())
- .foregroundStyle(Palette.tertiary)
+ .font(.subheadline)
+ .foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
if !bot.description.isEmpty {
Text(bot.description)
@@ -315,8 +315,8 @@ struct IntroCard: View {
.multilineTextAlignment(.center)
}
Text("Tell it what you need. You'll get a notification when it's done or needs you.")
- .font(.footnote)
- .foregroundStyle(Palette.tertiary)
+ .font(.subheadline)
+ .foregroundStyle(Palette.secondary)
.multilineTextAlignment(.center)
.padding(.top, 4)
}
diff --git a/apps/ios/Kit/Tests/CodyncKitTests/MessagePreviewTests.swift b/apps/ios/Kit/Tests/CodyncKitTests/MessagePreviewTests.swift
new file mode 100644
index 00000000..80fdb2a4
--- /dev/null
+++ b/apps/ios/Kit/Tests/CodyncKitTests/MessagePreviewTests.swift
@@ -0,0 +1,10 @@
+import Testing
+@testable import CodyncKit
+
+@Test func rosterPreviewsReadFormattedRepliesWithoutMarkdownMarkers() {
+ #expect(MessagePreview.text("算好了:**123 × 45 = 5,535** ✅\nDetails") == "算好了:123 × 45 = 5,535 ✅")
+ #expect(MessagePreview.text("\n > **Ready**: `my_file.ts`\r\nMore") == "Ready: my_file.ts")
+ #expect(MessagePreview.text("### Release notes") == "Release notes")
+ #expect(MessagePreview.text(" \n\t") == "")
+ #expect(MessagePreview.text("2 * 3 = 6; my_file.ts") == "2 * 3 = 6; my_file.ts")
+}
diff --git a/apps/ios/Kit/Tests/CodyncUITests/ConversationScrollTests.swift b/apps/ios/Kit/Tests/CodyncUITests/ConversationScrollTests.swift
index 61ca0995..6471ca6b 100644
--- a/apps/ios/Kit/Tests/CodyncUITests/ConversationScrollTests.swift
+++ b/apps/ios/Kit/Tests/CodyncUITests/ConversationScrollTests.swift
@@ -2,6 +2,80 @@ import Testing
import UIKit
@testable import CodyncUI
+@Test func jumpToLatestMovesForwardWithoutOvershooting() {
+ var motion = ConversationScrollMotion()
+ var position: CGFloat = 120
+ for _ in 0..<120 {
+ let next = motion.step(from: position, to: 12_000, elapsed: 1.0 / 60)
+ #expect(next >= position)
+ #expect(next <= 12_000)
+ position = next
+ }
+ #expect(motion.isSettled(at: position, target: 12_000))
+}
+
+@Test func growingReplyRetargetsAnOngoingJumpWithoutRestarting() {
+ var motion = ConversationScrollMotion()
+ var position: CGFloat = 0
+ for frame in 0..<180 {
+ let target: CGFloat = frame < 15 ? 1_000 : 1_600
+ let next = motion.step(from: position, to: target, elapsed: 1.0 / 60)
+ #expect(next >= position)
+ #expect(next <= target)
+ if frame == 15 { #expect(next - position < 100) }
+ position = next
+ }
+ #expect(motion.isSettled(at: position, target: 1_600))
+}
+
+@Test func jumpHasTheSamePaceOnStandardAndProMotionDisplays() {
+ func position(after frames: Int, rate: Double) -> CGFloat {
+ var motion = ConversationScrollMotion()
+ var position: CGFloat = 0
+ for _ in 0..<frames { position = motion.step(from: position, to: 4_000, elapsed: 1 / rate) }
+ return position
+ }
+ #expect(abs(position(after: 24, rate: 60) - position(after: 48, rate: 120)) < 0.01)
+}
+
+@Test func shrinkingContentDoesNotProduceABouncePastTheEnd() {
+ var motion = ConversationScrollMotion()
+ var position: CGFloat = 0
+ for _ in 0..<10 { position = motion.step(from: position, to: 4_000, elapsed: 1.0 / 60) }
+ let target = position + 1
+ let next = motion.step(from: position, to: target, elapsed: 1.0 / 60)
+ #expect(next <= target)
+ #expect(next >= position)
+}
+
+@MainActor @Test func layoutCannotPinTheListWhileAJumpOwnsItsOffset() {
+ let view = ConversationCollectionView(frame: CGRect(x: 0, y: 0, width: 320, height: 600),
+ collectionViewLayout: TallConversationLayout())
+ view.following = false
+ view.layoutIfNeeded()
+ view.contentOffset.y = 400
+ view.prepareToScrollToEnd(animated: true)
+ view.following = true
+ view.setNeedsLayout()
+ view.layoutIfNeeded()
+ view.pinToEnd()
+ #expect(view.contentOffset.y == 400)
+ #expect(view.scrollingToEnd)
+ view.cancelScrollingToEnd()
+ #expect(!view.scrollingToEnd)
+ view.pinToEnd()
+ #expect(view.contentOffset.y == view.endOffset)
+}
+
+@MainActor @Test func reducedMotionReleasesTheAnimationBeforePinning() {
+ let view = ConversationCollectionView(frame: CGRect(x: 0, y: 0, width: 320, height: 600),
+ collectionViewLayout: TallConversationLayout())
+ view.prepareToScrollToEnd(animated: true)
+ view.scrollToEnd(animated: false)
+ #expect(!view.scrollingToEnd)
+ #expect(view.contentOffset.y == view.endOffset)
+}
+
@MainActor @Test(arguments: ["tracking", "dragging", "decelerating"])
func bottomPinningPreservesNativeOverscrollDuringInteraction(_ phase: String) {
let view = InteractingConversationView(frame: CGRect(x: 0, y: 0, width: 320, height: 600),
diff --git a/apps/ios/WhatsNew.md b/apps/ios/WhatsNew.md
index eba39f56..288fbdd9 100644
--- a/apps/ios/WhatsNew.md
+++ b/apps/ios/WhatsNew.md
@@ -10,10 +10,16 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o
### zh-Hant
- 對話捲到底後繼續拖動時保留自然回彈,不再突然跳回底部或閃現跳至最新訊息按鈕。
+- 改善跳至最新訊息的捲動動畫,避免長對話來回跳動,並可隨時用手勢中止。
+- 調整對話氣泡與文字對比,讓閱讀更清楚。
+- 對話列表摘要不再顯示粗體與程式碼的 Markdown 符號。
### en-US
- Chats bounce naturally when dragged past the bottom, without snapping back or flashing the jump-to-latest button.
+- Smoother jumps to the latest message, without back-and-forth movement in long chats; dragging interrupts immediately.
+- Refined chat bubbles and text contrast for clearer reading.
+- Conversation previews hide bold and code formatting markers.
## 2.10.0
diff --git a/docs/design/ui-conventions.md b/docs/design/ui-conventions.md
index 6b0b5ad7..6fa70cf6 100644
--- a/docs/design/ui-conventions.md
+++ b/docs/design/ui-conventions.md
@@ -75,6 +75,10 @@ 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.
+
+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.
+
The details inspector (`apps/desktop/src/renderer/views/thread/DetailsPanel.tsx`) uses a compact device summary instead of an empty screen preview. Keep the computer name, remote-screen state, and iPhone hint together; show the hint only when screen capture is ready. Use 16-point horizontal insets and 28-point section gaps. Its sections (computer, Routines, Agent) and the Settings tab (`BotSettingsForm`: Profile, Agent, Activity, Connectors, Skills, Memory) use the `CardSection` look: filled 16-point groups without borders, hairline-split rows, a note under each option.
Routines are a compact grouped list: name, a one-line schedule (or the live run state), and an on/off switch per row; tapping a row opens the same form as +, filled in, with delete and test run beside Save. On the desktop the form card fits its content. The header's chat button asks the bot (puts "I want a routine that " in the composer); + opens the form, where When to run is a type choice and cron is typed directly. The empty state is one line of text. A saved webhook routine's form shows the public URL and key as filled monospaced rows with copy, show/hide and replace-key (confirmed) icon buttons, and one caption on how to send and that deliveries pass through the Codync cloud. Agent metadata uses Runtime and Workspace labels for personal bots, or Project folder for explicitly configured projects; project paths remain selectable and wrap. Personal workspace paths stay out of the default details UI. Keep status and section headings readable in both appearances through `Palette`.
@@ -122,3 +126,51 @@ from `apps/ios/Kit/`. Desktop UI checks use the `CODYNC_DEBUG_OPEN` and
[desktop app doc](../architecture/desktop-app.md#development). Host tests cover TUI
draft recovery, lane-specific streaming, computer settings and complete
connection-request API flows. These checks do not authenticate real third-party accounts.
+
+### Desktop app connections footer
+
+The expanded desktop roster ends in one floating row: the account avatar and a
+“Connect apps” capsule with example service logos. A masked, layered blur softens
+roster content behind it; bottom scroll padding keeps the last bot reachable. The
+compact rail exposes the same action by tooltip and accessible name. This entry
+opens the existing marketplace with Apps first, retaining agents, MCP connectors,
+skills and computer switching. Logos represent examples, not connected status.
+
+This is a desktop sidebar treatment across macOS, Linux and Windows. iOS keeps its
+native navigation and existing per-computer Marketplace entry in Settings; the TUI
+keeps its keyboard Marketplace action and connector tabs. Neither has this persistent
+desktop footer or supports the same layered backdrop material; no capabilities or
+connection permissions change.
+
+### iOS jump to latest
+
+A single display-linked motion owns the collection view offset during a requested
+jump. Reserve that ownership before updating following, snapshots or keyboard
+insets; those updates must not pin the list while the animation runs. Retarget
+the current motion as self-sizing rows change the end, without offscreen sizing
+jumps or starting overlapping insertion animations. Dragging and scroll-to-top
+cancel the jump. Reduce Motion pins directly, and passive following still holds
+the newest message at the bottom. Original scroll-edge blur remains unchanged.
+
+This repair targets UIKit's estimated row sizing and collection layout. Desktop
+uses DOM scroll geometry and the browser's smooth scrolling rather than the iOS
+pre-sizing loop; the terminal jumps by line index without animation. Their current
+follow/jump actions remain unchanged.
+
+### Desktop Grok Bot visual reference
+
+Per the requested desktop reference, use the system sans font with 13-point,
+medium-weight roster names (semibold for unread), 12-point previews and chat text
+at the selected text size, without the former extra two-point offset. The default
+sidebar is 266 points; existing custom widths and font preferences are respected.
+Reference surfaces: dark canvas #070707, sidebar #111111, capsule #181818, composer
+#2f2f2f. Search/new buttons, the title pill, Connect apps and composer use subtle
+one-point outlines. **These reference-matched desktop controls are an explicit
+exception to the filled-controls-without-borders rule.** Retain visible keyboard
+focus, computer filters, connection/error states, and original Bot artwork.
+
+The footer uses bundled Gmail, Google Calendar and Google Drive product icons
+from Google's gstatic branding assets as examples of available integrations,
+never as a connected-status indicator. The iOS native controls and terminal
+layout remain platform-specific; this desktop styling applies to the common
+Electron implementation on macOS, Linux and Windows.
diff --git a/host/src/tui/view/style.rs b/host/src/tui/view/style.rs
index 00db9938..e31254d1 100644
--- a/host/src/tui/view/style.rs
+++ b/host/src/tui/view/style.rs
@@ -73,12 +73,12 @@ pub fn theme() -> &'static Theme {
}
let (text, second, dim, line, band, sel, panel, btn, green, red, add_bg, rm_bg) = if light {
(
- 0x141414, 0x5F5F5F, 0x8E8E8E, 0xD6D6D6, 0xEFEFEF, 0xE2E2E2, 0xF7F7F7, 0xE4E4E4, 0x2E7D32, 0xC23A2B,
+ 0x141414, 0x5F5F5F, 0x767676, 0xD6D6D6, 0xEFEFEF, 0xE2E2E2, 0xF7F7F7, 0xE4E4E4, 0x2E7D32, 0xC23A2B,
0xE3F3E4, 0xF9E3E0,
)
} else {
(
- 0xF2F2F2, 0x9A9A9A, 0x6E6E6E, 0x333333, 0x1C1C1C, 0x262626, 0x141414, 0x2A2A2A, 0x8FD18B, 0xF0A7A7,
+ 0xF2F2F2, 0x9A9A9A, 0x929292, 0x333333, 0x1C1C1C, 0x262626, 0x141414, 0x2A2A2A, 0x8FD18B, 0xF0A7A7,
0x14261A, 0x2A1616,
)
};
diff --git a/host/src/tui/view/transcript.rs b/host/src/tui/view/transcript.rs
index 6a69bc81..9e7322ce 100644
--- a/host/src/tui/view/transcript.rs
+++ b/host/src/tui/view/transcript.rs
@@ -165,7 +165,7 @@ fn intro(out: &mut Built, app: &App, b: &Bot, width: usize) {
));
}
out.lines.push(Line::default());
- out.lines.extend(md::wrap(&[Span::styled(hello, t.dim)], width, &[Span::raw(" ")], &[Span::raw(" ")]));
+ out.lines.extend(md::wrap(&[Span::styled(hello, t.secondary)], width, &[Span::raw(" ")], &[Span::raw(" ")]));
}
/// One chat entry. `main`: the main chat, where a message shows its thread's replies line.