Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 4.78 KB

DESIGN.md

File metadata and controls

32 lines (22 loc) · 4.78 KB

Grok Node local extensions

1. Reference and identity

Preserve existing desktop surfaces. The user-supplied Bot import screenshot (2026-09-22) defines a full modal, top back/share/close controls, avatar and name, primary import button, description, divider, and five detail tabs. The extension runs inside the pinned renderer as real DOM.

2. Color

Reuse --cursor-bg-elevated, --cursor-bg-editor, --cursor-text-primary, --cursor-text-secondary, --cursor-border-secondary and --cursor-stroke-focused. Dark reference fallbacks: panel #181818, detail/selected #111111, primary #fafafa, secondary #aaa, border #3b3b3b. Light fallbacks follow system preference until app tokens are ready. Avatar accent comes from validated public template data.

3. Typography

Use the app font (--cursor-font-family-sans; system sans fallback). Preview scale: title 28px/1.2, body and tabs 18px/1.5, notes 14px/1.5. Instructions preserve newlines and wrap; CJK labels remain whole.

4. Spacing and layout

Base unit 4px. Modal inset 8px; radius 20px; maximum width 1240px; height viewport minus 16px. Header 64px, content gutter 56px, avatar 100px, section gap 32px. Details columns 280px/minmax(0,1fr), gap 32px. At 760px gutters are 24px and tabs wrap horizontally; at 440px gutters are 16px. Content scrolls inside the modal without horizontal overflow.

5. Primitives and states

Native dialog provides focus trapping, Escape and restoration. IconButton (back/share/close), PrimaryButton (ready/busy/error), DetailTab (selected/focused), ContentPanel (instructions/unavailable), and BotAvatar are reusable extension primitives. SVG icons and DOM text only. Template records are text, never executable HTML. Loading and errors share the shell with a retry button.

6. Interaction and motion

Opening a link displays a preview and creates nothing. Back, close and Escape cancel. Import disables while creating and retains its preview token for retry. Success focuses the created local Bot. Share copies the public link with feedback. No decorative animation.

7. Accessibility

Named dialog and controls. Tabs support arrows/Home/End and roving focus, linked to a labelled tabpanel. Visible focus outlines. Status uses aria-live; errors use role=alert. Buttons retain disabled semantics. Modal scrolls at narrow widths and increased zoom.

8. Data fidelity and QA

The HTML share page is only a summary. The authenticated GetGrokBotTemplateImportDetails endpoint supplies a download URL for the complete recipe. Until that recipe is fetched, show details as not loaded and disable import; absence from HTML does not mean an empty category. Keep instructions separate from the share description. Test dialog, cancellation, authorization failure, tabs and desktop/narrow viewports. Keep renderer inventory and checksum verification intact; append the extension only to the audited registry chunk.

9. Agent API native controls

The Agent API workbench uses its existing vanilla HTML forms and web/style.css tokens. Execution mode uses the same labelled native select, hint paragraph, disabled state and focus ring as the model selector. Codex is the default. Native chat disables API model overrides and explains that Grok Node owns those settings. Existing sessions retain their execution mode. This extension adds no layout, colors, animations or dependencies.

10. Application link cards (0.71.2)

The supplied computer-link screenshots and the shipped 0.71.2 FYe/Y1/UY/wJ components define this surface. Reuse the native hover-card portal, keyboard handling and navigation. Inline chips use the shipped inserted-chip classes: 4px gap, 3px inline padding, -3px inline margin, 6px radius, one line-height, inherited text color, 16px icon container. The preview is 300px wide (bounded by the viewport), with a 32px icon, title, secondary byline, optional description and a separated footer action. Copy missing atomic rules from the pinned reference with provenance; do not invent colors or motion. Hover and focus reveal the preview; clicking the chip or footer opens the same destination; Enter and Space activate it. Invalid and unresolved destinations remain text. Settings, right-pane, Bot, routine, plugin and template links use existing local navigation. Task links require a locally resolvable thread. Opening a computer card never acquires control, rebuilds a computer or changes permissions. The global Computer section composes the pinned local-execution permission row and the existing shared-computer maintenance group. It uses the native settings sidebar, header, scroll pane, row groups and real pending/confirmation states. Computer, update-computer and reset-computer links reveal and focus their corresponding group. Preview bylines include the native section name, such as Settings · Computer. Account-specific controls without a local backend are not fabricated.