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.
proposals/CodeDiff/decisions.md17 lines · View on GitHub
Decisions
Built from PDS, not copied. The package already exports PanelList, PanelRow, CodeBlock (with language='diff') and FileDiff, so CodeDiff composes them. The only new CSS is the file name (code font) and the stats width.
"Diff variant" of the Code Block is the existing language='diff'. No new Code Block variant. Check that the added, removed and hunk-header colors match the reference (the package colors them with its syntax tokens).
File Diff is optional (shown when both additions and deletions are given). The reference has none; it is there because the approval report row had it.
Open: initially expanded rows. The reference shows rows already expanded. The package Panel Row starts collapsed and has no prop to change that, so stories open collapsed. Needs a isDefaultExpanded on Panel Row (a change to the PDS component, not this one).
Open: file icon.fileDiff is a guess from the reference.
Local stand-ins: mergeClasses, and the local Icon wrapper. Everything else comes from the package.
Compact rows. The Panel List's paddingSize only sets block padding (2xs to l). The rows are also held open by a 48px minimum height and 20px side padding in the Panel Row that no prop changes, so CodeDiff overrides those in its own CSS (--pds-spacing-2xl minimum height, --pds-spacing-s side padding) and defaults paddingSize to 2xs. Rows go from about 73px to 48px. Open: a Panel Row/List size prop would remove the override.
A recipe, not a component (2026-10-21)
Decision: the Code Diff is the recipe Recipes/Code diff, not Component Proposals/Code Diff. The CodeDiff component and its CSS were removed; the composition now lives in a story-only helper, _story-helpers/CodeDiffSample (classes code-diff-sample, no pds- prefix, so it is not a net-new component). The stories that show a diff (the Panel's approval report and the Chat with an agent recipe) use the helper.
Why: the designer decided it is a composition of existing PDS components with no API of its own worth porting, so it is documentation, like the other recipes.
Port impact: nothing to port as a component. The engineer copies the composition (Panel List, Panel Rows with the three slots, Code Block, File Diff) and the compact-row styling listed in the Usage page.