← All proposals

Code diff

A recipe, not a component (decided 2026-10-21): a Panel List of changed files, with each row's file icon and name, an optional File Diff (counts and bar), and an expand button that reveals the diff in a Code Block.

Extends a PDS componentOpen in Storybook

proposals/CodeDiff/context.md16 lines · View on GitHub

Code diff

Status: a component until 2026-10-21, now a recipe. Ready for dev (2026-10-20).

Problem

An agent proposes or applies changes to files, and the person needs to review them in place (a chat message, an approval report). PDS has the parts (Panel List, Code Block with language='diff', File Diff) but no pattern that puts them together.

Proposal

A recipe, not a component (decided 2026-10-21): a Panel List of changed files, with each row's file icon and name, an optional File Diff (counts and bar), and an expand button that reveals the diff in a Code Block. There is no API of its own to port; the engineer copies the composition.

Source

The designer's reference image (Diff viewer.png): the list collapsed, the list expanded, and a single expanded file.