moi-computer 0.12.1-next.4 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/client/features/chat/messages/tool-group/subagent-card.tsx +1 -0
  2. package/client/features/collab/components/user-avatar.tsx +4 -10
  3. package/client/features/connectors/api.ts +12 -4
  4. package/client/features/connectors/mcp-server-cards.tsx +17 -7
  5. package/client/features/connectors/read-connectors.ts +35 -0
  6. package/client/features/dev/collab/local-user-settings.tsx +1 -1
  7. package/client/features/workspace/harness-transition.ts +1 -0
  8. package/client/features/workspace/settings/connectors-settings.tsx +31 -10
  9. package/client/features/workspace/settings/general-settings.tsx +17 -14
  10. package/dist/{chunk-g0tcwqxc.js → chunk-bncc7heg.js} +1 -1
  11. package/dist/{chunk-71fn6rmj.js → chunk-cqt3s31j.js} +23 -23
  12. package/dist/{chunk-v88n1bay.js → chunk-dcmks9sm.js} +43 -42
  13. package/dist/chunk-md45evr2.css +1 -0
  14. package/dist/{chunk-0mjzg20x.js → chunk-nmzhgyp9.js} +2 -2
  15. package/dist/chunk-q37knr3m.js +2 -0
  16. package/dist/chunk-s90m4qkz.js +1 -0
  17. package/dist/{chunk-7yg1m8hx.js → chunk-wjvd4byz.js} +2 -2
  18. package/dist/index.html +1 -1
  19. package/lib/types.ts +4 -2
  20. package/package.json +3 -1
  21. package/server/api/index.ts +26 -1
  22. package/server/harness/claude-code/index.ts +3 -6
  23. package/server/harness/claude-code/mcp.ts +17 -0
  24. package/server/harness/codex/NOTES.md +9 -2
  25. package/server/harness/codex/client.ts +8 -5
  26. package/server/harness/codex/connectors.ts +92 -0
  27. package/server/harness/codex/index.ts +2 -1
  28. package/server/harness/codex/pagination.ts +8 -5
  29. package/server/harness/codex/transport.ts +13 -6
  30. package/server/harness/types.ts +4 -1
  31. package/server/onboarding/prompt.md +2 -2
  32. package/skill/references/DESIGN.md +22 -3
  33. package/dist/chunk-5aj040e5.css +0 -1
  34. package/dist/chunk-825hys3h.js +0 -1
  35. package/dist/chunk-9bb8m9rx.js +0 -2
package/dist/index.html CHANGED
@@ -55,7 +55,7 @@
55
55
  <link rel="modulepreload" href="/vendor/react/19.2.4/production/react-dom-client.js" />
56
56
  <link rel="modulepreload" href="/vendor/react/19.2.4/production/_impl/react-dom-client.js" />
57
57
 
58
- <link rel="stylesheet" crossorigin href="/chunk-5aj040e5.css"><script type="module" crossorigin src="/chunk-0mjzg20x.js"></script></head>
58
+ <link rel="stylesheet" crossorigin href="/chunk-md45evr2.css"><script type="module" crossorigin src="/chunk-nmzhgyp9.js"></script></head>
59
59
  <body>
60
60
  <div id="root"></div>
61
61
 
package/lib/types.ts CHANGED
@@ -512,13 +512,15 @@ export type WorkspaceIcon =
512
512
  | { type: 'glyph'; value: IdentityIconId; background?: 'theme' }
513
513
  | { type: 'upload'; value: string }
514
514
 
515
- // One MCP server's connection status, as surfaced by GET /api/workspaces/:id/mcp
516
- // (a subset of the agent SDK's McpServerStatus — only what the UI renders).
515
+ // One connector's status, as surfaced by GET /api/workspaces/:id/mcp.
516
+ // Includes standalone MCP servers and individual hosted apps.
517
517
  export type McpServerState = 'connected' | 'failed' | 'needs-auth' | 'pending' | 'disabled'
518
518
 
519
519
  export type McpServer = {
520
520
  name: string
521
521
  status: McpServerState
522
+ displayName?: string
523
+ iconUrl?: string
522
524
  }
523
525
 
524
526
  export type WorkspaceEntry = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moi-computer",
3
- "version": "0.12.1-next.4",
3
+ "version": "0.13.0",
4
4
  "description": "Local AI workspace powered by the Claude Agent SDK, Bun, React, and Tailwind. Requires Bun.",
5
5
  "license": "Elastic-2.0",
6
6
  "type": "module",
@@ -52,6 +52,7 @@
52
52
  "lint:fix": "oxlint --fix",
53
53
  "registry:validate": "shadcn registry validate",
54
54
  "typecheck": "tsc -p tsconfig.json",
55
+ "test:visual": "bun tests/visual/run.ts",
55
56
  "format": "oxfmt",
56
57
  "format:check": "oxfmt --check",
57
58
  "prepare": "git config core.hooksPath .githooks",
@@ -127,6 +128,7 @@
127
128
  "@types/react-dom": "^19.2.7",
128
129
  "@types/react-grid-layout": "^2.1.0",
129
130
  "@types/react-resizable": "^3.0.8",
131
+ "@uiverify/bun": "1.0.0",
130
132
  "bun": ">=1.4.4",
131
133
  "date-fns": "^4.4.0",
132
134
  "embla-carousel-react": "^8.6.0",
@@ -613,7 +613,32 @@ one.get('/sessions/:sessionId/events', async c => {
613
613
 
614
614
  one.get('/mcp', async c => {
615
615
  const ws = c.get('ws')
616
- return c.json((await harnessFor(ws).mcpStatus?.(ws)) ?? [])
616
+ const harness = harnessFor(ws)
617
+ if (c.req.query('stream') !== 'true') return c.json((await harness.mcpStatus?.(ws)) ?? [])
618
+ let cancelled = false
619
+ const encoder = new TextEncoder()
620
+ return new Response(
621
+ new ReadableStream({
622
+ async start(controller) {
623
+ const emit = (frame: unknown) => {
624
+ if (!cancelled) controller.enqueue(encoder.encode(JSON.stringify(frame) + '\n'))
625
+ }
626
+ try {
627
+ const connectors =
628
+ (await harness.mcpStatus?.(ws, connectors => emit({ connectors }))) ?? []
629
+ emit({ connectors, done: true })
630
+ } catch {
631
+ emit({ error: 'Could not load connectors' })
632
+ } finally {
633
+ if (!cancelled) controller.close()
634
+ }
635
+ },
636
+ cancel() {
637
+ cancelled = true
638
+ }
639
+ }),
640
+ { headers: { 'Content-Type': 'application/x-ndjson', 'Cache-Control': 'no-store' } }
641
+ )
617
642
  })
618
643
 
619
644
  // Harness debug tap for /dev/harness: the backend's native wire frames
@@ -4,13 +4,11 @@ import { runClaudeAction } from './run-action'
4
4
  import { join } from 'node:path'
5
5
  import { forkSession } from '@anthropic-ai/claude-agent-sdk'
6
6
 
7
- import type { McpServer } from '@/lib/types'
8
-
9
7
  import type { DiscoveredWorkspaceCandidate, Harness } from '../types'
10
8
  import { findHarnessExecutable, pathHarnessAvailability } from '../executable'
11
9
  import { getClaudeAuthReadiness, startClaudeLogin } from './auth'
12
10
  import { isLinkedGitWorktree } from './git-worktree'
13
- import { getMcpStatus } from './mcp'
11
+ import { claudeConnectors, getMcpStatus } from './mcp'
14
12
  import { getClaudeModels, lastProbedClaudeCli, onClaudeCliChanged } from './models'
15
13
  import {
16
14
  SESSION_LIMITS,
@@ -106,9 +104,8 @@ export const claudeCodeHarness: Harness = {
106
104
  getSessionWorkspacePreview(ws.path, includeFirstUserMessage),
107
105
  sessionEvents: (ws, sessionId) => getSessionEvents(sessionId, ws.path),
108
106
  listModels: ws => getClaudeModels(ws.path),
109
- // The SDK's McpServerStatus is a superset of the UI's McpServer (extra
110
- // fields are ignored by the client) — pass it through unchanged.
111
- mcpStatus: async ws => (await getMcpStatus(ws.path)) as unknown as McpServer[],
107
+ // Expose only provider apps and explicitly configured MCP servers.
108
+ mcpStatus: async ws => claudeConnectors(await getMcpStatus(ws.path)),
112
109
  discoverWorkspaces,
113
110
  availability: async ws => {
114
111
  const runtime = await pathHarnessAvailability('claude-code')
@@ -1,5 +1,22 @@
1
1
  import { query } from '@anthropic-ai/claude-agent-sdk'
2
2
  import type { McpServerStatus, SDKUserMessage } from '@anthropic-ai/claude-agent-sdk'
3
+ import type { McpServer } from '@/lib/types'
4
+
5
+ export function claudeConnectors(servers: McpServerStatus[]): McpServer[] {
6
+ const customSources = new Set(['user', 'project', 'local', 'managed', 'enterprise', 'plugin'])
7
+ return servers.flatMap(server => {
8
+ const source = server.source ?? server.scope
9
+ if (source === 'sdk' || source === 'agent' || source === 'dynamic') return []
10
+ const app = source === 'claudeai' || server.config?.type === 'claudeai-proxy'
11
+ if (!app && (!source || !customSources.has(source))) return []
12
+ return [
13
+ {
14
+ name: server.name,
15
+ status: server.status
16
+ }
17
+ ]
18
+ })
19
+ }
3
20
 
4
21
  import { claudeCodeSpawn } from '../../agent-launcher'
5
22
  import { debugEnabled } from '../../debug'
@@ -209,8 +209,15 @@ Before restoring support:
209
209
  is required. The status request omits resource catalogs with `toolsAndAuthOnly`.
210
210
  It targets the workspace's most recently observed loaded chat, since an
211
211
  app-scoped request can return null runtime states.
212
- Full tool definitions are not carried into connector display rows. `codex_apps` branding
213
- uses the dotted tool-name prefix; connector `_meta` is not forwarded.
212
+ Settings list accessible apps from `app/list`, joined with `app/installed` for
213
+ runtime state. Custom MCP servers must have an explicit user, project, or admin
214
+ configuration layer; injected and packaged servers are omitted. Discovery failures
215
+ reach the Settings retry state. Full tool definitions and connector `_meta` are
216
+ not forwarded to display rows.
217
+ Settings request `/mcp?stream=true` for incremental NDJSON snapshots. Codex
218
+ `app/list/updated` notifications and paginated results feed partial rows; only
219
+ the final snapshot marks discovery complete. `app/list` has a 60-second RPC
220
+ deadline while other methods retain the default 30 seconds.
214
221
 
215
222
  ## Diagnostics and maintenance
216
223
 
@@ -2,6 +2,7 @@
2
2
  // threads share the connection. Framing lives in transport.ts; see NOTES.md
3
3
  // for lifecycle, configuration, and wire-type maintenance.
4
4
  import { homedir } from 'node:os'
5
+ import { expandCodexApps } from './connectors'
5
6
 
6
7
  import type { McpServer, Model, SessionSummary, StreamEvent } from '@/lib/types'
7
8
 
@@ -50,7 +51,7 @@ export function getCodexProcessInfo(workspacePath: string): Promise<CodexProcess
50
51
  }
51
52
 
52
53
  export type CodexClient = {
53
- rpc: <T>(method: string, params?: Json) => Promise<T>
54
+ rpc: <T>(method: string, params?: Json, options?: { timeoutMs?: number }) => Promise<T>
54
55
  onNotification: (l: NotificationListener) => () => void
55
56
  isAlive: () => boolean
56
57
  workspacePath: string
@@ -359,7 +360,8 @@ export async function getCodexModels(workspacePath: string): Promise<Model[]> {
359
360
  // Runtime status distinguishes failed/disabled servers from authenticated ones.
360
361
  export async function getCodexMcpStatus(
361
362
  workspacePath: string,
362
- sessionId?: string
363
+ sessionId?: string,
364
+ onProgress?: (connectors: McpServer[]) => void
363
365
  ): Promise<McpServer[]> {
364
366
  try {
365
367
  const client = await getCodexClient(workspacePath)
@@ -371,12 +373,13 @@ export async function getCodexMcpStatus(
371
373
  detail: 'toolsAndAuthOnly',
372
374
  ...(sessionId ? { threadId: sessionId } : {})
373
375
  })
374
- return servers
376
+ const mapped = servers
375
377
  .filter((s): s is { name: string; authStatus?: string } => typeof s.name === 'string')
376
378
  .map(codexMcpServerToServer)
379
+ return await expandCodexApps(client, mapped, sessionId, workspacePath, onProgress)
377
380
  } catch (err) {
378
- console.error('[codex] mcpServerStatus/list failed', err)
379
- return []
381
+ console.error('[codex] connector discovery failed', err)
382
+ throw err
380
383
  }
381
384
  }
382
385
 
@@ -0,0 +1,92 @@
1
+ import type { McpServer } from '@/lib/types'
2
+ import type { CodexClient } from './client'
3
+ import { readCodexPages } from './pagination'
4
+
5
+ type InstalledApp = { id: string; enabled: boolean; callable: boolean }
6
+ type App = {
7
+ id: string
8
+ name: string
9
+ logoUrl: string | null
10
+ isAccessible: boolean
11
+ isEnabled: boolean
12
+ }
13
+ type ConfigLayer = {
14
+ name: { type: string }
15
+ config: { mcp_servers?: Record<string, unknown> }
16
+ disabledReason?: string | null
17
+ }
18
+
19
+ const customSources = new Set([
20
+ 'user',
21
+ 'project',
22
+ 'system',
23
+ 'mdm',
24
+ 'enterpriseManaged',
25
+ 'legacyManagedConfigTomlFromFile',
26
+ 'legacyManagedConfigTomlFromMdm'
27
+ ])
28
+
29
+ export async function expandCodexApps(
30
+ client: Pick<CodexClient, 'rpc'> & Partial<Pick<CodexClient, 'onNotification'>>,
31
+ servers: McpServer[],
32
+ sessionId?: string,
33
+ workspacePath?: string,
34
+ onProgress?: (connectors: McpServer[]) => void
35
+ ): Promise<McpServer[]> {
36
+ const context = sessionId ? { threadId: sessionId } : {}
37
+ const config = await client.rpc<{ layers: ConfigLayer[] | null }>('config/read', {
38
+ cwd: workspacePath,
39
+ includeLayers: true
40
+ })
41
+ // Only explicit configuration belongs in the custom-server list. Runtime-injected
42
+ // and packaged tools have no user/project/admin definition.
43
+ const customNames = new Set(
44
+ (config.layers ?? [])
45
+ .filter(layer => !layer.disabledReason && customSources.has(layer.name.type))
46
+ .flatMap(layer => Object.keys(layer.config.mcp_servers ?? {}))
47
+ )
48
+ const custom = servers.filter(
49
+ server => server.name !== 'codex_apps' && customNames.has(server.name)
50
+ )
51
+ if (!servers.some(server => server.name === 'codex_apps')) return custom
52
+
53
+ onProgress?.(custom)
54
+ const installed = await client.rpc<{ apps: InstalledApp[] }>('app/installed', context)
55
+ const runtime = new Map(installed.apps.map(app => [app.id, app]))
56
+ const toConnectors = (apps: App[]): McpServer[] => [
57
+ ...custom,
58
+ ...apps.map((app): McpServer => {
59
+ const state = runtime.get(app.id)
60
+ return {
61
+ name: `codex_apps/${app.id}`,
62
+ displayName: app.name,
63
+ iconUrl: app.logoUrl ? new URL(app.logoUrl, 'https://chatgpt.com').href : undefined,
64
+ status: !(state?.enabled ?? app.isEnabled)
65
+ ? 'disabled'
66
+ : state?.callable
67
+ ? 'connected'
68
+ : 'pending'
69
+ }
70
+ })
71
+ ]
72
+ const progressApps = new Map<string, App>()
73
+ const publish = (apps: App[]) => {
74
+ for (const app of apps) if (app.isAccessible) progressApps.set(app.id, app)
75
+ onProgress?.(toConnectors([...progressApps.values()]))
76
+ }
77
+ const unsubscribe = client.onNotification?.((method, params) => {
78
+ if (method !== 'app/list/updated' || !Array.isArray(params.data)) return
79
+ publish(params.data as App[])
80
+ })
81
+ try {
82
+ const apps = await readCodexPages<App>(
83
+ client,
84
+ 'app/list',
85
+ { ...context, limit: 100 },
86
+ { timeoutMs: 60_000, onPage: publish }
87
+ )
88
+ return toConnectors(apps.filter(app => app.isAccessible))
89
+ } finally {
90
+ unsubscribe?.()
91
+ }
92
+ }
@@ -81,7 +81,8 @@ export const codexHarness: Harness = {
81
81
  }
82
82
  },
83
83
  listModels: ws => getCodexModels(ws.path),
84
- mcpStatus: ws => getCodexMcpStatus(ws.path, getLatestCodexSessionId(ws.id)),
84
+ mcpStatus: (ws, onProgress) =>
85
+ getCodexMcpStatus(ws.path, getLatestCodexSessionId(ws.id), onProgress),
85
86
  discoverWorkspaces: registeredPaths => discoverCodexWorkspaces(registeredPaths),
86
87
  availability: async ws => {
87
88
  const runtime = await pathHarnessAvailability('codex')
@@ -5,17 +5,20 @@ import type { CodexClient } from './client'
5
5
  export async function readCodexPages<T>(
6
6
  client: Pick<CodexClient, 'rpc'>,
7
7
  method: string,
8
- params: Record<string, unknown> = {}
8
+ params: Record<string, unknown> = {},
9
+ options?: { timeoutMs?: number; onPage?: (rows: T[]) => void }
9
10
  ): Promise<T[]> {
10
11
  const rows: T[] = []
11
12
  const cursors = new Set<string>()
12
13
  let cursor: string | undefined
13
14
  do {
14
- const page = await client.rpc<{ data?: T[]; nextCursor?: string | null }>(method, {
15
- ...params,
16
- ...(cursor ? { cursor } : {})
17
- })
15
+ const page = await client.rpc<{ data?: T[]; nextCursor?: string | null }>(
16
+ method,
17
+ { ...params, ...(cursor ? { cursor } : {}) },
18
+ options?.timeoutMs === undefined ? undefined : { timeoutMs: options.timeoutMs }
19
+ )
18
20
  rows.push(...(page.data ?? []))
21
+ options?.onPage?.(page.data ?? [])
19
22
  cursor = page.nextCursor || undefined
20
23
  if (cursor && cursors.has(cursor)) throw new Error(`Codex ${method} repeated a page cursor`)
21
24
  if (cursor) cursors.add(cursor)
@@ -17,7 +17,7 @@ export class CodexRpcError extends Error {
17
17
  }
18
18
 
19
19
  export type CodexTransport = {
20
- rpc: <T>(method: string, params?: Json) => Promise<T>
20
+ rpc: <T>(method: string, params?: Json, options?: { timeoutMs?: number }) => Promise<T>
21
21
  notify: (method: string, params?: Json) => void
22
22
  onNotification: (listener: NotificationListener) => () => void
23
23
  isAlive: () => boolean
@@ -92,14 +92,21 @@ export function createCodexTransport(options: TransportOptions): CodexTransport
92
92
  }
93
93
  }
94
94
 
95
- function rpc<T>(method: string, params: Json = {}): Promise<T> {
95
+ function rpc<T>(
96
+ method: string,
97
+ params: Json = {},
98
+ requestOptions?: { timeoutMs?: number }
99
+ ): Promise<T> {
96
100
  if (!alive) return Promise.reject(new Error('ChatGPT app-server is not running'))
97
101
  const id = nextId++
98
102
  return new Promise<T>((resolve, reject) => {
99
- const timer = setTimeout(() => {
100
- pending.delete(id)
101
- reject(new Error(`ChatGPT request timed out: ${method}`))
102
- }, options.timeoutMs ?? 30_000)
103
+ const timer = setTimeout(
104
+ () => {
105
+ pending.delete(id)
106
+ reject(new Error(`ChatGPT request timed out: ${method}`))
107
+ },
108
+ requestOptions?.timeoutMs ?? options.timeoutMs ?? 30_000
109
+ )
103
110
  // Register before writing: a synchronous response must find its waiter.
104
111
  pending.set(id, { resolve: resolve as (value: unknown) => void, reject, timer })
105
112
  send({ jsonrpc: '2.0', id, method, params })
@@ -136,7 +136,10 @@ export type Harness = {
136
136
  sessionEvents(ws: WorkspaceEntry, sessionId: string): Promise<StreamEvent[]>
137
137
  listModels(ws: WorkspaceEntry): Promise<Model[]>
138
138
  // MCP server status for the connectors UI; absent = backend has no MCP story.
139
- mcpStatus?(ws: WorkspaceEntry): Promise<McpServer[]>
139
+ mcpStatus?(
140
+ ws: WorkspaceEntry,
141
+ onProgress?: (connectors: McpServer[]) => void
142
+ ): Promise<McpServer[]>
140
143
  // Workspaces this backend knows about that aren't registered yet.
141
144
  discoverWorkspaces?(registeredPaths: Set<string>): Promise<DiscoveredWorkspaceCandidate[]>
142
145
  // Without a workspace, only check whether the runtime is installed. With a
@@ -35,12 +35,12 @@ Use sentence case for workspace, view, and widget names, preserving proper nouns
35
35
 
36
36
  ### Views and widgets
37
37
 
38
- Include exactly three full-page views, each with its own tab and build chat, and optionally up to four focused Overview widgets. For each, provide:
38
+ Include exactly three full-page views, each with its own tab and build chat, and two to four focused Overview widgets. For each, provide:
39
39
 
40
40
  - A sentence-case name.
41
41
  - For views, a relevant built-in Moi icon ID. The workspace and view icons within each option must all be different.
42
42
  - A short description of its purpose and content.
43
- - Only the features needed for one small, complete workflow. Aim for two or three focused features per view, covering its main action, needed data, and saved state. For widgets, include the main action or link to a view where useful.
43
+ - Only the features needed for one small, complete workflow. Aim for two or three focused features per view, covering its main action, needed data, and saved state. Each widget must show live information or let people act in place; never plan one that only links to a view.
44
44
 
45
45
  Keep each plan small and ready to build. Include useful source references and access limitations in the features, without private transcripts or secrets. Do not promise integrations you haven't verified.
46
46
 
@@ -80,9 +80,17 @@ Use the shared radius scale and existing control shapes. Reserve `rounded-full`
80
80
 
81
81
  ### Texture
82
82
 
83
- Texture is optional, limited to the root, and backed by an opaque semantic color: `texture-checker`, `texture-grid`, `texture-noise`, `texture-gradient-linear`, or `texture-inset-shadow`.
83
+ Texture gives an open surface depth and character without adding containers or decoration. It helps most where content is sparse and the background shows. A view filled with content is fine without one. Apply it to the root next to an opaque semantic color, such as `bg-background texture-noise`.
84
84
 
85
- Behind dense content, use plain `bg-background`, `texture-gradient-linear`, or `texture-inset-shadow`; checker, grid, and noise may only surround an opaque work area. Never stack or tune textures, or put them behind full-bleed media. Coordinate related widgets and views.
85
+ | Texture | Look | Use for |
86
+ | ------------------------- | ---------------------------------------- | ---------------------------------------------- |
87
+ | `texture-gradient-linear` | Soft tint that deepens toward the bottom | The default; safe behind any content |
88
+ | `texture-inset-shadow` | Soft glow around the edges | A focal value or a centered composition |
89
+ | `texture-noise` | Fine grain | A tactile surface behind sparse, large content |
90
+ | `texture-grid` | Thin 24 px line grid | Plans, schedules, drawing, and measurement |
91
+ | `texture-checker` | 32 px checker, the strongest pattern | Playful content, games, and placeholder areas |
92
+
93
+ Pick the texture that suits the content, and keep related widgets and views on the same one. Behind dense content such as tables or long text, use only the gradient or inset shadow. Use one texture per applet.
86
94
 
87
95
  ### Interaction and states
88
96
 
@@ -103,10 +111,21 @@ Use brief, interruptible motion to explain changes or acknowledge input. Respect
103
111
 
104
112
  ## Widgets
105
113
 
106
- **Widgets support a quick glance or immediate action.** Choose the smallest footprint that presents the content clearly. Keep the main information prominent and supporting controls limited to the immediate task. Put tabs, deeper navigation, and multi-step work in a view. Keep hover feedback on controls; leave the widget surface unchanged.
114
+ Each widget does one of two jobs:
115
+
116
+ - **Glance:** summarizes current information and emphasizes the key value.
117
+ - **Action:** completes one small task in place. Prefer an action widget when the task fits the footprint.
118
+
119
+ A widget must add value beyond navigation. The Overview already lists every view, so a widget that only opens a view is redundant. Show real content or let people act in place; a link to a view is secondary.
120
+
121
+ Never show content that invites an interaction the widget cannot complete.
122
+
123
+ Choose the smallest footprint the content fills. If a large part of the widget is empty, reduce its span. Keep supporting controls limited to the immediate task. Don't put tabs, deeper navigation, or multi-step work in a widget. Keep hover feedback on controls, but leave the widget surface unchanged.
107
124
 
108
125
  The host owns the widget’s outer shape, clipping, and elevation. Do not add another outer card.
109
126
 
127
+ Give every widget root a [texture](#texture) so it does not look flat, unless media or a visualization fills it edge to edge.
128
+
110
129
  The grid has four columns, 160 px rows, 8 px gaps, and a maximum width of 640 px. Widgets span one to four rows and columns. Width is flexible; height is fixed:
111
130
 
112
131
  `rowSpan × 160 + (rowSpan − 1) × 8`