Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
feat(ui-design): skills and MCP baseline frames (#3135)
Call White951d263290c3
diff --git a/docs/plans/design-frames.md b/docs/plans/design-frames.mdindex e212e98a0..299f7daba 100644--- a/docs/plans/design-frames.md+++ b/docs/plans/design-frames.md@@ -23,15 +23,16 @@ Status: adopted (2026-11-02). Avibe's UI designs live in `ui/design/` as frames;window manager, Inbox, project tree) from fixtures, and runs the real `ApiProvider` and `BotsProvider`.`fetch` and `EventSource` are answered in the page from the frame's API fixtures (by path and query, then bypath), so no frame reaches a server; paths a frame fetched without a fixture are reported. Each frame gets- fresh in-memory Web Storage (seeded by its `storage` fixture) and a fixed clock, so a viewer's remembered- preferences and the date never change a frame. No product code changes for this.+ fresh in-memory Web Storage (seeded by its `storage` fixture), a document URL carrying its `search` fixture+ (a deep link a component reads), and a fixed clock, so a viewer's remembered preferences and the date never+ change a frame. No product code changes for this.- The canvas (`ui/design.html`, not part of the production build) shows every frame, each in its own iframe sothemes, portals, and routing never leak between frames. `?frame=<id>&theme=light|dark&lang=zh|en` renders oneframe at its size.- `npm run design:shot` renders frames with Playwright (2x PNG, animations off, portals included, an optional- hover) once fonts are loaded and the network is quiet, and fails on any console error. CI runs it with the- browser checks, and `typecheck:design` with the static checks, so a product change that breaks a frame fails- its PR.+ hover) once fonts are loaded and the network is quiet (after the frame's `wait`, for a read that starts on a+ timer), and fails on any console error. CI runs it with the browser checks, and `typecheck:design` with the+ static checks, so a product change that breaks a frame fails its PR.- `npm run design:export` copies the canvas, the screenshots, and `frames.json` into the current Session's ShowPage and writes `<DesignFrame>`, which embeds frames live (crisp, interactive) without any Show Page change.Each shot keeps the language it was exported in. While the Show Page's annotation is on, `<DesignFrame>` drawsdiff --git a/docs/plans/mcp-hub-mvp.md b/docs/plans/mcp-hub-mvp.mdindex c1d3b9eea..e1d684d9c 100644--- a/docs/plans/mcp-hub-mvp.md+++ b/docs/plans/mcp-hub-mvp.md@@ -3,7 +3,7 @@> Status: implemented (instance-global Hub). Official latest stable Python MCP SDK, no generated Skills. OAuth: see `docs/plans/mcp-hub-oauth.md`.> Model: auto-discover reachable servers and register them; no draft/enable lifecycle.> Principle: smallest complete design; reuse existing caller context, IPC, credentials, i18n and owner lifecycle; no speculative defenses.-> Design source of truth: `avibe-docs/design.pen`, frames `avibe — Skills & MCP · …`.+> Design source of truth: the design frames `skills/mcp/*` (`ui/design/frames/skills/mcp.design.tsx`).## 1. Change contract@@ -206,7 +206,7 @@ Acceptance:3. Add through page/`vibe mcp-add` writes only the Avibe store and the server appears after the call returns.4. Delete of an Avibe server removes it. Delete of a native server removes that entry from its native file (owner-confirmed), preserving the rest of the file.5. Help/list work with the owner down; schema-to-flag contracts hold; injected prompt examples are parser-tested.-6. UI matches the Pencil frames; leftover MVP `state.json` enabled flags and drafts load safely (ignored).+6. UI matches the `skills/mcp/*` design frames; leftover MVP `state.json` enabled flags and drafts load safely (ignored).7. Avibe-spawned sessions do not load native MCP (C3 unchanged).## 11. Next actiondiff --git a/docs/plans/workbench-skills-page.md b/docs/plans/workbench-skills-page.mdindex de87fa032..98d3297c9 100644--- a/docs/plans/workbench-skills-page.md+++ b/docs/plans/workbench-skills-page.md@@ -2,7 +2,7 @@> **Branch**: `feature/workbench-skills` (from `origin/master` @ `88c8afe`)> **Status**: Design finalized 2026-05-30 — ready to build.-> **Design source of truth**: `../avibe-docs/design.pen` — frames listed in §2. Read them via the `pencil` MCP tools, not text.+> **Design source of truth**: the design frames in `ui/design/frames/skills/` (`skills/*`). The Pencil frames §2 lists were the design this page was first built from; that file is retired.> **Owner**: cyhhao> **Core principle**: extreme reuse + first-principles. Reuse a primitive → extend it → only then build new. Never re-roll a one-off variant inline. **Pixel-perfect 1:1 with the design is a hard requirement** (see §8).diff --git a/ui/design/AGENTS.md b/ui/design/AGENTS.mdindex 81c1295a3..ae890ceef 100644--- a/ui/design/AGENTS.md+++ b/ui/design/AGENTS.md@@ -12,12 +12,12 @@ Avibe's UI designs live here. A frame is a static React render of one surface in- Draw shipped surfaces with the shipped component (`@/components/...`) and fixtures; never redraw them.- Draw what does not exist yet in `kit/`. When it ships, the frame switches to the shipped component, the kit copy is deleted, and the status becomes `shipped`.-- Frames hold no logic: no handlers, no effects, no fetching. State comes from fixtures (`WorkbenchFixtures`): a provider that reads the API gets its response from `fixtures.api` or a typed fixture field, and a remembered preference comes from `fixtures.storage`. Add a fixture field rather than mocking inside a frame.+- Frames hold no logic: no handlers, no effects, no fetching. State comes from fixtures (`WorkbenchFixtures`): a provider that reads the API gets its response from `fixtures.api` or a typed fixture field, a remembered preference comes from `fixtures.storage`, and a deep link a component reads from the document URL comes from `fixtures.search`. Add a fixture field rather than mocking inside a frame.- Tokens only: no raw colors, sizes, or shadows that `src/index.css` does not define. Add a token there if one is missing.- Each frame states its size, its themes (default both), and its status: `proposed` (being designed), `approved` (signed off, ready to build), or `shipped` (renders shipped components only). A proposal becomes `approved` in the PR the owner approves.- Kit copy is draft copy and may be written inline; it moves to `src/i18n` when the component ships.- When a shipped component mixes data hooks and markup, draw it whole; to redesign part of it, prefer splitting it into a view (props only) and a container, then draw the view.-- Size a frame to include any popover, menu, or card it shows; set `hover` to capture a hover state.+- Size a frame to include any popover, menu, or card it shows; set `hover` to capture a hover state, and `wait` when a read starts on a timer (a debounced search).- Code that implements a design names its frame id (`ui/design: sidebar/bots/three`), not a description of a drawing.## Loopdiff --git a/ui/design/Canvas.tsx b/ui/design/Canvas.tsxindex 02a29758d..4742c7dd0 100644--- a/ui/design/Canvas.tsx+++ b/ui/design/Canvas.tsx@@ -3,6 +3,7 @@ import { useEffect, type ReactNode } from 'react';import type { DesignLang, DesignTheme, Frame } from './frame';import { ALL_FRAMES } from './registry';import { DesignShell } from './shell/DesignShell';+import { designLocation } from './shell/location';import { designNetwork } from './shell/network';function FrameBox({ frame, theme }: { frame: Frame; theme: DesignTheme }) {@@ -23,18 +24,22 @@ function FrameBox({ frame, theme }: { frame: Frame; theme: DesignTheme }) {/** One frame at its exact size: what the screenshot tool captures. */function Single({ frame, theme }: { frame: Frame; theme: DesignTheme }) {useEffect(() => {+ // After the frame's effects (a component may have cleared the deep link it read).+ designLocation.restore();document.documentElement.setAttribute('data-theme', theme);let cancelled = false;- // Ready once fonts are in and the providers' fixture reads have settled.+ // Ready once fonts are in and the providers' fixture reads have settled, including a read that+ // starts on a timer when the frame says to wait for it.void document.fonts.ready.then(() => designNetwork.quiet())+ .then(() => (frame.wait ? new Promise((resolve) => setTimeout(resolve, frame.wait)).then(() => designNetwork.quiet()) : undefined)).then(() => {if (!cancelled) document.body.dataset.designReady = 'true';});return () => {cancelled = true;};- }, [theme]);+ }, [frame, theme]);return <FrameBox frame={frame} theme={theme} />;}diff --git a/ui/design/frame.ts b/ui/design/frame.tsindex acf13edaa..1b57f8bea 100644--- a/ui/design/frame.ts+++ b/ui/design/frame.ts@@ -22,6 +22,9 @@ export interface FrameSpec {route?: string;/** A CSS selector the screenshot hovers before capturing, for hover states (cards, menus). */hover?: string;+ /** Milliseconds the frame waits, once its reads have settled, before it is ready: for a read that starts+ * on a timer (a debounced search), so the screenshot shows its result rather than its spinner. */+ wait?: number;render: () => ReactNode;}diff --git a/ui/design/frames/skills/add-skill.design.tsx b/ui/design/frames/skills/add-skill.design.tsxnew file mode 100644index 000000000..047103812--- /dev/null+++ b/ui/design/frames/skills/add-skill.design.tsx@@ -0,0 +1,26 @@+// The shipped Add skill dialog, opened over the Skills page as the page opens it in the Global scope.+import { AddSkillDialog } from '@/components/workbench/skills/AddSkillDialog';++import { frames } from '../../frame';+import { globalChecks, globalSkills, skillsApi, skillsFixtures } from './fixtures';+import { skillsPage } from './page.design';++const designFrames = frames([+ {+ name: 'github',+ title: '添加技能 · GitHub 链接',+ width: 1192,+ height: 760,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures(skillsApi(globalSkills, globalChecks)),+ render: () => (+ <>+ {skillsPage()}+ <AddSkillDialog defaultScope="global" onClose={() => {}} onInstalled={() => {}} />+ </>+ ),+ },+]);++export default designFrames;diff --git a/ui/design/frames/skills/browse-registry.design.tsx b/ui/design/frames/skills/browse-registry.design.tsxnew file mode 100644index 000000000..5547f38ce--- /dev/null+++ b/ui/design/frames/skills/browse-registry.design.tsx@@ -0,0 +1,36 @@+// The shipped askill registry browser, opened over the Skills page as the page opens it in the Global scope.+import { BrowseRegistryDialog } from '@/components/workbench/skills/BrowseRegistryDialog';++import { frames } from '../../frame';+import { globalChecks, globalSkills, popularSkills, skillsApi, skillsFixtures } from './fixtures';+import { skillsPage } from './page.design';++const designFrames = frames([+ {+ name: 'popular',+ title: '浏览注册表 · 热门技能',+ width: 1192,+ height: 900,+ status: 'shipped',+ route: '/skills',+ // The dialog lists popular skills after its 250 ms search debounce.+ wait: 400,+ fixtures: skillsFixtures({+ ...skillsApi(globalSkills, globalChecks),+ '/api/skills/find?q=': { ok: true, query: '', count: popularSkills.length, skills: popularSkills },+ }),+ render: () => (+ <>+ {skillsPage()}+ <BrowseRegistryDialog+ scope="global"+ installedNames={new Set(globalSkills.map((s) => s.name))}+ onClose={() => {}}+ onInstalled={() => {}}+ />+ </>+ ),+ },+]);++export default designFrames;diff --git a/ui/design/frames/skills/fixtures.ts b/ui/design/frames/skills/fixtures.tsnew file mode 100644index 000000000..8b3b8e3ed--- /dev/null+++ b/ui/design/frames/skills/fixtures.ts@@ -0,0 +1,157 @@+// Fixture builders for the Skills & MCP frames: the `/api/skills*` and `/api/mcp` reads the shipped+// page makes, served through the design network stub.+import type { McpServerSummary, SkillBrief, SkillCheckItem, SkillSearchItem } from '@/context/ApiContext';++import { DESIGN_NOW } from '../../shell/clock';+import { demoProjects, mainBot, type WorkbenchFixtures } from '../../shell/fixtures';++const at = (daysAgo: number) => new Date(DESIGN_NOW - daysAgo * 24 * 3_600_000).toISOString();++/** AppShell's console page: the console glow behind the padded content column, as `<main>` draws it. */+export const consolePageClass = 'page-glow-console h-full w-full overflow-hidden';+export const consoleContentClass = 'mx-auto w-full px-4 py-5 md:px-10 md:py-8';++const HOME = '/Users/demo';++// ── Skills ──────────────────────────────────────────────────────────────++const AGENTS = [+ { id: 'claude-code', name: 'Claude Code' },+ { id: 'codex', name: 'Codex' },+ { id: 'opencode', name: 'OpenCode' },+];++export const skill = (name: string, description: string, repo: string, version: string, extra: Partial<SkillBrief> = {}): SkillBrief => ({+ name,+ scope: 'global',+ path: `${HOME}/.agents/skills/${name}`,+ agents: AGENTS,+ description,+ version,+ sourceType: 'github',+ sourceUrl: `https://github.com/${repo}.git`,+ installSource: `gh:${repo}@${name}`,+ installedAt: at(40),+ updatedAt: at(6),+ ...extra,+});++export const globalSkills: SkillBrief[] = [+ skill('pdf-tools', '填写、合并、拆分 PDF,并抽取其中的文字与表格。', 'anthropics/skills', '1.4.0'),+ skill('web-fetch', '抓取网页并转换成干净的 Markdown。', 'avibe-bot/askill-skills', '0.9.2'),+ skill('git-workflow', '约定式提交、PR 与评审循环的完整流程。', 'obra/superpowers', '2.1.0'),+ skill('sentry-debug', '拉取 Sentry issue,按堆栈逐层定位根因。', 'getsentry/skills', '1.1.0'),+ skill('memory', '跨 Agent 会话的持久文件记忆。', 'anthropics/skills', '1.0.3'),+ skill('slack-blocks', '把结构化数据排成 Slack Block Kit 消息。', 'avibe-bot/askill-skills', '0.4.0'),+ skill('playwright-qa', '用无头浏览器跑通 Web 流程并截图验收。', 'remorses/playwriter', '0.7.1'),+];++export const projectSkill = (name: string, description: string, version: string): SkillBrief => ({+ name,+ scope: 'project',+ path: `${HOME}/avibe/.agents/skills/${name}`,+ agents: AGENTS,+ description,+ version,+ sourceType: 'local',+ installedAt: at(12),+ updatedAt: at(3),+});++/** `askill check`: web-fetch has a newer release; the rest are current. */+export const globalChecks: SkillCheckItem[] = globalSkills.map(({ name, version }) =>+ name === 'web-fetch'+ ? { name, scope: 'global', status: 'update_available', localVersion: version, remoteVersion: '0.10.0' }+ : { name, scope: 'global', status: 'up_to_date', localVersion: version, remoteVersion: version },+);++/** The reads the Skills page makes in the Global scope, answered with `skills` and their check. */+export function skillsApi(skills: SkillBrief[], checks: SkillCheckItem[] = []): Record<string, unknown> {+ return {+ '/api/projects': { projects: demoProjects },+ '/api/skills?scope=global': { ok: true, summary: { global: skills.length, project: 0 }, skills },+ '/api/skills/check?scope=global': { ok: true, skills: checks },+ };+}++export const skillsFixtures = (api: Record<string, unknown>): WorkbenchFixtures => ({ bots: [mainBot], api });++export const registryItem = (+ id: number,+ name: string,+ description: string,+ repo: string,+ aiScore: number,+ stars: number,+ tags: string[],+): SkillSearchItem => {+ const [owner, repoName] = repo.split('/');+ return {+ id,+ name,+ description,+ owner,+ repo: repoName,+ tags,+ stars,+ aiScore,+ aiBreakdown: [],+ updatedAt: at(5),+ installSource: `gh:${repo}@${name}`,+ url: `https://askill.sh/skills/${id}`,+ };+};++/** `askill find` with an empty query: the popular skills, ranked by AI score. */+export const popularSkills: SkillSearchItem[] = [+ registryItem(52912, 'pdf-tools', '填写、合并、拆分 PDF,并抽取其中的文字与表格。', 'anthropics/skills', 96, 12034, ['documents', 'pdf']),+ registryItem(41207, 'code-review', '对抗式 diff 评审,带通过 / 不通过的质量闸门。', 'obra/superpowers', 95, 4812, ['review', 'git']),+ registryItem(60318, 'pr-describe', '根据 diff 生成 PR 标题和说明。', 'anthropics/skills', 92, 9870, ['git', 'review']),+ registryItem(38455, 'security-review', '标出改动里的不安全写法:注入、越权、明文密钥。', 'semgrep/skills', 91, 6120, ['security', 'review']),+ registryItem(47702, 'lint-fix', '对整份 diff 运行并自动修复 lint 问题。', 'biomejs/skills', 87, 1930, ['lint', 'ci']),+ registryItem(55890, 'sql-runner', '只读连接数据库,把自然语言问题翻成 SQL 并给出结果表。', 'duckdb/skills', 83, 2210, ['data']),+];++// ── MCP ─────────────────────────────────────────────────────────────────++export const mcpServer = (name: string, extra: Partial<McpServerSummary>): McpServerSummary => ({+ name,+ transport: 'streamable_http',+ source: 'avibe',+ auth: 'none',+ generatedAt: '2026-10-31T10:57:12+00:00',+ toolCount: extra.tools?.length ?? 0,+ ...extra,+});++export const mcpServers: McpServerSummary[] = [+ mcpServer('context7', {+ source: 'claude',+ sourcePath: '/Users/demo/.claude.json',+ url: 'https://mcp.context7.com/mcp',+ serverVersion: '1.0.14',+ tools: [+ { name: 'resolve-library-id', description: '把库名解析成 Context7 可用的库 ID,返回最匹配的几个候选及其文档覆盖度。' },+ {+ name: 'get-library-docs',+ description:+ '拉取指定库的最新文档。可以按主题(例如 routing、hooks)收窄范围,并用 tokens 限制返回长度;库 ID 需先用 resolve-library-id 解析,除非用户已经给出 /org/project 形式的 ID。',+ },+ ],+ }),+ mcpServer('github', {+ transport: 'stdio',+ command: 'npx -y @modelcontextprotocol/server-github',+ serverVersion: '2025.4.8',+ toolCount: 26,+ }),+ mcpServer('notion', { url: 'https://mcp.notion.com/mcp', auth: 'needs_login', toolCount: 0 }),+ mcpServer('blender', { source: 'codex', sourcePath: '/Users/demo/.codex/config.toml', transport: 'stdio', command: 'uvx blender-mcp', toolCount: 9 }),+ mcpServer('exa', { source: 'claude', sourcePath: '/Users/demo/.claude.json', url: 'https://mcp.exa.ai/mcp', toolCount: 2 }),+ mcpServer('node_repl', { source: 'codex', sourcePath: '/Users/demo/.codex/config.toml', transport: 'stdio', command: 'node ~/.codex/mcp/node-repl.js', toolCount: 4 }),+ mcpServer('linear', { source: 'opencode', sourcePath: '/Users/demo/.config/opencode/opencode.json', url: 'https://mcp.linear.app/mcp', toolCount: 23 }),+];++export const mcpApi = (servers: McpServerSummary[]): Record<string, unknown> => ({+ '/api/mcp': { ok: true, servers, oauthMode: 'direct' },+});diff --git a/ui/design/frames/skills/mcp.design.tsx b/ui/design/frames/skills/mcp.design.tsxnew file mode 100644index 000000000..04c75edd7--- /dev/null+++ b/ui/design/frames/skills/mcp.design.tsx@@ -0,0 +1,100 @@+// The shipped MCP Hub (the MCP tab of Skills & MCP), rendered from `/api/mcp` fixtures. A server opens+// in the detail panel through the page's deep link (`?mcp=<name>`), which an OAuth login also returns to.+import { McpHubSection } from '@/components/workbench/skills/McpHubSection';++import { frames } from '../../frame';+import { consoleContentClass, consolePageClass, mcpApi, mcpServers, skillsFixtures } from './fixtures';++const hub = () => (+ <div className={consolePageClass}>+ <div className={consoleContentClass}>+ <McpHubSection />+ </div>+ </div>+);++const designFrames = frames([+ {+ name: 'list',+ title: 'MCP · 服务器列表',+ width: 1192,+ height: 760,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures(mcpApi(mcpServers)),+ render: hub,+ },+ {+ name: 'detail',+ title: 'MCP · 服务器详情',+ width: 1192,+ height: 760,+ status: 'shipped',+ route: '/skills',+ fixtures: { ...skillsFixtures(mcpApi(mcpServers)), search: 'mcp=context7' },+ render: hub,+ },+ {+ name: 'login-complete',+ title: 'MCP · 登录完成回到详情',+ width: 1192,+ height: 760,+ status: 'shipped',+ route: '/skills',+ fixtures: {+ ...skillsFixtures(+ mcpApi(+ mcpServers.map((server) =>+ server.name === 'notion'+ ? {+ ...server,+ auth: 'ok' as const,+ serverVersion: '1.2.0',+ toolCount: 3,+ tools: [+ { name: 'notion-search', description: '在工作区里按关键词搜索页面和数据库。' },+ { name: 'notion-fetch', description: '读取一个页面或数据库的完整内容。' },+ { name: 'notion-create-pages', description: '在指定父页面下新建页面。' },+ ],+ }+ : server,+ ),+ ),+ ),+ search: 'mcp=notion&oauth=success',+ },+ render: hub,+ },+ {+ name: 'empty',+ title: 'MCP · 还没有服务器',+ width: 1192,+ height: 420,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures(mcpApi([])),+ render: hub,+ },+ {+ name: 'load-error',+ title: 'MCP · 读取失败',+ width: 1192,+ height: 420,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures({ '/api/mcp': { ok: false, error: { type: 'unavailable', message: 'Avibe service is not running' } } }),+ render: hub,+ },+ {+ name: 'phone',+ title: 'MCP · 手机',+ width: 390,+ height: 844,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures(mcpApi(mcpServers)),+ render: hub,+ },+]);++export default designFrames;diff --git a/ui/design/frames/skills/page.design.tsx b/ui/design/frames/skills/page.design.tsxnew file mode 100644index 000000000..e44288164--- /dev/null+++ b/ui/design/frames/skills/page.design.tsx@@ -0,0 +1,74 @@+// The shipped Skills page (Workbench · Skills & MCP, Skills tab, Global scope), rendered from `/api/skills*` fixtures.+import { SkillsPage } from '@/components/workbench/SkillsPage';++import { frames } from '../../frame';+import { consoleContentClass, consolePageClass, globalChecks, globalSkills, skillsApi, skillsFixtures } from './fixtures';++export const skillsPage = () => (+ <div className={consolePageClass}>+ <div className={consoleContentClass}>+ <SkillsPage />+ </div>+ </div>+);++const designFrames = frames([+ {+ name: 'global',+ title: '技能 · 全局技能列表',+ width: 1192,+ height: 860,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures(skillsApi(globalSkills, globalChecks)),+ render: skillsPage,+ },+ {+ name: 'empty',+ title: '技能 · 还没有技能',+ width: 1192,+ height: 520,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures(skillsApi([])),+ render: skillsPage,+ },+ {+ name: 'askill-missing',+ title: '技能 · 未安装 askill',+ width: 1192,+ height: 560,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures({+ ...skillsApi([]),+ '/api/skills?scope=global': { ok: false, error: { code: 'askill_not_found', message: 'askill is not installed' } },+ }),+ render: skillsPage,+ },+ {+ name: 'error',+ title: '技能 · 读取失败',+ width: 1192,+ height: 560,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures({+ ...skillsApi([]),+ '/api/skills?scope=global': { ok: false, error: { code: 'askill_failed', message: 'askill list 退出码 1:~/.agents/.skill-lock.json 不是有效的 JSON' } },+ }),+ render: skillsPage,+ },+ {+ name: 'phone',+ title: '技能 · 手机',+ width: 390,+ height: 844,+ status: 'shipped',+ route: '/skills',+ fixtures: skillsFixtures(skillsApi(globalSkills, globalChecks)),+ render: skillsPage,+ },+]);++export default designFrames;diff --git a/ui/design/frames/skills/skill-detail.design.tsx b/ui/design/frames/skills/skill-detail.design.tsxnew file mode 100644index 000000000..ce823e760--- /dev/null+++ b/ui/design/frames/skills/skill-detail.design.tsx@@ -0,0 +1,55 @@+// The shipped skill detail panel: the 400 px column the Skills page opens beside its list when a row is selected.+import type { ReactNode } from 'react';++import { SkillDetailPanel } from '@/components/workbench/skills/SkillDetailPanel';++import { frames } from '../../frame';+import { consolePageClass, skillsFixtures, globalChecks, globalSkills, projectSkill } from './fixtures';++const webFetch = globalSkills.find((s) => s.name === 'web-fetch')!;++const panel = (node: ReactNode) => (+ <div className={consolePageClass}>+ <div className="flex w-[440px] flex-col p-5">{node}</div>+ </div>+);++const designFrames = frames([+ {+ name: 'update',+ title: '技能详情 · 全局技能有更新',+ width: 440,+ height: 280,+ status: 'shipped',+ fixtures: skillsFixtures({}),+ render: () =>+ panel(+ <SkillDetailPanel+ skill={webFetch}+ check={globalChecks.find((c) => c.name === 'web-fetch')}+ onClose={() => {}}+ onUpdate={() => {}}+ onRemove={() => {}}+ />,+ ),+ },+ {+ name: 'project',+ title: '技能详情 · 项目技能',+ width: 440,+ height: 280,+ status: 'shipped',+ fixtures: skillsFixtures({}),+ render: () =>+ panel(+ <SkillDetailPanel+ skill={projectSkill('repo-conventions', '本仓库的提交、PR 与目录约定:改代码前先读它。', '0.3.0')}+ projectName="avibe"+ onClose={() => {}}+ onRemove={() => {}}+ />,+ ),+ },+]);++export default designFrames;diff --git a/ui/design/frames/skills/skill-row.design.tsx b/ui/design/frames/skills/skill-row.design.tsxnew file mode 100644index 000000000..cee3a19c5--- /dev/null+++ b/ui/design/frames/skills/skill-row.design.tsx@@ -0,0 +1,31 @@+// The shipped skill row in each state the Skills page draws it: installed, with an update, selected, and+// inherited from Global into a project's list.+import { SkillRow } from '@/components/workbench/skills/SkillRow';++import { frames } from '../../frame';+import { consolePageClass, skillsFixtures, globalSkills } from './fixtures';++const [pdfTools, webFetch, gitWorkflow, sentryDebug] = globalSkills;++const designFrames = frames([+ {+ name: 'states',+ title: '技能行 · 默认、有更新、选中、继承自全局',+ width: 760,+ height: 410,+ status: 'shipped',+ fixtures: skillsFixtures({}),+ render: () => (+ <div className={consolePageClass}>+ <div className="flex flex-col gap-2 p-5">+ <SkillRow skill={pdfTools} />+ <SkillRow skill={webFetch} updateAvailable />+ <SkillRow skill={gitWorkflow} selected />+ <SkillRow skill={sentryDebug} inherited />+ </div>+ </div>+ ),+ },+]);++export default designFrames;diff --git a/ui/design/main.tsx b/ui/design/main.tsxindex 6847fda28..0a5dde96a 100644--- a/ui/design/main.tsx+++ b/ui/design/main.tsx@@ -12,6 +12,7 @@ import type { DesignLang, DesignTheme } from './frame';import { ALL_FRAMES } from './registry';import { installFixedClock } from './shell/clock';import { apiResponses } from './shell/fixtures';+import { designLocation } from './shell/location';import { designNetwork, installDesignNetwork } from './shell/network';installFixedClock();@@ -25,6 +26,7 @@ void i18n.changeLanguage(lang);const shown = ALL_FRAMES.find((f) => f.id === params.get('frame'));designNetwork.setResponses(apiResponses(shown?.fixtures));designStorage.seed(shown?.fixtures?.storage);+designLocation.enter(shown?.fixtures?.search);declare global {interface Window {diff --git a/ui/design/shell/DesignShell.tsx b/ui/design/shell/DesignShell.tsxindex 31557ea2e..726ef61f1 100644--- a/ui/design/shell/DesignShell.tsx+++ b/ui/design/shell/DesignShell.tsx@@ -9,6 +9,7 @@ import { UnsavedChangesContext } from '@/context/unsavedChangesContext';import { WindowManagerContext, type WindowManagerValue } from '@/context/WindowManagerContext';import { WorkbenchInboxContext, type InboxState } from '@/context/WorkbenchInboxContext';import { WorkbenchProjectsContext, type WorkbenchProjectsTree } from '@/context/WorkbenchProjectsContext';+import { unreadByCategory } from '@/lib/notificationPreferences';import { owner, type WorkbenchFixtures } from './fixtures';@@ -25,11 +26,16 @@ function inert<T extends object>(known: Partial<T>): T {function inboxValue(fixtures: WorkbenchFixtures): InboxState {const unreadBySession = fixtures.unreadBySession ?? {};const counts = Object.values(unreadBySession);+ const totalUnread = counts.reduce((sum, n) => sum + n, 0);+ const botSessions = new Set((fixtures.bots ?? []).map((b) => b.session_id));return inert<InboxState>({inboxSessions: fixtures.inboxSessions ?? [],unreadBySession,unreadLoaded: true,- totalUnread: counts.reduce((sum, n) => sum + n, 0),+ totalUnread,+ unreadByCategory: unreadByCategory(unreadBySession, botSessions),+ // Every notification switch on, as a new install has them.+ badgeTotal: totalUnread,unreadSessions: counts.filter((n) => n > 0).length,nextCursor: null,loading: false,diff --git a/ui/design/shell/fixtures.ts b/ui/design/shell/fixtures.tsindex 8d9c1056b..2b97c2cc2 100644--- a/ui/design/shell/fixtures.ts+++ b/ui/design/shell/fixtures.ts@@ -19,6 +19,8 @@ export interface WorkbenchFixtures {botStatus?: Record<string, BotRuntimeStatus>;/** Web Storage entries the frame starts with (a remembered preference, such as a collapsed section). */storage?: Record<string, string>;+ /** Query parameters the document URL carries, for a component that reads a deep link from `window.location` (`mcp=github`). */+ search?: string;/** API responses by path plus query (`/api/inbox?session=ses_pm&limit=1`) or by path, for anything else a frame fetches. */api?: Record<string, unknown>;}diff --git a/ui/design/shell/location.ts b/ui/design/shell/location.tsnew file mode 100644index 000000000..072b6242a--- /dev/null+++ b/ui/design/shell/location.ts@@ -0,0 +1,18 @@+// Some components read a deep link straight from the document URL (`?mcp=github`) and then clear it.+// A frame's `search` fixture joins its document URL before anything renders, and the frame's own URL+// comes back once the frame has mounted, so a reload still draws the same frame.++let frameUrl: string | null = null;++export const designLocation = {+ enter(search?: string) {+ frameUrl = window.location.href;+ if (!search) return;+ const url = new URL(frameUrl);+ for (const [key, value] of new URLSearchParams(search)) url.searchParams.append(key, value);+ window.history.replaceState(window.history.state, '', url);+ },+ restore() {+ if (frameUrl !== null && window.location.href !== frameUrl) window.history.replaceState(window.history.state, '', frameUrl);+ },+};diff --git a/ui/src/components/workbench/skills/ProjectPicker.tsx b/ui/src/components/workbench/skills/ProjectPicker.tsxindex 5dda9c744..7a53daa62 100644--- a/ui/src/components/workbench/skills/ProjectPicker.tsx+++ b/ui/src/components/workbench/skills/ProjectPicker.tsx@@ -11,8 +11,8 @@ export interface ProjectPickerProps {onChange: (projectId: string) => void;}-/** Dropdown that switches which project's skills are being managed. Mirrors the- * open-state in design.pen — the project list is the workbench sidebar's. */+/** Dropdown that switches which project's skills are being managed; the project+ * list is the workbench sidebar's. */export function ProjectPicker({ projects, value, onChange }: ProjectPickerProps) {const { t } = useTranslation();const [open, setOpen] = useState(false);