Patterns / Agent
Diff
Markdown apps/gallery/src/patterns/diff.rs
A diff row is two numbers, a sign and a line of text: three divs and a colour, with no reducer, no state and nothing to measure. Next to tree or table it would be a paint helper wearing a component's badge, so it lives in the file you would copy.
What is actually hard about a diff view — folding hunks, word-level marks inside a changed line, syntax highlighting, two panes scrolling together — is either the app's or waits on a syntax crate. Calling this a component would have promised all four.
The rows arrive already decided: bezel never computes a diff. The header is widgets chrome, and the tones are the palette's diff_add, diff_del and diff_hunk_bg.
The source is at apps/gallery/src/patterns/diff.rs.