Open-source Grok Bot alternative with a virtual machine that bots can use
OpenMausBot design rules
These are the rules for how OpenMausBot looks, reads and behaves. They cover
the desktop and web app in src/. Every UI change follows them, whoever
writes it: a maintainer, a first-time contributor or a coding agent.
They are rules, not suggestions. A reviewer can point at a section number and ask for a change. If a rule stops you from doing the right thing, change the rule in the same PR and say why in the description. Don't quietly break it.
Older screens don't all follow these rules yet. New and changed UI does. Fix what you touch as you go; don't restyle the app in sweeps, which conflict with everyone else's work.
Several rules are enforced by tests and scripts; section 15 lists them. The rest rely on review.
1. Principles
- Calm by default. The resting screen is quiet. Nothing blinks, counts or competes for attention unless the person needs to act. When in doubt, leave it out.
- One product. A new screen looks like it was always there. Use the tokens, components and words that already exist. A one-off style is a bug.
- Name it, don't explain it. A good label beats a paragraph. If a control needs a sentence of help text to be understood, rename or redesign it first.
- Plain words. Say what a person knows, not what the code calls it: "AI", not "engine"; "cloud desktop", not "VM".
- Every state is designed. Empty, loading, error, long text, narrow window, light and dark skins. Nobody ships only the happy path.
- Everyone can use it. Keyboard, touch, screen readers, right-to-left languages and reduced motion are part of the design, not a follow-up.
- Borrow the feel, never the form. Another product can inspire the finish. Don't copy its signature parts; build ours.
2. Where things go
The app has three places: the sidebar (bots and conversations), the chat, and the bot panel (everything about one bot). Put new things where they belong instead of adding new places.
- No new header buttons. The chat header shows the bot, its model and its screen; Advanced mode's composer shows the model under its field instead. Anything else goes in the bot panel, a menu or the command palette. A button that exists only while the conversation has what it shows (its pinned message) is fine: it opens a menu and is gone when there is nothing to show. One exception: New thread (a plus, also ⌘T) sits at the end of the header in both modes, because starting a thread is an everyday action people look for at the top. With Thread tabs on, the bot's threads take the pill's place in the header as tabs, with the plus at their end. With it off, Simple mode's pill opens a bot's threads in a menu under it once it has two, with New thread as the menu's last row.
- No count badges and no "needs you" summaries above the sidebar list or in the header. A status mark on the row it belongs to is fine.
- Settings for one bot live in its bot panel. App-wide settings live in Settings. Don't add a second home for the same setting.
- No new settings. No new global settings, toggles or hidden flags. Make
the behaviour automatic with a good default. An optional field on something
the person sets up is fine. One exception: Settings → Features, a short
list of plain on/off switches for whole features some people don't want
(Skill Burger, thread tabs, room feed). It's there so
Simple mode can turn off one feature at a time without switching to
Advanced. A switch goes there only when its off state is clean: the feature
is hidden whole, and nothing the person made is lost.
A second, by the owner's call: two looks a bot changes when the person asks
(
app_settings), in either mode. How plan usage shows beside the model (bars, the default, or one ring) has a row in Appearance in Advanced mode; the order of the composer's end buttons has no row. Both default to what the app drew before. - No new asks. No new permission asks, approval cards, confirm dialogs, nags or waits that interrupt the person, and no default below Full access. A bot gets on with the work; a change that needs undoing gets Undo.
- Bots set themselves up. A new bot asks its questions in chat
(
/setup). Don't add form fields for things the bot can learn by asking. - Simple mode comes first. It is the default for new installs. Design the Simple version, then decide what Advanced adds (see section 13).
- Don't hide everyday features. A thing most people use must be reachable in two clicks from the chat in Simple mode.
3. Colour
Every colour comes from a token in src/styles.css. Use
them through Tailwind (bg-panel, text-ink-secondary, border-hairline).
| Job | Tokens |
|---|---|
| Surfaces | app (chat), panel (sidebar), card, raised / raised-hover (selected row), inset (search field), control, menu / menu-hover / menu-active, composer |
| Text | ink (primary), ink-secondary (supporting), ink-tertiary (timestamps, hints, placeholders) |
| Lines | hairline (borders, dividers), edge (where two panes meet) |
| Accent | accent, accent-text (accent-coloured text), accent-ink (text on an accent fill), focus (keyboard ring) |
| Status | success, warning, danger, each with an -ink for text on its fill |
| Bots | identity-*, one per bot colour |
Rules:
- No raw colours. No hex,
rgb(), or Tailwind palette classes (text-gray-500,bg-white,text-black). A skin can't restyle them. The only exception is a third-party logo that needs its own plate. - Hover and pressed fills are ink at low opacity:
hover:bg-ink/[0.06],active:bg-ink/[0.08]. They work on every skin. - Hierarchy comes from ink, not colour. Use the three ink levels and size. Don't use grey hex values or extra opacity to make a fourth level.
- Accent is rare. Use it for links, focus and the selected state. In Midnight and Daylight the primary button is a neutral ink pill, not an accent one. Give a view one primary action at most.
- Status colours mean status. Use
dangerfor destructive actions and errors only, never as decoration. - Bot colours belong to bots. Use
identity-*only for things owned by one bot: its mark, its bubble,.bot-button. - A new token goes in every skin.
src/lib/skins.test.tsfails otherwise. Runpnpm check:contrast: text clears 4.5:1 on every surface it sits on. - Check both reference skins. Midnight (dark) and Daylight (light) are the reference skins; every change is checked in both. The other skins restyle tokens, so a change that only uses tokens works there too.
4. Type
Midnight and Daylight use Geist for text and Geist Mono for code, keys
and paths. A skin may choose its own face; components never set font-family
and never add fonts.
Regular text is weight 415 (--font-weight-normal, which font-normal uses):
Geist is a variable font, so this sits a touch above 400 and a static face
rounds it to 400. Text tracks at +0.012em (--tracking-ui, set once on
body); a skin or a theme with its own face resets it to 0, and code and keys
are never tracked. Titles of 17px and up keep tracking-[-0.01em].
| Use | Size / line height | Weight | Ink |
|---|---|---|---|
| Page or dialog title | 20px, tracking-[-0.01em] |
600 | ink |
| Sheet, section or Settings page title | 17px | 600 | ink |
| Chat text, both modes | 15 / 22px | 415 | ink |
| Inline code | 0.93em of its text, on ink at 4% | 415 | ink-secondary |
Menu item (MENU_ITEM) |
14 / 18px; the composer's menu 14 / 20px in 32px rows | 415 | ink |
Body, rows, menu rows (MENU_ROW) |
13 / 18px | 415 | ink or ink-secondary |
| Names in lists (bots in the sidebar 14 / 20px) | 13 / 18px | 500 | ink |
| Sidebar group labels ("Bots", "Tools", a department) | 13 / 18px | 415 | ink-secondary |
| Sidebar places (the rows under "Tools") | 14 / 20px | 415 | ink |
| Pinned bot captions | 12 / 16px | 415 | ink |
| Speaker names in transcripts (people and bots) | 13px | 600 | bot colour, else ink-secondary |
| Meta, hints, menu group labels | 12 / 16px | 415 (menu group labels 500) | ink-tertiary |
| Timestamps | 12 / 16px | 500 | ink-tertiary or ink-secondary |
Keycaps (ShortcutHint), tiny badges |
11px | 415 | ink-secondary or ink-tertiary |
Rules:
- Buttons size their own labels.
.ui-buttonand its variants set the size and weight; don't add text classes to them. - Stick to the table. No 16px or 18px body text. Nothing under 12px except keycaps and tiny badges, in both modes: Advanced uses the same scale as Simple.
- Three weights: 415 for text (
font-normal), 500 for names, labels and timestamps, 600 for titles and for speaker names in transcripts. No 700. - Sentence case everywhere. Titles, buttons, menu items and labels. No ALL CAPS labels and no Title Case.
- One line for titles and rows. Truncate with
truncateand keep the full text reachable (atitleor the opened view). Let body text wrap. - Numbers that change in place (timers, counts, usage) use
tabular-numsso they don't jitter.
5. Shape
Midnight and Daylight share one radius scale. Other skins, and phone-width windows, retune the radius tokens, which is why you use the class for the element's job and never a pixel value:
| Element | Radius | Class |
|---|---|---|
| Buttons, pills, chips, avatars | full | the button and chip classes, rounded-full |
| Menu rows | 6px | rounded-md |
| Fields, controls | 8px | rounded-lg |
| Cards, menus, popovers, sidebar rows and pinned bots | 12px | rounded-xl |
| Dialogs | 14px | .ui-modal |
| Bubbles, cards in the transcript | 18px; a bubble in a run of its sender's bubbles keeps a 6px tail at its bottom corner on its own side (joinedCorners) |
rounded-4xl |
| Composer | 22px (18px once it wraps, and always in Advanced mode, whose field sits above a footer row) | set by the composer |
| Window panes | 0 |
- No in-between values (
rounded-[10px],rounded-[14px]). Pick the step for the element's job. - A nested shape is smaller than its container. A card (12) in a dialog (14) is right; a 12px card inside a 12px menu is not.
6. Space and layout
- Use the 4px grid. Tailwind's spacing scale. An arbitrary value like
py-[7px]belongs in a shared recipe with a reason, not in a one-off. - One inset per surface. Everything in a panel, menu or card starts at the
same left edge and ends at the same right edge. Leading icons sit in a fixed
gutter (
MENU_GUTTER, 16px) so labels line up whether or not a row has an icon. - Labels line up with their heading. Put shortcut letters, counts and chevrons at the end of a row, not before the label.
- Control heights: 24, 28, 32 or 36px. Menu rows are 30px (32px in the
composer's menu). The chat header's controls and the sidebar's top buttons
are 36px; beside the thread tabs band both are 32px, on the same centre
line. On touch screens, targets grow to 40–44px with the
touch:variant. - Sidebar rows: Simple's rows have 8px padding and a 10px gap after the
36px avatar; every row hovers at
bg-ink/[0.06]. The sidebar is 280px wide in both modes; pinned bots are 95 × 92px tiles with a 60px avatar. Pinned pages never join them: a bot's pages are in its bot panel's Library tab. - A room is a feed of its threads (no switch; a home older than 0.1.181,
which lacks the feed's routes, keeps the single transcript). Each row is a
thread's first line, its reply count, who replied and when; a row, a room
thread opened from anywhere, and an Inbox line open their thread in a panel
beside the chat (
ForkPanel), never by moving the room's current thread, which is everyone's. Returning from the sidebar reopens the thread that person last viewed in the room on this device. Closing the panel leaves just the feed on the next visit, as does a thread that was archived or deleted. The feed's composer starts a new thread; the room's "+" in the sidebar brings the room up with the cursor in that composer. A row carries the sidebar thread row's menu behind a quiet More (hover, focus and touch), a pin mark when pinned, and its unread or waiting dot; the thread beside the feed has the same menu in its header, with its export. Archived threads come back under "Show archived threads" at the top of the feed. A closed thread (its work done; Close in the menu, or its bot closes it) folds with its closed neighbours into one quiet "4 closed threads" row that opens in place, ten at a time; one with news stays a row, and a new line opens it again. The header is plain words, so the feed is masked under it. Below 768px the room is today's single transcript. - The sidebar stays open beside a side panel while the chat keeps 440px: from 1040px with a 320px panel (a room, Simple's inbox, Notifications), from 1280px with a wider one. Narrower, it folds to its avatars.
- Simple's bot panel never moves the sidebar. Opening or closing it leaves the sidebar's width and its pinned bots exactly as they were. The chat makes the room; under 920px, where the chat would get less than 320px, the panel floats over the chat's edge instead.
- Simple's chat header floats over the transcript (see section 8): the first message rests just below it at the top of the history, and only its controls take clicks.
- The chat header's model pill folds to its AI's mark while a side panel narrows the chat, in a round button the size of the header's others; its label still names the model.
- Group with space before you group with lines. Add a divider only between groups that space alone can't separate. Never a divider under a heading.
- No cards inside cards. If a card needs sections, use spacing and a group label.
- Use logical properties. Write
ms-,me-,ps-,pe-,start-andend-, neverml-orleft-, so right-to-left layouts mirror. Directional icons flip withrtl:-scale-x-100. - Design for 1440×900 and check it narrow. Nothing may clip or overlap at the smallest window the app allows.
7. Icons
- Use
lucide-reactonly. No emoji as icons, no icon fonts, no hand-drawn SVGs for things Lucide has. Product marks (the Maus, third-party logos) are the exception. - Sizes: 16px in menus, rows and toolbars, and in every 36px or 28px button; 14px next to 12–13px text; 12px for disclosure chevrons.
- Don't set
strokeWidth. The stylesheet draws every Lucide icon at 1.9, menus included. The only exceptions are a glyph on a filled control (the send arrow) and deliberately heavy marks (a check, a filled badge). - Icons are bare. Don't put them in tinted squares or circles. A bot's avatar is the only mark that gets a plate.
- Decorative icons get
aria-hidden="true". An icon-only button needs anaria-label, and atitlewhen its meaning isn't obvious. - One icon, one meaning. If an icon already means something in the app, don't reuse it for something else.
8. Surfaces and depth
- Only floating things cast shadows: menus, popovers and dialogs. Use
menu-surfaceorpopover-surface, which carry each skin's shadow. Cards in the page are flat, with ahairlineborder or a tint. Two things in the chat also float, over the scrolling transcript: the chat header's pill and controls (shadow-(--shadow-float), throughELEVATED_FLOAT) and the composer (shadow-(--shadow-composer), throughELEVATED_COMPOSER). The lift shows on light grounds only; in Daylight the composer drops its 0.5px ring at rest and gets it back on hover and focus. - Simple's chat header has no band. The transcript runs up to the window's top edge under the floating pill and buttons and fades in, in even steps, over the header's 60px (a mask on the scroller, so any skin's ground shows through). A solid band cut messages off at the header; the floating controls already carry their own lift. Advanced keeps its band.
- Borders are 1px
hairline. Panes meet on a 0.5pxedge. An element in the page gets a border or a tint, not both, and no shadow. Floating surfaces take their surface class, which already balances all three. One exception: a bot's bubble is a tint finished with a faint top-lit sheen and a 0.5px inset line of ink at 6% (BOT_BUBBLE_FINISH), on light grounds only; a dark ground keeps the flat tint. - Rich content in a reply stays in the bubble. Tables, code and quotes are drawn alike: no fill of their own, a 1px hairline and a faint tint. One reply is one bubble.
- Scrims (
ui-scrim) dim the app behind a modal dialog; nothing else dims the app.
9. Components
Reuse what exists. If something is missing, add it once to the shared module and use it everywhere, rather than styling a one-off.
| You need | Use |
|---|---|
| Class merging | cn() from src/lib/cn.ts |
| A button | .ui-button with -sm / -md / -lg, -pill, -primary, or .ui-icon-button |
| A chip or pill | .ui-chip (static), .ui-pill (clickable) |
| A menu | MENU_SHEET, MENU_ROW, MENU_LABEL, MENU_SEPARATOR, MENU_META and the rest of src/components/menu-recipe.ts; SidebarPopoverMenu for anchored menus; useMenuMotion |
| A dropdown | Select from src/components/Select.tsx; never a native <select> |
| A dialog | .ui-modal; useModalDialog for the focus trap, Escape and returning focus |
| A confirmation | Don't add one (see section 2). Existing ones use ConfirmDialog |
| Closing on Escape or outside click | usePopoverDismiss |
| A switch | Switch from src/components/SettingsPrimitives.tsx |
| Settings rows | SettingsGroup, SettingRow, SettingsDisclosureRow |
| Bot panel rows | src/components/bot-panel/rows.tsx (NavRow, SwitchRow, Segmented, ItemRow and more) |
| A keyboard shortcut hint | ShortcutHint |
| Copy to clipboard | copyText from src/lib/copy-text.ts |
10. Motion
Motion explains a change. It never decorates.
- Use the tokens:
animate-pop-in/pop-out(menus, 200ms),animate-panel-in(240ms),animate-msg-in(180ms),animate-fade-in. Movement eases withcubic-bezier(0.22, 1, 0.36, 1); fades useease-out. - Panes keep their width while they move. A side panel slides in and out
over the window's edge at its full width (
animate-panel-beside-in, 240ms) while the room it takes grows or shrinks, so the chat glides and nothing in the panel rewraps. Words leaving a control fade, drift a few pixels and soften rather than being cut off; they never wrap mid-way. - 300ms ceiling. Only first-run onboarding and a streaming reply's blocks
fading in (600ms,
ease-out, once per block) may run longer. - Nothing scales in from zero. Things grow from about 96% and fade.
- Hover and press transitions are 120ms on colour and opacity only. Don't
animate layout. One exception: buttons (
.ui-button,.ui-icon-button) and the sidebar's bot rows and pinned bots shrink to 98% while pressed, over 50ms, and not at all with reduced motion. The stylesheet does this; don't add your own press scale. - No loops except a live status that is really live (a bot working). Never animate something just to draw the eye.
- Mascots hold still at rest. A mascot moves while its bot is doing something, for a beat that explains a change, and under the pointer (its eyes follow, it blinks). Every change blends in over about 300ms, and it settles and stops when the reason ends.
- Respect reduced motion. Pair every transition with
motion-reduce:transition-noneand every animation withmotion-reduce:animate-none, or gate it in CSS onprefers-reduced-motionand[data-reduced-motion="true"].
11. Words
The words are part of the design. Write the way a calm, competent colleague talks.
- Sentence case, short sentences, no exclamation marks. No marketing excitement inside the app.
- Buttons say what they do: "Save", "Connect Gmail", "Delete bot". Not "OK", "Submit" or "Yes".
- Errors say what happened and what to do next: "Couldn't reach Gmail. Check that you're online and try again." Never blame the person, never show a raw error code without a sentence before it.
- Name controls exactly as they're labelled. If copy says "open Automations", the button reads "Automations" (a test checks this).
- Use the product's words. "MausBot Cloud" or "the Cloud", "cloud desktop", "This computer", "AI", "Organization". The vocabulary tests list the retired ones and the internal words to avoid.
- Show values, not explanations. "Theme · Midnight" beats a sentence about themes. "Your name · Not set yet" beats an empty field with grey text.
- Empty states are one line and one action. Say what goes here and how to add the first one. No paragraphs, no illustrations made for the occasion.
- Never promise. No "coming soon" and no teasers for unbuilt features.
- Use "…" (one character) for work in progress ("Saving…") and for a command that asks for more before acting ("Rename…").
- Every string goes through
t("…")with its English insrc/locales/en.json. Changing the English of an existing key makes its translations stale; followdocs/localization.md. Placeholders are never labels: a field has a visible label or a cleararia-label.
12. States
Before a UI change is done, it handles each of these:
- Default, hover, focus-visible, pressed, disabled. The shared classes
dim disabled controls themselves; a custom row uses
disabled:opacity-50and drops its hover fill. Say why it's disabled when the reason isn't obvious. - Loading. Keep the layout steady; reserve the space. A spinner only if it takes over 300ms. No skeletons for things that load in under a second.
- Empty. See section 11.
- Error. Inline, next to what failed, with a way to retry.
- Long and odd content. A 60-character name, a 2,000-row table, an emoji, Arabic or Hebrew text, no avatar.
- Narrow window, touch screen, light and dark skins.
13. Simple and Advanced mode
useAdvancedMode() from src/lib/interface-mode.ts tells you which mode is
on. Simple is the default for new installs.
- Simple mode shows what a person needs to talk to bots and get work done. Tokens, usage, inspectors, raw logs and developer tools belong in Advanced.
- Advanced adds; it doesn't rearrange. The same thing sits in the same place in both modes. Advanced may show more rows or more detail. One exception: where Advanced already shows something in place (a bot's threads as a tree under its row), Simple may offer a shortcut to the same thing there instead of a second copy of it: a menu, or the threads unfolded under the bot's row, that opens on a click of a small chevron, never on hover. A second: Advanced mode's composer puts the field on its own line with a footer row under it, and the model and effort picker sits in that footer, next to the + menu both modes share.
- Switching modes never loses data.
14. Accessibility
- Never remove the focus ring without a replacement. The global
:focus-visiblering uses--color-focus. Menu rows show focus as their hover fill; text fields colour their border. - Everything works from the keyboard. Menus move with the arrows, Home and
End, type-ahead, Enter and Escape (
src/components/model-menu-keys.ts,src/lib/menu-keys.ts). Tab never lands on something hidden. - Hover-only controls also show on touch and on keyboard focus. Pair
group-hover:opacity-100with atouch:rule and afocus-visibleorfocus-withinrule. A test enforces this. - Disclosures use a button with
aria-expandedandaria-controls, and hide their content with thehiddenattribute. - Dialogs trap focus and give it back (
useModalDialog, orConfirmDialog, which does it itself). A destructive confirmation focuses Cancel, so a stray Enter never deletes anything. - Use the right role:
role="switch"witharia-checkedfor switches,aria-pressedfor segmented buttons,aria-live="polite"orrole="status"for messages that appear on their own. - Contrast: text 4.5:1, focus rings and control edges 3:1, on every skin.
- Chat text and inputs use
dir="auto"so mixed-direction text reads correctly.
15. What the checks enforce
| Check | Rule |
|---|---|
pnpm check:contrast |
Every skin's text clears 4.5:1 on its surfaces |
src/lib/skins.test.ts |
Every skin defines every token |
src/lib/control-scale.test.ts |
Button heights 32 / 28 / 24px, on skin tokens |
src/components/Select.guard.test.ts |
No native <select> |
src/components/touch-actions.test.ts |
Hover reveals have touch and focus versions |
src/components/chat-dir-auto.test.ts |
Chat inputs use dir="auto" |
src/lib/copy-text.guard.test.ts |
Clipboard writes go through copyText |
src/locales/vocabulary.test.ts, everyday-words.test.ts, words.test.ts, welcome-words.test.ts |
Product words, no internal words, no retired names, no em dashes in the welcome |
pnpm i18n:check |
Locale structure, placeholders, stale translations |
scripts/testing/file-size-ratchet.test.ts |
No file grows past its line limit |
16. Before you open a UI pull request
- It follows sections 1–14, or the PR changes this file and says why.
- Only tokens, the radius scale, the type table and existing components.
- Checked in Midnight and Daylight, in Simple mode (and Advanced if you touched it), at 1440×900 and at a narrow width.
- Every state in section 12 handled.
- Works with the keyboard alone; focus is visible throughout.
- New strings go through
t();pnpm i18n:checkpasses. - Before/after screenshots in the PR for both skins; a short video for anything that moves.
- Screenshots use test data, never real accounts, names or messages.