A local-first multi-agent app development platform, built on PenguinHarness
fix(web): align agent tab order with stat icons and even out stat spacing (#255)
Yaowei Zhengdd3ec88a5ef6
diff --git a/packages/web/src/features/agents/agent-settings-page.tsx b/packages/web/src/features/agents/agent-settings-page.tsxindex 16e84624..37416e09 100644--- a/packages/web/src/features/agents/agent-settings-page.tsx+++ b/packages/web/src/features/agents/agent-settings-page.tsx@@ -3,10 +3,10 @@* Overview (name/description form + two ruled sections in the skills import modal's* family: Agent State — State version, snapshot export-import and the copyable State* path — and Kernel — the defaults generation with its update / restore-defaults- * actions), Prompt (AGENTS.md and system_prompt editors + placeholder- * reference), Memory (memory-tab.tsx), Runtime (max_turns, model.*, compaction.*), Tools (editable built-in+ * actions), System Prompt (AGENTS.md and system_prompt editors + placeholder+ * reference), Runtime (max_turns, model.*, compaction.*), Tools (editable built-in* tools table + the MCP Server form, mcp-servers-section.tsx), Skills (skills-tab.tsx),- * Vault (vault-tab.tsx), Schedule (schedules-tab.tsx).+ * Memory (memory-tab.tsx), Vault (vault-tab.tsx), Schedule (schedules-tab.tsx).* Save = PUT config (sends only the changed keys; YAML comments are preserved* server-side).*/@@ -47,7 +47,7 @@ import { McpServersSection } from "./mcp-servers-section";import { thinkingLevelOptionsFor } from "../chat/thinking-level";type TabKey =- "overview" | "prompt" | "memory" | "runtime" | "tools" | "skills" | "vault" | "schedules";+ "overview" | "prompt" | "runtime" | "tools" | "skills" | "memory" | "vault" | "schedules";/*** Dropdown rows from a dictionary's [value, description] pairs (exported for unit tests).@@ -100,10 +100,10 @@ export function AgentSettingsPage() {const TABS = [{ key: "overview", label: S.agent.tabOverview },{ key: "prompt", label: S.agent.tabPrompt },- { key: "memory", label: S.agent.tabMemory },{ key: "runtime", label: S.agent.tabRuntime },{ key: "tools", label: S.agent.tabTools },{ key: "skills", label: S.agent.tabSkills },+ { key: "memory", label: S.agent.tabMemory },{ key: "vault", label: S.agent.tabVault },{ key: "schedules", label: S.agent.tabSchedules },] as const;diff --git a/packages/web/src/features/agents/agents-page.tsx b/packages/web/src/features/agents/agents-page.tsxindex fafffaff..683d86c8 100644--- a/packages/web/src/features/agents/agents-page.tsx+++ b/packages/web/src/features/agents/agents-page.tsx@@ -5,8 +5,8 @@* Info column has three lines: title line (small avatar + bold name + agentId); single-line* truncated description; and a stats line — icon + number only (Session count / tool count) plus* relative time (today/yesterday/n days ago), with meaning folded into the hover title; the- * memory / tool / skill / vault-key / schedule counts deep-link to the settings page's matching- * tab (?tab=memory|tools|skills|vault|schedules) and appear in the settings tabs' order.+ * tool / skill / memory / vault-key / schedule counts deep-link to the settings page's matching+ * tab (?tab=tools|skills|memory|vault|schedules) and appear in the settings tabs' order.* Buttons sit to the right of the sparkline: "New Chat" (draft state, same as sidebar group* header) and "Settings" (goes to settings page) show text labels; "Usage" / "Traces" (deep link* via ?agentId= to the usage center / trace observability; traces use an eye line icon =@@ -75,7 +75,7 @@ const CARD_ICONS = {* (no button chrome) plus a subtle hover text-color shift and pointer cursor.*/const STAT_LINK_CLASS =- "inline-flex min-w-[2.25rem] shrink-0 cursor-pointer items-center gap-1 tabular-nums " ++ "inline-flex shrink-0 cursor-pointer items-center gap-1 tabular-nums " +"transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200";export function AgentsPage() {@@ -264,29 +264,20 @@ export function AgentsPage() {{a.description ?? ""}</p>{/* Stats on their own line: same color/font size as the description; each- reserves a minimum width so they align vertically across cards; meaning- folded into the hover title. Memory/tool/skill/vault/schedule counts are- buttons deep-linking to the matching settings tab, listed in the settings- tabs' order (also for built-in Agents — their Settings entry point has no- gating either); session count and last-modified stay plain text */}- <div className="mt-1.5 flex items-center gap-x-2.5 text-xs text-gray-500 dark:text-gray-400">+ item hugs its content, with spacing left to the container's uniform+ gap-x-4; meaning folded into the hover title. Tool/skill/memory/vault/+ schedule counts are buttons deep-linking to the matching settings tab,+ listed in the settings tabs' order (also for built-in Agents — their+ Settings entry point has no gating either); session count and+ last-modified stay plain text */}+ <div className="mt-1.5 flex items-center gap-x-4 text-xs text-gray-500 dark:text-gray-400"><span- className="inline-flex min-w-[2.25rem] shrink-0 items-center gap-1 tabular-nums"+ className="inline-flex shrink-0 items-center gap-1 tabular-nums"title={S.agent.sessionCount(a.sessionCount)}><GlyphIcon d={CARD_ICONS.sessions} size={12} />{a.sessionCount}</span>- <button- type="button"- className={STAT_LINK_CLASS}- title={S.agent.memoryCount(a.memoryCount)}- aria-label={S.agent.memoryCount(a.memoryCount)}- onClick={() => openSettingsTab(a.agentId, "memory")}- >- <GlyphIcon d={CARD_ICONS.memory} size={12} />- {a.memoryCount}- </button><buttontype="button"className={STAT_LINK_CLASS}@@ -307,6 +298,16 @@ export function AgentsPage() {<GlyphIcon d={CARD_ICONS.skills} size={12} />{a.skillCount}</button>+ <button+ type="button"+ className={STAT_LINK_CLASS}+ title={S.agent.memoryCount(a.memoryCount)}+ aria-label={S.agent.memoryCount(a.memoryCount)}+ onClick={() => openSettingsTab(a.agentId, "memory")}+ >+ <GlyphIcon d={CARD_ICONS.memory} size={12} />+ {a.memoryCount}+ </button><buttontype="button"className={STAT_LINK_CLASS}diff --git a/packages/web/src/lib/strings-en.ts b/packages/web/src/lib/strings-en.tsindex 2e5172ea..adf4f7f1 100644--- a/packages/web/src/lib/strings-en.ts+++ b/packages/web/src/lib/strings-en.ts@@ -239,7 +239,7 @@ export const en: Strings = {settings: "Agent settings",backToList: "Back to Agents",tabOverview: "Overview",- tabPrompt: "Prompt",+ tabPrompt: "System Prompt",tabMemory: "Memory",tabRuntime: "Runtime",tabTools: "Tools",diff --git a/packages/web/src/lib/strings.ts b/packages/web/src/lib/strings.tsindex 2e29e04f..9939cd96 100644--- a/packages/web/src/lib/strings.ts+++ b/packages/web/src/lib/strings.ts@@ -230,7 +230,7 @@ export const zh = {settings: "Agent 设置",backToList: "返回 Agents",tabOverview: "概览",- tabPrompt: "Prompt",+ tabPrompt: "系统提示词",tabMemory: "记忆",tabRuntime: "运行参数",tabTools: "工具",