| name | Diffsplain | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Clear code diffs with concise, comprehensive agent notes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| colors |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| typography |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rounded |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spacing |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| components |
|
Creative North Star: "The Review Desk"
Diffsplain is an open-source developer tool built for pull request review. It uses a measured, editorial system built for close reading. Warm paper surfaces, dark ink, compact mono labels, and a strong split between source evidence and agent notes make the interface feel ordered without making it stark.
The system stays mostly flat. Borders, tone shifts, and spacing separate regions; shadows mark only the main reader and the file picker. The diff remains the main work area, while the narrower note pane adds context in a quieter reading rhythm.
Key Characteristics:
- Warm paper and ink palette
- Two-pane review layout
- Sans type for explanation and mono type for evidence
- Flat structure led by borders and tonal layers
- Semantic color for additions, deletions, review markers, and risks
- Brief directional motion with a reduced-motion path
The palette uses warm neutrals for long reading sessions and reserves color for review meaning.
- Carbon Ink (
#20231f): Main text, the reader toolbar, marks, and strong controls. - Review Blue (
#426b7c): Focus outlines, hunk markers, and review-related emphasis.
- Addition Green (
#2f6c4d) and Addition Wash (#dce9dc): Added lines, positive counts, and live state. - Deletion Red (
#a14f45) and Deletion Wash (#f1ddda): Deleted lines, error state, and negative counts. - Risk Amber (
#9c7027) and Risk Wash (#eee3c7): Risks and points that need close review. - Review Wash (
#dce9ed): Hunk headers and omitted-range cues.
- Desk Canvas (
#e9e2d5): The page-wide background. - Reading Paper (
#fbf8f0): The main diff surface and modal surface. - Deep Reading Paper (
#f1ebdf): The agent-note pane and quiet controls. - Muted Ink (
#73766d): Supporting text and metadata. - Quiet Ink (
#aaa99f): Line numbers, minor separators, and placeholders. - Divider (
#d8d1c4) and Dark Divider (#333831): Section rules and dark-surface divisions.
The Meaningful Color Rule. Use green, red, blue, and amber to convey change or review state; do not use them as decoration.
Display Font: Geist (with Arial and sans-serif fallback) Body Font: Geist (with Arial and sans-serif fallback) Label/Mono Font: Geist Mono (with monospace fallback)
Character: Geist keeps explanation calm and easy to scan. Geist Mono marks code, paths, counts, shortcuts, and small labels as precise interface evidence.
- Display (540,
clamp(38px, 6vw, 72px), 1): Empty-state messages and rare page-level statements. - Headline (570,
clamp(26px, 2vw, 36px), 1.04): The main agent summary for the selected file. - Title (620,
19px): File headings and local section titles. - Body (400,
12px–14px, 1.55–1.62): Agent notes, summaries, and supporting text. - Code (450,
11.5px, 1.6): Unified diff content. - Label (650,
9px,0.12em, uppercase): Eyebrows and compact section labels.
The Mono Rule. Use Geist Mono for code, paths, counts, shortcuts, metadata, and short labels; keep full explanations in Geist.
The app shell fills the viewport and holds a centered reader up to 1680px wide. The top bar is 82px high. The reader toolbar is 60px high, and the main sheet uses a 1.72fr / 0.88fr split with a minimum 340px note pane. The diff side carries the work; the note side remains narrower and easier to read.
Spacing runs from tight 4px control details to 28px–34px section insets. Rules and alignment set the rhythm before extra padding does.
At 980px and below, the panes stack, the change summary leaves the top bar, and the diff keeps a bounded height. At 680px and below, the reader reaches both screen edges, minor toolbar metadata hides, the picker becomes a bottom sheet, and the code grid keeps its working width inside a horizontal scroll area.
The responsive review contract starts at 320px wide. It covers mouse,
keyboard, and touch review; see docs/content/mobile.mdx for the tested sizes,
browsers, device path, and required review flows.
The system is mostly flat and uses borders, background shifts, and fixed regions for depth. The large reader and modal receive ambient shadows because they sit above the desk canvas; inner notes, rows, and controls stay flat.
- Reader Ambient (
0 28px 80px rgb(56 45 30 / 14%)): The full review sheet only. - Modal Ambient (
0 40px 100px rgb(18 20 17 / 32%)): The file-picker dialog over its dark backdrop. - Active Row Inset (
inset 2px 0 #20231f): The selected file row.
The Flat-by-Default Rule. Use borders and tonal layers inside the reader; reserve ambient shadows for the full sheet and modal overlays.
The main form language is rectangular with restrained rounding. The toolbar uses 15px upper corners, the reader uses 18px lower corners, and the file picker uses 15px. Interior rows and callouts use 7px–8px; small controls use 4px–6px. Pills appear only for status, presence, and compact identity marks. The square, split-color brand mark remains sharp.
Components mix editorial reading space with compact review controls. Their states change color, border, underline, or position by a few pixels; they do not rely on large effects.
- Navigation: Transparent
60pxsquare controls on Carbon Ink. Hover adds a faint light fill and shifts the arrow by3px. - Text action: Small semibold Geist text with a quiet underline. Hover darkens the underline.
- Close control: Deep Reading Paper, a
1pxDivider border,5pxradius, and compact mono text. - Focus: All buttons use a
2pxReview Blue outline with a3pxoffset.
- Status: Transparent rounded labels with a
1pxstate-colored border, compact uppercase mono text, and6px 9pxpadding. - State: Green marks added files, red marks deleted files, amber marks renamed files, and violet marks binary files.
- Reader sheet: Reading Paper with
18pxlower corners, one thin outer border, and the Reader Ambient shadow. - Summary pane: Deep Reading Paper with a soft white top wash and a Divider border against the diff.
- Risk callout: A warm amber-neutral fill,
1pxborder,8pxradius, and17px 18px 14pxpadding. - Modal: Reading Paper,
15pxradius, a dark backdrop, and the Modal Ambient shadow.
- Search field: A borderless
52pxmono input between top and bottom Divider rules. - Focus: The input removes its own outline because the shared field frame and global keyboard focus system carry the state.
- Placeholder: Quiet Ink, with the shortcut shown as small supporting mono text.
The dark reader toolbar holds previous and next controls, the current path, file count, search hint, status, and change totals. The current path truncates rather than wrapping. Below 680px, nonessential labels hide while navigation and change counts stay visible.
Diff rows use a fixed grid for old line, new line, marker, and code. Additions and deletions use pale horizontal washes with dark semantic text. Hunk rows use Review Wash. Metadata stays neutral, and omitted ranges use a faint Review Blue band. Hover adds only a low-opacity ink wash.
The note pane starts with a large summary title and lead, then divides reasons and details with thin rules. Risks sit in the only rounded inner callout. The agent signoff stays fixed at the pane foot.
- Do keep the warm paper and Carbon Ink base on review surfaces.
- Do reserve semantic colors for additions, deletions, review structure, and risks.
- Do use Geist Mono for code and compact evidence, and Geist for explanation.
- Do use borders and tonal layers before adding a shadow.
- Do keep the diff wider than the note pane on large screens.
- Do honor both responsive breakpoints and
prefers-reduced-motion.
- Don't use semantic green, red, blue, or amber as general decoration.
- Don't turn every inner region into a rounded card.
- Don't add ambient shadows to rows, notes, or routine controls.
- Don't replace the code grid with a proportional font.
- Don't let secondary metadata crowd navigation on small screens.