Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
feat(web): refine settings and bot details (#712)
Gustavo Ye39781e7886cd
diff --git a/src/web/src/components/community/bots/bot-activity-modal.test.ts b/src/web/src/components/community/bots/bot-activity-modal.test.tsindex f249f1699..49965dfb7 100644--- a/src/web/src/components/community/bots/bot-activity-modal.test.ts+++ b/src/web/src/components/community/bots/bot-activity-modal.test.ts@@ -138,6 +138,7 @@ describe("BotActivityModal CommunitySheet contract", () => {expect(source).not.toMatch(/>\s*Close\s*</)expect(source).not.toContain("truncate text-sm font-medium")expect(source).not.toContain("gap-1.5 text-[11px]")+ expect(source).toContain("min-h-11 rounded-md")})it("keeps loading, empty, chronological day groups, and rows in the shared body", () => {diff --git a/src/web/src/components/community/bots/bot-activity-modal.tsx b/src/web/src/components/community/bots/bot-activity-modal.tsxindex db847d3b7..93ef2e995 100644--- a/src/web/src/components/community/bots/bot-activity-modal.tsx+++ b/src/web/src/components/community/bots/bot-activity-modal.tsx@@ -193,7 +193,7 @@ export function BotActivityModal({type="button"onClick={onLoadOlder}disabled={isFetchingNextPage}- className="rounded-md px-3 py-1 font-mono text-[10px] uppercase tracking-wider text-muted-foreground/70 hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60"+ className="min-h-11 rounded-md px-3 py-1 font-mono text-[10px] uppercase tracking-wider text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60 sm:min-h-8">{isFetchingNextPage ? "Loading older" : "Load older"}</button>diff --git a/src/web/src/components/community/bots/bot-token-usage-chart.test.ts b/src/web/src/components/community/bots/bot-token-usage-chart.test.tsindex c4f77cf3d..b9c7502b8 100644--- a/src/web/src/components/community/bots/bot-token-usage-chart.test.ts+++ b/src/web/src/components/community/bots/bot-token-usage-chart.test.ts@@ -189,6 +189,16 @@ describe("BotTokenUsageHeatmap", () => {}),}const renderer = render(usage)+ const dateButtons = renderer.root.findAll((node) => (+ typeof node.props["data-testid"] === "string"+ && node.props["data-testid"].startsWith("community-bot-usage-dialog-day-bot_1-")+ ))+ expect(dateButtons[0]!.props["data-testid"]).toBe(+ "community-bot-usage-dialog-day-bot_1-2026-08-30",+ )+ expect(dateButtons[29]!.props["data-testid"]).toBe(+ "community-bot-usage-dialog-day-bot_1-2026-08-01",+ )const newest = renderer.root.findByProps({"data-testid": "community-bot-usage-dialog-day-bot_1-2026-08-30",})diff --git a/src/web/src/components/community/bots/bot-token-usage-chart.tsx b/src/web/src/components/community/bots/bot-token-usage-chart.tsxindex 6070b2eee..83519acf8 100644--- a/src/web/src/components/community/bots/bot-token-usage-chart.tsx+++ b/src/web/src/components/community/bots/bot-token-usage-chart.tsx@@ -1,6 +1,6 @@"use client"-import { useEffect, useRef, useState } from "react"+import { useEffect, useState } from "react"import {Tooltip,TooltipContent,@@ -175,7 +175,6 @@ export function BotTokenUsageHeatmap({const newestDay = usage?.capability === "supported" ? usage.days.at(-1) : undefinedconst [open, setOpen] = useState(false)const [selectedDayKey, setSelectedDayKey] = useState(newestDay?.day ?? "")- const dateRailRef = useRef<HTMLDivElement>(null)useEffect(() => {if (!newestDay || usage?.days.some((day) => day.day === selectedDayKey)) return@@ -186,11 +185,6 @@ export function BotTokenUsageHeatmap({if (breakpoint !== "mobile") setOpen(false)}, [breakpoint])- useEffect(() => {- if (!open || !dateRailRef.current) return- dateRailRef.current.scrollLeft = dateRailRef.current.scrollWidth- }, [open])-if (!usage || usage.capability !== "supported") return nullconst total = usage.days.reduce(@@ -201,6 +195,7 @@ export function BotTokenUsageHeatmap({if (breakpoint === "mobile") {const selectedDay = usage.days.find((day) => day.day === selectedDayKey) ?? newestDay+ const mobileDays = [...usage.days].reverse()return (<Dialogopen={open}@@ -231,11 +226,10 @@ export function BotTokenUsageHeatmap({<DialogDescription>Choose a date to view exact token totals.</DialogDescription></DialogHeader><div- ref={dateRailRef}data-testid={tid.botUsageDateRail(botId)}className="-mx-1 flex min-w-0 gap-2 overflow-x-auto px-1 pb-1 overscroll-x-contain thin-scrollbar scrollbar-none">- {usage.days.map((day) => {+ {mobileDays.map((day) => {const selected = day.day === selectedDay?.dayreturn (<buttondiff --git a/src/web/src/components/community/settings/field.tsx b/src/web/src/components/community/settings/field.tsxindex 7b0041280..4a40deb46 100644--- a/src/web/src/components/community/settings/field.tsx+++ b/src/web/src/components/community/settings/field.tsx@@ -3,9 +3,9 @@ import type React from "react"// Labeled form field wrapper. Local to community — distinct from `@/components/ui/field`.export function Field({ label, children }: { label: React.ReactNode; children: React.ReactNode }) {return (- <label className="block">- <div className="mb-1.5 text-xs text-muted-foreground">{label}</div>+ <fieldset className="min-w-0">+ <legend className="mb-1.5 text-xs text-muted-foreground">{label}</legend>{children}- </label>+ </fieldset>)}diff --git a/src/web/src/components/community/settings/server-settings.skeleton.test.ts b/src/web/src/components/community/settings/server-settings.skeleton.test.tsindex 6b9babf77..f74f6d9e9 100644--- a/src/web/src/components/community/settings/server-settings.skeleton.test.ts+++ b/src/web/src/components/community/settings/server-settings.skeleton.test.ts@@ -10,7 +10,7 @@ describe("SettingsMembers loading geometry", () => {expect(source).toContain('className="mx-auto flex h-full min-h-0 max-w-xl flex-col"',)- expect(source).toContain('className="mb-3 h-9 shrink-0 rounded-md"')+ expect(source).toContain('className="mb-4 h-11 shrink-0 rounded-md sm:h-9"')expect(source).toContain('className="min-h-0 flex-1 overflow-y-auto thin-scrollbar"',)diff --git a/src/web/src/components/community/settings/server-settings.tsx b/src/web/src/components/community/settings/server-settings.tsxindex 92be9ba03..13e37d352 100644--- a/src/web/src/components/community/settings/server-settings.tsx+++ b/src/web/src/components/community/settings/server-settings.tsx@@ -140,18 +140,18 @@ function SettingsOverview({ serverId, serverName, serverDescription, serverIcon,setDesc(baseline.desc)}return (- <div className="mx-auto max-w-md space-y-10">- <section className="space-y-6">+ <div className="mx-auto w-full max-w-md space-y-8">+ <section className="space-y-8">{/* Server icon — centered in a soft rounded frame + hand-rolled pill(matches My Profile; a stock secondary Button reads as the old box). */}- <div className="flex flex-col items-center gap-3">+ <div className="flex flex-col items-center gap-2"><span className="block overflow-hidden rounded-2xl ring-1 ring-border/50"><ServerIcon id={serverId} name={name} initial={avatarInitial(name)} icon={serverIcon} size={96} className="rounded-2xl" /></span><buttontype="button"onClick={onUploadIcon}- className="flex items-center gap-1.5 rounded-full border border-border/50 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"+ className="flex min-h-11 items-center gap-2 rounded-full border border-border/50 px-3 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:min-h-8"><Camera className="size-3.5" /> Change icon</button>@@ -164,34 +164,34 @@ function SettingsOverview({ serverId, serverName, serverDescription, serverIcon,placeholder="Server name"aria-label="Server name"data-testid={tid.serverSettingsName}- className="w-full border-0 bg-transparent px-0 py-1 text-2xl font-medium leading-[1.2] tracking-tight shadow-none outline-none placeholder:font-normal placeholder:text-muted-foreground/40 focus-visible:ring-0"+ className="min-h-11 w-full rounded-sm border-0 bg-transparent px-0 py-1 text-xl font-medium leading-[1.2] tracking-tight shadow-none outline-none placeholder:font-normal placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-4 focus-visible:ring-offset-background sm:text-2xl"/><SlugHint {...namePreview} /></div>{/* Description — borderless auto-resizing textarea. */}- <div>- <div className="mb-1 text-xs text-muted-foreground">Description</div>+ <div className="space-y-2">+ <div className="text-xs text-muted-foreground">Description</div><AutoResizeTextareavalue={desc}onChange={(e) => setDesc(e.target.value)}placeholder="What's this server about?"- className="w-full border-0 bg-transparent px-0 py-1 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"+ className="min-h-11 w-full rounded-sm border-0 bg-transparent px-0 py-1 text-sm leading-6 text-foreground shadow-none outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-4 focus-visible:ring-offset-background"/></div>- <div className="flex items-center justify-end gap-2">- <Button variant="ghost" size="sm" onClick={cancel} disabled={!dirty}>Cancel</Button>- <Button size="sm" onClick={save} disabled={!dirty || namePreview.invalid}>Save changes</Button>+ <div className="flex items-center justify-start gap-2">+ <Button variant="ghost" size="sm" className="h-11 sm:h-8" onClick={cancel} disabled={!dirty}>Cancel</Button>+ <Button size="sm" className="h-11 sm:h-8" onClick={save} disabled={!dirty || namePreview.invalid}>Save changes</Button></div></section>- <section className="space-y-3">- <h2 className="text-sm font-medium text-destructive">Danger Zone</h2>+ <section className="space-y-4">+ <h2 className="text-base font-medium tracking-tight text-destructive">Danger Zone</h2>{/* Unframed — the red heading + destructive button carry the signal;the extra border/box just added weight. */}- <p className="text-sm text-muted-foreground">+ <p className="text-sm leading-6 text-muted-foreground">Deleting this server is permanent and cannot be undone. All channels, messages, and members will be permanently removed.</p>- <Button variant="destructive" size="sm" onClick={onRequestDelete}><Trash2 className="size-4" /> Delete Server</Button>+ <Button variant="destructive" size="sm" className="h-11 sm:h-8" onClick={onRequestDelete}><Trash2 className="size-4" /> Delete Server</Button></section></div>)@@ -201,7 +201,7 @@ function SettingsOverview({ serverId, serverName, serverDescription, serverIcon,// row (px-2 py-2 + 32px avatar + 8px paddingBottom) is shorter than the old// bordered card. Slight over/under-estimation is fine; react-virtual// re-measures each row after mount via `measureElement`.-const SETTINGS_ROW_HEIGHT = 56+const SETTINGS_ROW_HEIGHT = 68function SettingsMembers({ members, loading, loadingMore, hasMore, total, onLoadMore, onSearch, onOpenProfile, onKickMember, onSetRole }: {members: Member[]@@ -264,17 +264,17 @@ function SettingsMembers({ members, loading, loadingMore, hasMore, total, onLoadreturn (<div className="mx-auto flex h-full min-h-0 max-w-xl flex-col">{onSearch && (- <div className="relative mb-3 shrink-0">+ <div className="relative mb-4 shrink-0"><Search className="absolute left-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" /><Input- className="h-9 pl-8"+ className="h-11 pl-8 sm:h-9"placeholder="Search members"value={query}onChange={(e) => setQuery(e.target.value)}/></div>)}- <div className="mb-3 shrink-0 text-sm text-muted-foreground">+ <div className="mb-4 shrink-0 text-sm text-muted-foreground">{query ? `${members.length} matches` : `${shownCount} members`}</div><div ref={scrollRef} className="min-h-0 flex-1 overflow-y-auto thin-scrollbar">@@ -296,7 +296,7 @@ function SettingsMembers({ members, loading, loadingMore, hasMore, total, onLoad}}><div className="flex items-center gap-3 rounded-md px-2 py-2 transition-colors hover:bg-accent/40">- <button onClick={(e) => onOpenProfile?.(m.name, e, undefined, m.userId)} className="shrink-0">+ <button onClick={(e) => onOpenProfile?.(m.name, e, undefined, m.userId)} className="grid size-11 shrink-0 place-items-center rounded-full focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:size-8"><Avatar label={m.avatar} seed={m.userId} size={32} presence={m.status} ringColor="var(--background)" /></button><div className="min-w-0 flex-1">@@ -308,7 +308,7 @@ function SettingsMembers({ members, loading, loadingMore, hasMore, total, onLoad) : (<DropdownMenu><DropdownMenuTrigger- render={<button className={badgeVariants({ variant: "secondary" }) + " cursor-pointer gap-1"} />}+ render={<button className={badgeVariants({ variant: "secondary" }) + " min-h-11 cursor-pointer gap-1 sm:min-h-6"} />}><Shield className="size-3.5" /> {capitalize(m.role)}</DropdownMenuTrigger>@@ -320,7 +320,7 @@ function SettingsMembers({ members, loading, loadingMore, hasMore, total, onLoad</DropdownMenu>)}{m.role !== "owner" && (- <Button variant="ghost" size="icon-sm" className="text-muted-foreground hover:text-destructive" aria-label="Kick member" onClick={() => onKickMember?.(m.id)}><Trash2 className="size-4" /></Button>+ <Button variant="ghost" size="icon-sm" className="size-11 text-muted-foreground hover:text-destructive sm:size-7" aria-label="Kick member" onClick={() => onKickMember?.(m.id)}><Trash2 className="size-4" /></Button>)}</div></div>@@ -357,8 +357,8 @@ function SettingsInvites({ invites, loading, onRevokeInvite, onCopyInvite }: {<div data-testid={tid.inviteToken} className="truncate font-mono text-sm">{iv.code}</div><div className="text-xs text-muted-foreground" suppressHydrationWarning>by {iv.by} · {iv.uses}{iv.maxUses ? ` / ${iv.maxUses}` : ""} uses · {iv.expiresAt ? `expires ${formatRelativeTime(iv.expiresAt)}` : "never expires"}</div></div>- <Button variant="secondary" size="sm" data-testid={tid.inviteCopy} onClick={() => onCopyInvite?.(iv.code)}>Copy</Button>- <Button variant="ghost" size="icon-sm" className="text-muted-foreground hover:text-destructive" aria-label="Revoke invite" onClick={() => setRevokingCode(iv.code)}><X className="size-4" /></Button>+ <Button variant="secondary" size="sm" className="h-11 sm:h-8" data-testid={tid.inviteCopy} onClick={() => onCopyInvite?.(iv.code)}>Copy</Button>+ <Button variant="ghost" size="icon-sm" className="size-11 text-muted-foreground hover:text-destructive sm:size-8" aria-label="Revoke invite" onClick={() => setRevokingCode(iv.code)}><X className="size-4" /></Button></div>))}<ConfirmDialog@@ -400,9 +400,9 @@ export function SettingsNotifications({ serverId, level, onSetLevel }: { serverI<div className="mb-3 text-sm text-muted-foreground">Default notifications for this server</div>{bots.length > 0 && (<div className="mb-4 flex flex-wrap gap-1" aria-label="Notification actor">- <Button size="sm" variant={botId === null ? "secondary" : "ghost"} onClick={() => setBotId(null)}>You</Button>+ <Button size="sm" className="h-11 sm:h-8" variant={botId === null ? "secondary" : "ghost"} onClick={() => setBotId(null)}>You</Button>{bots.map((bot) => (- <Button key={bot.id} size="sm" variant={botId === bot.id ? "secondary" : "ghost"} onClick={() => setBotId(bot.id)}>{bot.name}</Button>+ <Button key={bot.id} size="sm" className="h-11 sm:h-8" variant={botId === bot.id ? "secondary" : "ghost"} onClick={() => setBotId(bot.id)}>{bot.name}</Button>))}</div>)}@@ -414,7 +414,7 @@ export function SettingsNotifications({ serverId, level, onSetLevel }: { serverIkey={l.value}onClick={() => update(l.value, l.raw)}disabled={Boolean(botId && (botSetting.isLoading || botSetting.isError || setBotSetting.isPending))}- className={`flex w-full items-center gap-3 rounded-md px-2 py-2 text-left transition-colors disabled:opacity-50 ${selectedLevel === l.value ? "bg-accent" : "hover:bg-accent/40"}`}+ className={`flex min-h-11 w-full items-center gap-3 rounded-md px-2 py-2 text-left transition-colors disabled:opacity-50 ${selectedLevel === l.value ? "bg-accent" : "hover:bg-accent/40"}`}><span className={`grid size-4 shrink-0 place-items-center rounded-full border ${selectedLevel === l.value ? "border-primary" : "border-muted-foreground"}`}>{selectedLevel === l.value && <span className="size-2 rounded-full bg-primary" />}@@ -435,19 +435,19 @@ export function SettingsNotifications({ serverId, level, onSetLevel }: { serverIfunction SettingsMembersSkeleton({ showSearch }: { showSearch: boolean }) {return (<div className="mx-auto flex h-full min-h-0 max-w-xl flex-col">- {showSearch && <Skeleton className="mb-3 h-9 shrink-0 rounded-md" />}- <Skeleton className="mb-3 h-4 w-24 shrink-0 rounded" />+ {showSearch && <Skeleton className="mb-4 h-11 shrink-0 rounded-md sm:h-9" />}+ <Skeleton className="mb-4 h-4 w-24 shrink-0 rounded" /><div className="min-h-0 flex-1 overflow-y-auto thin-scrollbar"><div className="space-y-2">{Array.from({ length: 5 }).map((_, i) => (<div key={i} className="flex items-center gap-3 rounded-md px-2 py-2">- <Skeleton className="size-8 shrink-0 rounded-full" />+ <Skeleton className="size-11 shrink-0 rounded-full sm:size-8" /><div className="flex min-w-0 flex-1 flex-col gap-2"><Skeleton className="h-4 w-2/5 rounded" /><Skeleton className="h-3 w-16 rounded" /></div>- <Skeleton className="h-6 w-16 rounded-full" />- <Skeleton className="size-7 shrink-0 rounded-md" />+ <Skeleton className="h-11 w-16 rounded-full sm:h-6" />+ <Skeleton className="size-11 shrink-0 rounded-md sm:size-7" /></div>))}</div>diff --git a/src/web/src/components/community/settings/settings-navigation.test.ts b/src/web/src/components/community/settings/settings-navigation.test.tsindex e400bcd99..60ff88810 100644--- a/src/web/src/components/community/settings/settings-navigation.test.ts+++ b/src/web/src/components/community/settings/settings-navigation.test.ts@@ -10,25 +10,27 @@ import {describe("responsive settings navigation", () => {it("uses a top tab strip on mobile and the compact left rail on desktop", () => {- expect(SETTINGS_NAV_CLASS).toContain("border-b")expect(SETTINGS_NAV_CLASS).toContain("sm:w-44")expect(SETTINGS_NAV_CLASS).not.toContain("w-60")- expect(SETTINGS_NAV_CLASS).toContain("sm:border-r")- expect(SETTINGS_NAV_CLASS).toContain("sm:p-3")- expect(SETTINGS_TABS_LIST_CLASS).toContain("overflow-x-auto")- expect(SETTINGS_TABS_LIST_CLASS).toContain("thin-scrollbar")+ expect(SETTINGS_NAV_CLASS).not.toContain("border-b")+ expect(SETTINGS_NAV_CLASS).not.toContain("sm:border-r")+ expect(SETTINGS_NAV_CLASS).toContain("sm:p-4")+ expect(SETTINGS_TABS_LIST_CLASS).toContain("overflow-hidden")+ expect(SETTINGS_TABS_LIST_CLASS).not.toContain("overflow-x-auto")+ expect(SETTINGS_TABS_LIST_CLASS).toContain("justify-start")+ expect(SETTINGS_TABS_LIST_CLASS).toContain("p-0")expect(SETTINGS_TABS_LIST_CLASS).toContain("group-data-horizontal/tabs:h-11")expect(SETTINGS_TABS_LIST_CLASS).toContain("sm:flex-col")- expect(SETTINGS_TAB_CLASS).toContain("h-11")- expect(SETTINGS_TAB_CLASS).toContain("sm:h-8")+ expect(SETTINGS_TAB_CLASS).toContain("size-11")+ expect(SETTINGS_TAB_CLASS).toContain("sm:h-9")expect(SETTINGS_TAB_CLASS).toContain("sm:w-full")- expect(SETTINGS_TAB_CLASS).not.toContain("px-0")- expect(SETTINGS_NAV_LABEL_CLASS).toContain("max-w-24")+ expect(SETTINGS_TAB_CLASS).toContain("px-0")+ expect(SETTINGS_NAV_LABEL_CLASS).toContain("sr-only")+ expect(SETTINGS_NAV_LABEL_CLASS).toContain("sm:not-sr-only")expect(SETTINGS_NAV_LABEL_CLASS).toContain("truncate")- expect(SETTINGS_NAV_LABEL_CLASS).not.toContain("hidden")- expect(SETTINGS_NAV_FOOTER_CLASS).toContain("border-l")- expect(SETTINGS_NAV_FOOTER_CLASS).toContain("sm:border-t")- expect(SETTINGS_LOGOUT_CLASS).toContain("h-11")+ expect(SETTINGS_NAV_FOOTER_CLASS).not.toContain("border")+ expect(SETTINGS_LOGOUT_CLASS).toContain("size-11")+ expect(SETTINGS_LOGOUT_CLASS).toContain("sm:h-9")expect(SETTINGS_LOGOUT_CLASS).not.toContain("px-0")})})diff --git a/src/web/src/components/community/settings/settings-navigation.ts b/src/web/src/components/community/settings/settings-navigation.tsindex 40a29dcfa..59470a525 100644--- a/src/web/src/components/community/settings/settings-navigation.ts+++ b/src/web/src/components/community/settings/settings-navigation.ts@@ -1,17 +1,17 @@export const SETTINGS_NAV_CLASS =- "col-start-1 row-start-2 flex min-w-0 items-center gap-1 border-b border-border px-2 thin-scrollbar sm:row-span-2 sm:row-start-1 sm:w-44 sm:flex-col sm:items-stretch sm:gap-2 sm:overflow-y-auto sm:border-r sm:border-b-0 sm:p-3"+ "col-start-1 row-start-2 flex min-w-0 items-center gap-1 px-2 thin-scrollbar sm:row-span-2 sm:row-start-1 sm:w-44 sm:flex-col sm:items-stretch sm:gap-2 sm:overflow-y-auto sm:p-4"export const SETTINGS_TABS_LIST_CLASS =- "h-auto min-w-0 flex-1 flex-row gap-1 overflow-x-auto overflow-y-hidden thin-scrollbar group-data-horizontal/tabs:h-11 sm:w-full sm:flex-none sm:flex-col sm:overflow-x-hidden"+ "h-11 min-w-0 flex-1 flex-row justify-start gap-1 overflow-hidden p-0 group-data-horizontal/tabs:h-11 sm:h-auto sm:w-full sm:flex-none sm:flex-col"export const SETTINGS_TAB_CLASS =- "h-11 w-auto justify-center gap-2 sm:h-8 sm:w-full sm:justify-start"+ "size-11 justify-center gap-2 px-0 sm:h-9 sm:w-full sm:justify-start sm:px-2"export const SETTINGS_NAV_LABEL_CLASS =- "max-w-24 shrink-0 truncate px-2 text-xs font-semibold text-muted-foreground sm:max-w-none"+ "sr-only sm:not-sr-only sm:min-w-0 sm:truncate sm:px-2 sm:pt-1 sm:text-xs sm:font-medium sm:text-muted-foreground"export const SETTINGS_LOGOUT_CLASS =- "h-11 shrink-0 justify-start text-destructive hover:text-destructive sm:h-8 sm:w-full"+ "size-11 shrink-0 justify-center text-destructive hover:text-destructive sm:h-9 sm:w-full sm:justify-start"export const SETTINGS_NAV_FOOTER_CLASS =- "shrink-0 border-l border-border pl-1 sm:mt-auto sm:w-full sm:border-t sm:border-l-0 sm:pt-2 sm:pl-0"+ "shrink-0 sm:mt-auto sm:w-full sm:pt-2"diff --git a/src/web/src/components/community/settings/settings-refinement.contract.test.ts b/src/web/src/components/community/settings/settings-refinement.contract.test.tsnew file mode 100644index 000000000..fe2cdda91--- /dev/null+++ b/src/web/src/components/community/settings/settings-refinement.contract.test.ts@@ -0,0 +1,65 @@+import { readFileSync } from "node:fs"+import { dirname, resolve } from "node:path"+import { fileURLToPath } from "node:url"+import { describe, expect, it } from "vitest"++const settingsDirectory = dirname(fileURLToPath(import.meta.url))+const readSettings = (file: string) => readFileSync(resolve(settingsDirectory, file), "utf8")++describe("settings refinement", () => {+ it("shows only the injected Web version as quiet Advanced footer metadata", () => {+ const source = readSettings("user-settings.tsx")++ expect(source).toContain("process.env.NEXT_PUBLIC_APP_VERSION")+ expect(source).toContain("data-testid={tid.settingsWebVersion}")+ expect(source).toContain("Web v{webVersion}")+ expect(source).toContain("font-mono text-xs tabular-nums")+ expect(source).toContain("{webVersion ? (")+ })++ it("uses one frameless rhythm and mobile-safe controls in User and Server settings", () => {+ const user = readSettings("user-settings.tsx")+ const server = readSettings("server-settings.tsx")++ expect(user).toContain("max-w-md space-y-8")+ expect(server).toContain("max-w-md space-y-8")+ expect(user).toContain('className="h-11 sm:h-8"')+ expect(server).toContain('className="h-11 sm:h-8"')+ expect(user).toContain("rounded-xl bg-muted/60 p-1")+ expect(user).not.toContain("rounded-lg border p-4")+ })++ it("keeps form actions on the content axis and preserves focus and readable contrast", () => {+ const user = readSettings("user-settings.tsx")+ const server = readSettings("server-settings.tsx")++ for (const source of [user, server]) {+ expect(source).toContain("items-center justify-start gap-2")+ expect(source).not.toContain("items-center justify-end gap-2")+ expect(source).toContain("focus-visible:ring-2")+ expect(source).not.toContain("placeholder:text-muted-foreground/40")+ expect(source).not.toContain("focus-visible:ring-0")+ }+ expect(user).not.toContain("text-muted-foreground/60\">Set a status")+ expect(user).not.toContain("text-muted-foreground/70")+ })++ it("keeps settings and log controls at least 44px tall on mobile", () => {+ const server = readSettings("server-settings.tsx")+ const activity = readFileSync(resolve(settingsDirectory, "../bots/bot-activity-modal.tsx"), "utf8")+ const confirm = readFileSync(resolve(settingsDirectory, "../../ui/confirm-dialog.tsx"), "utf8")++ expect(server).toContain("grid size-11 shrink-0")+ expect(server).toContain("size-11 text-muted-foreground hover:text-destructive")+ expect(activity).toContain("min-h-11 rounded-md")+ expect(confirm.match(/className="h-11 sm:h-7"/g)).toHaveLength(2)+ })++ it("labels the theme choices as a semantic group without merging button names", () => {+ const field = readSettings("field.tsx")++ expect(field).toContain('<fieldset className="min-w-0">')+ expect(field).toContain('<legend className="mb-1.5 text-xs text-muted-foreground">')+ expect(field).not.toContain('<label className="block">')+ })+})diff --git a/src/web/src/components/community/settings/settings-shell.contract.test.ts b/src/web/src/components/community/settings/settings-shell.contract.test.tsindex 69641f420..4df4a320c 100644--- a/src/web/src/components/community/settings/settings-shell.contract.test.ts+++ b/src/web/src/components/community/settings/settings-shell.contract.test.ts@@ -12,13 +12,16 @@ describe("shared settings shell", () => {expect(source).toContain("useBreakpoint()")expect(source).toContain('breakpoint === "mobile" ? "horizontal" : "vertical"')- expect(source).toContain("grid-rows-[3rem_auto_minmax(0,1fr)]")+ expect(source).toContain("grid-rows-[4rem_auto_minmax(0,1fr)]")expect(source).toContain("sm:grid-cols-[11rem_minmax(0,1fr)]")+ expect(source).toContain("sm:grid-rows-[4rem_minmax(0,1fr)]")expect(source).toContain("data-testid={tid.settingsNav}")expect(source).toContain("data-testid={tid.settingsContent}")expect(source).toContain("data-testid={tid.settingsClose}")expect(source).toContain("data-testid={tid.settingsLabel}")expect(source).toContain('className="size-11 sm:size-8"')+ expect(source).toContain("sm:p-8 sm:pt-4")+ expect(source).not.toContain("items-center border-b border-border")expect(source).toContain("<TabsContent {...props} keepMounted />")})diff --git a/src/web/src/components/community/settings/settings-shell.tsx b/src/web/src/components/community/settings/settings-shell.tsxindex b446058d9..65c06a709 100644--- a/src/web/src/components/community/settings/settings-shell.tsx+++ b/src/web/src/components/community/settings/settings-shell.tsx@@ -53,11 +53,11 @@ export function SettingsShell<Value extends string>({orientation={breakpoint === "mobile" ? "horizontal" : "vertical"}value={value}onValueChange={(nextValue) => onValueChange(nextValue as Value)}- className="grid min-h-0 flex-1 grid-cols-1 grid-rows-[3rem_auto_minmax(0,1fr)] gap-0 sm:grid-cols-[11rem_minmax(0,1fr)] sm:grid-rows-[3rem_minmax(0,1fr)]"+ className="grid min-h-0 flex-1 grid-cols-1 grid-rows-[4rem_auto_minmax(0,1fr)] gap-0 sm:grid-cols-[11rem_minmax(0,1fr)] sm:grid-rows-[4rem_minmax(0,1fr)]"data-testid={tid.settingsShell}>- <header className="col-start-1 row-start-1 flex h-12 min-w-0 items-center border-b border-border px-4 sm:col-start-2">- <h1 className="min-w-0 flex-1 truncate text-lg font-semibold">{title}</h1>+ <header className="col-start-1 row-start-1 flex h-16 min-w-0 items-center px-4 sm:col-start-2 sm:px-8">+ <h1 className="min-w-0 flex-1 truncate text-lg font-medium tracking-tight">{title}</h1><Buttonvariant="ghost"size="icon-sm"@@ -84,7 +84,8 @@ export function SettingsShell<Value extends string>({className={SETTINGS_TAB_CLASS}data-testid={tid.settingsTab(tabValue)}>- <Icon className="size-4" /> {tabLabel}+ <Icon className="size-4" />+ <span className="sr-only sm:not-sr-only">{tabLabel}</span></TabsTrigger>))}</TabsList>@@ -94,7 +95,7 @@ export function SettingsShell<Value extends string>({</nav><div- className="col-start-1 row-start-3 min-h-0 min-w-0 overflow-y-auto bg-background p-4 thin-scrollbar sm:col-start-2 sm:row-start-2"+ className="col-start-1 row-start-3 min-h-0 min-w-0 overflow-y-auto bg-background px-4 pt-2 pb-4 thin-scrollbar sm:col-start-2 sm:row-start-2 sm:p-8 sm:pt-4"data-testid={tid.settingsContent}>{children}diff --git a/src/web/src/components/community/settings/user-settings.tsx b/src/web/src/components/community/settings/user-settings.tsxindex d62830b4b..58b6c977a 100644--- a/src/web/src/components/community/settings/user-settings.tsx+++ b/src/web/src/components/community/settings/user-settings.tsx@@ -9,6 +9,7 @@ import { Button } from "@/components/ui/button"import { AutoResizeTextarea } from "@/components/ui/auto-resize-textarea"import { ConfirmDialog } from "@/components/ui/confirm-dialog"import { clearPersistedCache } from "@/lib/query-persister"+import { tid } from "@/lib/community/testids"import { Avatar } from "../avatar"import { Field } from "./field"import { StatusEditor, hasStatus } from "../social/status-editor"@@ -36,9 +37,9 @@ function AppearanceSettings() {const active = mounted ? theme ?? "system" : undefinedreturn (- <div className="mx-auto max-w-md space-y-4">+ <div className="mx-auto w-full max-w-md space-y-4"><Field label="Theme">- <div className="grid grid-cols-3 gap-2">+ <div className="grid grid-cols-3 gap-1 rounded-xl bg-muted/60 p-1">{THEME_OPTIONS.map(({ value, label, icon: Icon }) => {const selected = active === valuereturn (@@ -47,10 +48,10 @@ function AppearanceSettings() {onClick={() => setTheme(value)}aria-pressed={selected}className={[- "flex flex-col items-center gap-2 rounded-lg border p-4 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",+ "flex min-h-16 flex-col items-center justify-center gap-2 rounded-lg px-2 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",selected- ? "border-primary bg-accent text-foreground"- : "border-border text-muted-foreground hover:bg-accent hover:text-foreground",+ ? "bg-background text-foreground shadow-(--e1)"+ : "text-muted-foreground hover:bg-background/60 hover:text-foreground",].join(" ")}><Icon className="size-5" />@@ -71,6 +72,7 @@ function AppearanceSettings() {function AdvancedSettings({ userId }: { userId: string | null }) {const [confirmOpen, setConfirmOpen] = useState(false)const [clearing, setClearing] = useState(false)+ const webVersion = process.env.NEXT_PUBLIC_APP_VERSIONreturn (<><ConfirmDialog@@ -96,10 +98,10 @@ function AdvancedSettings({ userId }: { userId: string | null }) {}}}/>- <div className="mx-auto max-w-md space-y-6">- <div>- <div className="text-sm font-medium">Clear local cache</div>- <p className="mt-1 text-xs text-muted-foreground">+ <div className="mx-auto flex min-h-full w-full max-w-md flex-col">+ <section className="space-y-2">+ <h2 className="text-base font-medium tracking-tight">Clear local cache</h2>+ <p className="max-w-[65ch] text-sm leading-6 text-muted-foreground">Removes the locally persisted message history and read-state storedin this browser. The next channel or DM you open will refetch fromthe server. Nothing on the server is deleted.@@ -107,12 +109,20 @@ function AdvancedSettings({ userId }: { userId: string | null }) {<Buttonvariant="destructive"size="sm"- className="mt-3"+ className="mt-2 h-11 sm:h-8"onClick={() => setConfirmOpen(true)}>Clear local cache</Button>- </div>+ </section>+ {webVersion ? (+ <footer+ data-testid={tid.settingsWebVersion}+ className="mt-auto pt-8 font-mono text-xs tabular-nums text-muted-foreground"+ >+ Web v{webVersion}+ </footer>+ ) : null}</div></>)@@ -182,24 +192,24 @@ export function UserSettings({ onClose, userId, userName, aboutMe, avatar, statutabs={USER_SETTINGS_TABS}onClose={onClose}navFooter={- <Button variant="ghost" className={SETTINGS_LOGOUT_CLASS} size="sm" onClick={onLogout}>- <LogOut className="size-4" /> Log Out+ <Button variant="ghost" className={SETTINGS_LOGOUT_CLASS} size="sm" onClick={onLogout} aria-label="Log out">+ <LogOut className="size-4" /> <span className="sr-only sm:not-sr-only">Log Out</span></Button>}><SettingsShellPanel value="profile">- <div className="mx-auto max-w-md space-y-6">+ <div className="mx-auto w-full max-w-md space-y-8">{/* Avatar — centered in a soft rounded frame, with a hand-rolledpill button beneath (matches the bot create/edit sheet; a stocksecondary Button reads as the old square style). */}- <div className="flex flex-col items-center gap-3">+ <div className="flex flex-col items-center gap-2"><span className="block size-24 overflow-hidden rounded-full ring-1 ring-border/50"><Avatar label={avatar} seed={userId ?? undefined} size={96} /></span><buttontype="button"onClick={onUploadAvatar}- className="flex items-center gap-1.5 rounded-full border border-border/50 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"+ className="flex min-h-11 items-center gap-2 rounded-full border border-border/50 px-3 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:min-h-8"><Camera className="size-3.5" /> Change photo</button>@@ -211,42 +221,42 @@ export function UserSettings({ onClose, userId, userName, aboutMe, avatar, statuonChange={(e) => setName(e.target.value)}placeholder="Your name"aria-label="Display name"- className="w-full border-0 bg-transparent px-0 py-1 text-2xl font-medium leading-[1.2] tracking-tight shadow-none outline-none placeholder:font-normal placeholder:text-muted-foreground/40 focus-visible:ring-0"+ className="min-h-11 w-full rounded-sm border-0 bg-transparent px-0 py-1 text-xl font-medium leading-[1.2] tracking-tight shadow-none outline-none placeholder:font-normal placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-4 focus-visible:ring-offset-background sm:text-2xl"/>{/* About — borderless auto-resizing textarea. */}- <div>- <div className="mb-1 text-xs text-muted-foreground">About</div>+ <div className="space-y-2">+ <div className="text-xs text-muted-foreground">About</div><AutoResizeTextareavalue={value}onChange={(e) => setValue(e.target.value)}placeholder="Add a bit about yourself…"- className="w-full border-0 bg-transparent px-0 py-1 text-sm text-foreground shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"+ className="min-h-11 w-full rounded-sm border-0 bg-transparent px-0 py-1 text-sm leading-6 text-foreground shadow-none outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-4 focus-visible:ring-offset-background"/></div>{/* Status — quiet label + a soft chip (more formed than a bareborderless button, still in the frameless language). */}- <div>- <div className="mb-1 text-xs text-muted-foreground">Status</div>+ <div className="space-y-2">+ <div className="text-xs text-muted-foreground">Status</div><StatusEditor emoji={status.emoji} text={status.text} onChange={(emoji, text) => setStatus({ emoji, text })}>- <button className="inline-flex items-center gap-1.5 rounded-full border border-border/50 px-3 py-1.5 text-sm transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none">+ <button className="inline-flex min-h-11 items-center gap-2 rounded-full border border-border/50 px-3 text-sm transition-colors hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:min-h-8">{hasStatus(status.emoji, status.text) ? (<span>{status.emoji} {status.text}</span>) : (- <span className="text-muted-foreground/60">Set a status</span>+ <span className="text-muted-foreground">Set a status</span>)}</button></StatusEditor></div>- <div className="flex items-center justify-end gap-2 pt-2">- <Button variant="ghost" size="sm" onClick={handleCancel} disabled={!dirty}>Cancel</Button>- <Button size="sm" onClick={handleSave} disabled={!dirty}>Save changes</Button>+ <div className="flex items-center justify-start gap-2">+ <Button variant="ghost" size="sm" className="h-11 sm:h-8" onClick={handleCancel} disabled={!dirty}>Cancel</Button>+ <Button size="sm" className="h-11 sm:h-8" onClick={handleSave} disabled={!dirty}>Save changes</Button></div></div></SettingsShellPanel><SettingsShellPanel value="appearance"><AppearanceSettings /></SettingsShellPanel>- <SettingsShellPanel value="advanced">+ <SettingsShellPanel value="advanced" className="h-full"><AdvancedSettings userId={userId} /></SettingsShellPanel></SettingsShell>diff --git a/src/web/src/components/community/social/bot-mark-sticker.test.ts b/src/web/src/components/community/social/bot-mark-sticker.test.tsindex 3287bb8a0..f08da90c3 100644--- a/src/web/src/components/community/social/bot-mark-sticker.test.ts+++ b/src/web/src/components/community/social/bot-mark-sticker.test.ts@@ -119,6 +119,9 @@ describe("BotMarkSticker", () => {expect(title.props.className).toContain("font-bold")expect(title.props.className).toContain("font-brand")const activityTab = renderer.root.findByProps({ role: "tab", "aria-selected": true })+ const tablist = renderer.root.findByProps({ role: "tablist" })+ expect(tablist.props.className).toContain("h-12")+ expect(activityTab.props.className).toContain("h-11")expect(activityTab.children).toContainEqual(expect.objectContaining({ type: "activity-icon" }))expect(JSON.stringify(renderer.toJSON())).toContain("Recent activity")expect(JSON.stringify(renderer.toJSON())).toContain("Ready when you are")@@ -145,6 +148,7 @@ describe("BotMarkSticker", () => {})expect(loadMore.type).toBe("button")expect(loadMore.children).toContain("Load more")+ expect(loadMore.props.className).toContain("min-h-11")expect(loadMore.props.className).not.toContain("border")expect(loadMore.props.className).not.toContain("shadow")expect(loadMore.props.className).toContain("hover:bg-black/10")@@ -288,11 +292,13 @@ describe("BotMarkSticker", () => {expect(overflow.findByProps({ className: "sr-only" }).children).toEqual(["More marked work"])expect(renderer.root.findAllByType("square-icon")).toHaveLength(3)const location = renderer.root.findAllByProps({ title: "Alook · #planning" })[0]!+ expect(location.props.className).toContain("w-fit")+ expect(location.props.className).toContain("max-w-full")const locationParts = location.findAllByType("span")- expect(locationParts[0]?.props.className).toContain("flex-1")+ expect(locationParts[0]?.props.className).not.toContain("flex-1")expect(locationParts[0]?.props.className).toContain("truncate")expect(locationParts[1]?.props.className).toBe("shrink-0")- expect(locationParts[2]?.props.className).toContain("flex-1")+ expect(locationParts[2]?.props.className).not.toContain("flex-1")expect(locationParts[2]?.props.className).toContain("truncate")})@@ -310,7 +316,7 @@ describe("BotMarkSticker", () => {})const parts = location.findAllByType("span")expect(parts[0]?.props.className).toBe("shrink-0")- expect(parts[2]?.props.className).toContain("flex-1")+ expect(parts[2]?.props.className).not.toContain("flex-1")expect(parts[2]?.props.className).toContain("truncate")})@@ -341,6 +347,7 @@ describe("BotMarkSticker", () => {expect(stop.props.disabled).toBe(false)expect(stop.props.className).toContain("bg-[#dc2626]")expect(stop.props.className).toContain("text-white")+ expect(stop.props.className).toContain("min-h-11")const activeRow = renderer.root.findByProps({"data-testid": "community-bot-audit-preview-active",})diff --git a/src/web/src/components/community/social/bot-mark-sticker.tsx b/src/web/src/components/community/social/bot-mark-sticker.tsxindex fc06d5daa..70ed9fd7c 100644--- a/src/web/src/components/community/social/bot-mark-sticker.tsx+++ b/src/web/src/components/community/social/bot-mark-sticker.tsx@@ -20,7 +20,7 @@ type StickerView = "activity" | "marks"function stickerTabClass(selected: boolean): string {return [- "flex h-8 min-w-0 flex-1 items-center justify-center gap-1.5 rounded-[10px] px-2 text-xs font-medium text-[#4b3712] hover:text-black active:bg-[#dfb95d] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:outline-none dark:active:bg-[#b18432]",+ "flex h-11 min-w-0 flex-1 items-center justify-center gap-1.5 rounded-[10px] px-2 text-xs font-medium text-[#4b3712] hover:text-black active:bg-[#dfb95d] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:outline-none sm:h-8 dark:active:bg-[#b18432]",selected? "bg-[#dfb75b] text-[#342a18] shadow-[inset_0_2px_4px_rgba(91,60,10,0.2),inset_0_-1px_0_#f3d989] dark:bg-[#b2822a]": "",@@ -114,7 +114,7 @@ export function BotMarkSticker({</span></header>- <div role="tablist" aria-label="Bot log view" className="mx-3 mb-1 flex h-9 shrink-0 items-center gap-1 rounded-xl bg-[#e8c56f] p-0.5 shadow-[inset_0_1px_3px_rgba(98,67,11,0.14)] dark:bg-[#bd913b]">+ <div role="tablist" aria-label="Bot log view" className="mx-3 mb-1 flex h-12 shrink-0 items-center gap-1 rounded-xl bg-[#e8c56f] p-0.5 shadow-[inset_0_1px_3px_rgba(98,67,11,0.14)] sm:h-9 dark:bg-[#bd913b]"><buttontype="button"role="tab"@@ -159,7 +159,7 @@ export function BotMarkSticker({type="button"onClick={onOpenActivity}aria-label="Load more activity in the full audit log"- className="absolute right-2 top-2 z-10 flex h-6 items-center gap-0.5 rounded-lg px-2 text-[10px] font-semibold text-[#342a18] transition-colors hover:bg-black/10 active:bg-black/15 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"+ className="absolute right-2 top-0 z-10 flex min-h-11 items-center gap-0.5 rounded-lg px-2 text-[10px] font-semibold text-[#342a18] transition-colors hover:bg-black/10 active:bg-black/15 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:top-2 sm:min-h-6">Load more<ChevronRight className="size-3" aria-hidden />@@ -167,7 +167,7 @@ export function BotMarkSticker({<divref={activityScrollRef}data-testid={tid.botAuditPreviewScroll}- className="thin-scrollbar bot-note-scrollbar mt-8 min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain"+ className="thin-scrollbar bot-note-scrollbar mt-12 min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain sm:mt-8"><divref={activityBottomAnchorRef}@@ -223,9 +223,9 @@ export function BotMarkSticker({seed={mark.m.authorId}size={28}/>- <div className="min-w-0 flex-1">- <div className="flex min-w-0 items-center gap-2 text-xs leading-4">- <span className="min-w-0 flex-1 truncate font-semibold">+ <div className="w-fit min-w-0 max-w-full">+ <div className="flex w-fit min-w-0 max-w-full items-center gap-2 text-xs leading-4">+ <span className="min-w-0 truncate font-semibold">{mark.m.authorName || "Unknown"}</span>{mark.m.createdAt && (@@ -234,14 +234,14 @@ export function BotMarkSticker({</time>)}</div>- <div title={location} className="flex min-w-0 items-center gap-1 text-[10px] leading-4 text-[#4b3712]">- <span className={mark.serverId ? "min-w-0 flex-1 truncate" : "shrink-0"}>+ <div title={location} className="flex w-fit min-w-0 max-w-full items-center gap-1 text-[10px] leading-4 text-[#4b3712]">+ <span className={mark.serverId ? "min-w-0 truncate" : "shrink-0"}>{locationPrefix}</span>{locationChannel && (<><span className="shrink-0" aria-hidden>·</span>- <span className="min-w-0 flex-1 truncate">{locationChannel}</span>+ <span className="min-w-0 truncate">{locationChannel}</span></>)}</div>@@ -259,7 +259,7 @@ export function BotMarkSticker({</div>)}- <footer className="flex h-9 shrink-0 items-center gap-1 px-3 py-1">+ <footer className="flex h-12 shrink-0 items-center gap-1 px-3 py-0.5 sm:h-9 sm:py-1">{active ? (<div className="min-w-0 flex-1 overflow-hidden"><BotAuditActiveRow latestEventAt={visibleEvents.at(-1)?.createdAt} tone="note" />@@ -274,7 +274,7 @@ export function BotMarkSticker({onClick={onStop}disabled={stopPending}aria-label={stopPending ? "Stopping current agent turn" : "Stop current agent turn"}- className="flex h-7 shrink-0 items-center justify-center gap-1.5 rounded-lg bg-[#dc2626] px-2.5 text-xs font-semibold text-white shadow-[0_2px_5px_rgba(127,29,29,0.28)] transition-colors hover:bg-[#b91c1c] active:bg-[#991b1b] focus-visible:ring-2 focus-visible:ring-[#7f1d1d] focus-visible:ring-offset-1 focus-visible:outline-none disabled:cursor-wait disabled:bg-[#b91c1c] disabled:text-white/85"+ className="flex min-h-11 shrink-0 items-center justify-center gap-1.5 rounded-lg bg-[#dc2626] px-2.5 text-xs font-semibold text-white shadow-[0_2px_5px_rgba(127,29,29,0.28)] transition-colors hover:bg-[#b91c1c] active:bg-[#991b1b] focus-visible:ring-2 focus-visible:ring-[#7f1d1d] focus-visible:ring-offset-1 focus-visible:outline-none disabled:cursor-wait disabled:bg-[#b91c1c] disabled:text-white/85 sm:min-h-7">{stopPending? <LoaderCircle className="size-3.5 animate-spin motion-reduce:animate-none" aria-hidden />diff --git a/src/web/src/components/ui/confirm-dialog.tsx b/src/web/src/components/ui/confirm-dialog.tsxindex b0c77ffc9..f2d4f59d2 100644--- a/src/web/src/components/ui/confirm-dialog.tsx+++ b/src/web/src/components/ui/confirm-dialog.tsx@@ -44,6 +44,7 @@ export function ConfirmDialog({<Buttonvariant="outline"size="sm"+ className="h-11 sm:h-7"onClick={() => onOpenChange(false)}disabled={loading}>@@ -52,6 +53,7 @@ export function ConfirmDialog({<Buttonvariant={confirmVariant}size="sm"+ className="h-11 sm:h-7"onClick={onConfirm}disabled={loading}>diff --git a/src/web/src/components/ui/dialog.test.ts b/src/web/src/components/ui/dialog.test.tsindex 3fdeb094b..b5d5a0b6d 100644--- a/src/web/src/components/ui/dialog.test.ts+++ b/src/web/src/components/ui/dialog.test.ts@@ -57,4 +57,18 @@ describe("DialogContent", () => {expect(event.stopPropagation).toHaveBeenCalledOnce()}})++ it("keeps the close affordance touch-safe on mobile", () => {+ let renderer: TestRenderer.ReactTestRenderer++ act(() => {+ renderer = TestRenderer.create(+ React.createElement(DialogContent, null, "Dialog body"),+ )+ })++ const close = renderer!.root.findByType("mock-dialog-close")+ expect(close.props.render.props.className).toContain("size-11")+ expect(close.props.render.props.className).toContain("sm:size-7")+ })})diff --git a/src/web/src/components/ui/dialog.tsx b/src/web/src/components/ui/dialog.tsxindex aaae63d98..f37e4b1f6 100644--- a/src/web/src/components/ui/dialog.tsx+++ b/src/web/src/components/ui/dialog.tsx@@ -96,7 +96,7 @@ function DialogContent({render={<Buttonvariant="ghost"- className="absolute top-2 right-2"+ className="absolute top-0.5 right-0.5 size-11 sm:top-2 sm:right-2 sm:size-7"size="icon-sm"/>}diff --git a/src/web/src/lib/community/testids.test.ts b/src/web/src/lib/community/testids.test.tsindex 3ea10fa5f..388d3d5c5 100644--- a/src/web/src/lib/community/testids.test.ts+++ b/src/web/src/lib/community/testids.test.ts@@ -2,6 +2,10 @@ import { describe, expect, it } from "vitest"import { tid } from "./testids"describe("community QA selectors", () => {+ it("exposes the current Web version in settings", () => {+ expect(tid.settingsWebVersion).toBe("community-settings-web-version")+ })+it("exposes the global reconnect overlay independently from its Retry action", () => {expect(tid.wsReconnectOverlay).toBe("community-ws-reconnect-overlay")expect(tid.wsRetry).toBe("community-ws-retry")diff --git a/src/web/src/lib/community/testids.ts b/src/web/src/lib/community/testids.tsindex 9e24eb986..767bea769 100644--- a/src/web/src/lib/community/testids.ts+++ b/src/web/src/lib/community/testids.ts@@ -36,6 +36,7 @@ export const tid = {settingsContent: "community-settings-content",settingsClose: "community-settings-close",settingsLabel: "community-settings-label",+ settingsWebVersion: "community-settings-web-version",settingsTab: (value: string) => `community-settings-tab-${value}`,userSettingsOpen: "community-user-settings-open",serverSettingsOpen: "community-server-settings-open",diff --git a/src/web/src/test/e2e-ui/35-bot-token-usage-quota.spec.ts b/src/web/src/test/e2e-ui/35-bot-token-usage-quota.spec.tsindex 8bf9ec17e..bb437938d 100644--- a/src/web/src/test/e2e-ui/35-bot-token-usage-quota.spec.ts+++ b/src/web/src/test/e2e-ui/35-bot-token-usage-quota.spec.ts@@ -403,9 +403,15 @@ test("My Bots restores the 30-day token heatmap across PC and mobile", async ({const selectedDay = page.getByTestId(tid.botUsageDialogDay("bot_codex", "2026-08-26"))const dialogSummary = page.getByTestId(tid.botUsageDialogSummary("bot_codex"))await expect(usageDialog).toBeVisible()+ await expect(dateRail.locator("button").first()).toHaveAttribute(+ "data-testid",+ tid.botUsageDialogDay("bot_codex", "2026-08-30"),+ )+ expect(await dateRail.evaluate((element) => element.scrollLeft)).toBe(0)await expect(newestDay).toHaveAttribute("aria-pressed", "true")await expect(dialogSummary).toContainText("TotalUnavailable")expect(await dateRail.evaluate((element) => element.scrollWidth > element.clientWidth)).toBe(true)+ await attachScreenshot(page, testInfo, "my-bots-token-heatmap-mobile-dialog")await selectedDay.click()await expect(selectedDay).toHaveAttribute("aria-pressed", "true")await expect(newestDay).toHaveAttribute("aria-pressed", "false")@@ -414,7 +420,8 @@ test("My Bots restores the 30-day token heatmap across PC and mobile", async ({await expect(dialogSummary).toContainText("Input6,000,000")await expect(dialogSummary).toContainText("Output3,000,000")await expect(dialogSummary).toContainText("CacheUnavailable")- await attachScreenshot(page, testInfo, "my-bots-token-heatmap-mobile-dialog")+ await newestDay.click()+ await expect(newestDay).toHaveAttribute("aria-pressed", "true")const lightDialogBackground = await usageDialog.evaluate((element) => getComputedStyle(element).backgroundColor,)