Skip to content

DESIGN.md and PRODUCT.md describe the GPUI app as it is, on macOS, Windows and Linux - #269

Merged
pitis merged 2 commits into
mainfrom
chore/design-docs-for-gpui
Nov 29, 2026
Merged

pitis merged 2 commits into
mainfrom
chore/design-docs-for-gpui

Conversation

@pitis

@pitis pitis commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • DESIGN.md is rewritten from the GPUI app (core/desktop) as it is, in the same six-section
    format (Overview, Colors, Typography, Elevation, Components, Do's and Don'ts):
    • the frontmatter tokens are style.rs's palette (light and dark), the type sizes and weights the
      views use, their radii, and a few component sizes;
    • a table of what differs per system: UI and monospace fonts, title bar, menu bar (macOS only),
      shortcuts, tray, unread count, notifications, confirmation alerts, text fields' menu, closing
      the window;
    • the two colour sources: Hush's palette, and gpui-component's stock theme for its own controls
      (why primary buttons are black/white, not blue);
    • the components: window and sidebar, chat list, toolbar and Chat Options, timeline and bubbles,
      reactions and hover buttons, typing bubble, notices, composer and its panels and tray, dialogs
      (modal()/card()/field()), Settings, stories, empty screens, error banner.
    • Everything Swift-only is gone: Liquid Glass, SF Symbols, navigationTitle, the Voice Call button
      (the GPUI app has none), Reduce Transparency, Increase Contrast.
  • PRODUCT.md keeps the intent that still holds (users, purpose, personality, references,
    principles) and drops the Mac-only claims; the purpose now names macOS, Windows and Linux, and the
    owner's reason: "this way it's for everyone". Calls are dropped (no call UI). The accessibility
    section says what the app follows (system light/dark, reduced motion, screen reader labels
    through AccessKit) and where it falls short: controls the keyboard can't reach, two dialogs
    without a Tab trap or Esc, and where contrast is under AA (measured from the palette), instead of
    the old blanket "meets WCAG AA".
  • The two code comments that called DESIGN.md "the Mac app's look/components" now point at its
    Colors and Components sections (style.rs, app/view.rs), and Palette::accent's comment no
    longer calls it "the system accent" (it is a fixed blue). No code changed.

Why

Since the Swift app was removed (Hush is the Rust core plus the GPUI app), both documents
described an app that no longer exists.

How it was tested

  • Every value was read from the code: core/desktop/src/style.rs, app/view.rs, the
    app/*/view.rs files, main.rs (window, menus), layout.rs, settings.rs, systray.rs,
    notifications.rs, running.rs, and gpui-kit/gpui-component/GPUI's sources for the per-system
    fonts, prompts, native menus, reduced motion and AccessKit.
  • Snapshots (cargo run -p hush-desktop --features snapshot -- --snapshot <dir>), light and dark,
    checked against the text: chat, compose, files (tray), settings, chat style (wallpaper), events
    (notices), chat options, new group, stories, typing, sidebar hidden. They render on macOS, so the
    Windows and Linux columns of the per-system table come from the code, not from a picture.
  • make format && make check (cargo fmt --check, clippy -D warnings with and without the snapshot
    feature, cargo test with the snapshot feature): pass. Only comments changed in code; no tests to
    add for docs.

Closes #267

…Linux

DESIGN.md is rewritten from the GPUI app's code: style.rs's palette, the views' type sizes, radii
and components, gpui-component's theme for its controls, and what differs per system. PRODUCT.md
keeps the product intent that still holds, without the Swift app's Mac-only claims, and is for
every desktop system. The two code comments citing DESIGN.md point at its sections.
…keyboard fall short

Review fixes: GNOME on Wayland gives the window no title bar; Linux keeps neither the desktop's font
nor its alerts; the tray's count and tooltip, Mark as Read everywhere, closing before the core opens;
the accent New messages pill; reduced motion read at launch on macOS and Windows; which controls the
keyboard can't reach and which dialogs don't trap Tab or take Esc; the full contrast shortfall list.
The comments citing DESIGN.md no longer point at the removed Mac app.
@pitis

pitis commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

Review (pr-review-toolkit: code-reviewer, two comment-analyzers checking every value against core/desktop/src and the gpui crates)

All the palette values, sizes, radii, weights and percentages checked out. The findings were about per-system behaviour, accessibility claims and missing cases. Fixed in 9fdc9e1; make check passes again (fmt, clippy with and without snapshot, tests).

Critical

  • Linux title bar. DESIGN.md said the window manager draws it. On Wayland compositors without xdg-decoration (GNOME/Mutter), GPUI falls back to client-side decorations and Hush draws none, so there is no title bar. Fixed: the table now says so (read from source, not run on GNOME).
  • "Every control has a keyboard path" (PRODUCT.md). This was false: about 20 of Hush's own small controls are click-only divs (notice actions, reaction pill and picker, poll options, swatches, stickers, the banner's ✕, file download). Fixed: PRODUCT.md now says what the keyboard reaches and lists what it doesn't.
  • Contrast split. The shortfall list was incomplete. Fixed by recomputing and listing the missing cases: white on the accent (the selected row, badges), secondary on the selection grey, the accent in dark too, and the yellow "Not sent" in the light chat list (1.3:1).

Important

  • Primary buttons "never blue". The timeline's "New messages" pill is painted in the accent. Fixed in Colors, the Accent list and Timeline.
  • Unread count per system. Fixed: the macOS menu bar item shows the count, the tray tooltip says "Hush, n unread", and Windows has no taskbar badge but does have the tray.
  • "The system keeps its font, title bar and alerts". False on Linux (IBM Plex Sans, GPUI's alerts). Fixed in DESIGN.md's Overview, Typography and Do's, and in PRODUCT.md's personality and principle 1.
  • "The Mac app's look/points" pointed at the removed Swift app. Fixed in DESIGN.md and both module comments.
  • "For everyone" was in Users, not Purpose (the issue's Done-when). Fixed: it is now in Product Purpose. Users is the owner again, so no wider user base is claimed (see below).
  • Dialogs "keep Tab inside and close on Esc". The view-once viewer has no Tab trap and the history transfer takes no Esc. Fixed: both exceptions are stated.
  • Reduced motion "not followed at all". Declined: gpui_base::init → reduce_motion::init → apply_system_reduce_motion sets the flag from the OS (gpui-base 0.9.0 reduce_motion.rs). The real nuance was taken: it is read at launch on macOS and Windows and followed live on Linux, and PRODUCT.md now says so.

Suggestions taken

  • Mark as Read exists on every system's notifications.
  • Closing before the core opens quits.
  • Core Log… is in Settings on every system.
  • The menu, popover and tooltip shadows are gpui-component's.
  • Selected text uses the library's selection blue.
  • Story fonts are the only display faces.
  • A reaction count shows only above 1.
  • When Chat Options shows Disappearing Messages and View Safety Number.
  • The empty states when there are no chats yet.
  • The history transfer panel isn't card() and shows Retry on failure.
  • The 9:16 card is for text and video stories only.
  • "Feels at home on its desktop" no longer clashes with one look everywhere.
  • Palette::accent's comment no longer says "the system accent".

Declined

  • "Collapse when they repeat" (PRODUCT.md principle 5). It is a principle, not a fact. DESIGN.md says exactly what collapses today (undecryptable messages).
  • "Use gpui-component's controls" (DESIGN.md Do's). It stays as the rule. The click-only controls are now listed in PRODUCT.md as the gap.

For the owner (not changed)

  • GNOME on Wayland: the window likely has no title bar or window buttons.
  • About Hush: it opens only from the macOS menu bar, so Windows and Linux have no way to it.
  • Keyboard reach: the click-only controls above aren't keyboard-reachable.
  • Users: whether to widen beyond personal use is your call. CLAUDE.md still says "personal use"; PRODUCT.md now only quotes "this way it's for everyone" in Purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DESIGN.md and PRODUCT.md describe the GPUI app

1 participant