Design System
A compact desktop interface shared by Doctor, Deploy and generated apps. Shared components live in @ossiframe/ui (packages/ui); module pages live in each module's ui/ folder.
Rules
- Layout: resizable left sidebar (server selector, quick switcher, grouped pages, theme menu), a page header with server, connection state and actions, then the page. Pages sharing a
sectionform one sidebar entry with tabs. - Dense tables and key-value panels, 4 px spacing scale, system font, monospace for commands, paths, host keys and output.
- Light and dark themes from shared tokens; the default follows the OS.
- Status uses icon plus label, never color alone. Text meets WCAG AA contrast (see below).
- Distinct states: loading, empty, disconnected, unavailable, failed, stale (with age).
- Never show success before the result is verified. On failure show the real exit code and a stderr excerpt.
- Mutations show the plan before approval. Destructive actions sit in a separate danger zone and need typed confirmation.
- Render remote output as text, never HTML.
- Keyboard navigation and visible focus throughout. Transitions stay at or under 120 ms and respect reduced motion.
- Do not copy Ploi or Forge layouts, names, icons or assets.
Stack
React 19, TypeScript, Tailwind CSS 4 (a dev dependency of each app, through @tailwindcss/vite), Radix dialog and dropdown menu primitives, lucide-react icons, class-variance-authority, clsx and tailwind-merge. All but Tailwind live in packages/ui; apps use icons re-exported from @ossiframe/ui. There is no shadcn/ui, Storybook or chart library. @xterm/xterm is a dependency of the app that includes ssh-terminal (Deploy).
Tokens
Defined in packages/ui/src/theme.css on :root and [data-theme="dark"], mapped to Tailwind colors (bg-surface, text-fg-muted, border-border).
| Token | Light | Dark | Use |
|---|---|---|---|
surface | #ffffff | #101012 | Page background |
sidebar | #f7f7f8 | #151518 | Sidebar background |
raised | #ffffff | #1a1a1e | Menus, dialogs |
hover | #f0f0f2 | #222227 | Hover and selected rows |
border | #e5e5e8 | #28282d | Dividers |
border-strong | #d4d4d9 | #36363d | Inputs, buttons |
fg | #18181b | #ececf0 | Primary text |
fg-muted | #5c5c66 | #a3a3ad | Secondary text |
fg-faint | #6c6c76 | #8a8a94 | Hints, metadata |
accent / accent-fg | #4f5bd5 / #ffffff | #8b93f2 / #101012 | Primary action |
ok, warn, danger, info | #1a7f37, #9a6700, #c62828, #0b63ce | #3fb950, #d29922, #f26d6a, #5ea8ff | Status |
focus | #4f5bd5 | #8b93f2 | Focus ring |
Type scale (Tailwind text-*): label 12 px, body 13 px (base), section 14 px, title 18 px, heading 20 px, metric 24 px. Radii: sm 4 px, md 6 px. cn() registers these sizes with tailwind-merge so they survive next to text-<color> classes.
The theme setting (System, Light, Dark) is stored in localStorage as ossiframe.theme and applied as data-theme on <html>; the dark: variant follows it.
Contrast
WCAG 2 contrast ratios of the token pairs above. AA needs 4.5:1 for body text.
| Pair | Light | Dark |
|---|---|---|
fg on surface | 17.72 | 16.13 |
fg on hover | 15.57 | 13.44 |
fg-muted on surface | 6.61 | 7.60 |
fg-muted on sidebar | 6.17 | 7.29 |
fg-faint on surface | 5.19 | 5.56 |
fg-faint on sidebar | 4.85 | 5.33 |
accent-fg on accent | 5.54 | 6.84 |
accent on surface | 5.54 | 6.84 |
ok on surface | 5.08 | 7.48 |
warn on surface | 4.87 | 7.53 |
danger on surface | 5.62 | 6.49 |
info on surface | 5.69 | 7.71 |
Known gap: border-strong on surface is 1.48 (light) and 1.59 (dark), below the 3:1 that WCAG 1.4.11 suggests for control boundaries. Inputs are identified by labels and placeholders; raising the border contrast is a follow-up.
Components (@ossiframe/ui)
- Primitives:
Button,IconButton,Input,Select,Textarea,Checkbox,Field,Badge,Kbd,Shortcut,Mono,Code,Skeleton. - Layout:
PageHeader,Section,Toolbar,Tabs,DataTable(keyboard rows,selectedKey),KeyValue,Metric,StatTile,IconChip,Meter,Panel,MetricChart(optionalareafill andcurrentvalue),ResizeHandleanduseResizable. - Status:
Status,StatusBadge,StateBadge,SeverityBadge,Notice. - States:
LoadingState,EmptyState,DisconnectedState,UnavailableState,ErrorState. - Dialogs and menus:
Dialog,ConfirmDialog,ConfirmRemoveDialog,HostKeyDialog,HostKeyChangedDialog,CredentialDialog,Menuand its items. - Operations:
OperationHeader,StepList,StepOutput,VerificationTable(passed, warning, failed, skipped, unknown),ApprovalLayout(ordered disclosure sections, collapsed technical details). - Shell:
ServerWorkspace(propstitle,pages,welcome,onConnected, children),ServerForm,useWorkspaceNavandPageLink, andAssistProviderandAssistButtonfor the optional AI panel.
Module pages declare ModuleUi with optional group, section, icon and offline. offline: true keeps a page reachable while disconnected, for pages that show stored data or recovery guidance (provisioning Operation and History, Applications, Doctor Reports).
The component gallery opens at #gallery in development builds only.
Status colour, bars and tiles
Meteris a usage bar (role="meter"): accent below 75%, warning from 75%, danger from 90% (levelOfin@ossiframe/ui); filesystems use 85% and 95%. The value is also written as text.StatTileis an icon chip, label, large value, optional sub-line and optionalMeter, for a page's headline numbers.Panelis a bordered block for a group or chart.Checkboxis drawn with tokens (.oss-checkboxintheme.css), identical in light and dark. Give its cell the same vertical padding as text cells to align it with the first line.- Monitoring opens with a health summary from
assess(modules/linux-monitoring/ui/health.ts): CPU and memory warn at 75%, critical at 90%; swap warns at 50%; filesystems warn at 85%, critical at 95%. Missing values are reported as not checked, never guessed. - The terminal uses a 16-colour palette for light and dark, read from
data-theme.
Keyboard
| Keys | Action |
|---|---|
⌘K / Ctrl+K | Quick switcher (servers and pages); arrows and Enter to choose |
⌘\ / Ctrl+\ | Show or hide the sidebar |
| Arrow Up/Down, Home, End | Move through sidebar entries |
| Arrow Left/Right, Home, End | Move between tabs |
| Enter or Space | Open the focused table row |
| Arrow Left/Right, Home, End on a resize handle | Resize the sidebar or the AI panel |
| Esc | Close dialogs and menus |
Global shortcuts are ignored while typing in inputs or the terminal.
Navigation
Sidebar order follows pages in each app's src/modules.ts. Apps set grouping, titles and icon overrides.
- Deploy:
- Overview
- Applications (shown while disconnected; a list, then per application the tabs Overview, Deploy, Repository, Releases, Environment, Settings)
- Provisioning (tabs Software, Preflight, Plan, Operation, History; Operation and History stay reachable while disconnected)
- Monitoring, Logs, Files, Tunnels, Terminal, Assistant
- Doctor:
- Overview (the combined inventory and assessment page)
- Audit group: Diagnostics, Security, Network, Services, Software, Reports (Reports stays reachable while disconnected)
- Monitoring, Logs, Assistant
- No "apply fix" actions.
- Generated apps: one entry per page of each selected module, except pages another module replaces (
replaces).
