File edits

Pro

An agent's edit across files as one row: Edited 3 files +22 −5 with Undo all and Keep all, over each file's diff hung from a hairline. Decide all at once or file by file and change by change; the row keeps count.

Pro opens soon
npx shadcn@latest add @pixilui-pro/file-edits

Preview

Keep all reaches the files a beat apart, down the list, and the row reads Kept.
Files

When to use

Use it when

  • One edit the agent made across several files, decided as a whole or file by file.
  • A change set a person reviews in the chat before it lands: a refactor, a fix with its tests.

Use something else when

  • One file: use Diff.
  • A whole pull request review with comments: a code host does that.

Installation

file-edits.tsx269 linesPro
Pro opens soon

Join the waitlist and we'll email you when PixilUI launches. The preview, props and docs stay open until then.

Pro installs with the same CLI as the free items. One command adds file-edits.tsx and the free button.tsx, the free kbd.tsx, the free tooltip.tsx, the free code-block.tsx and diff.tsx it uses; your license key goes in once, as in Installation.

{
  "registries": {
    "@pixilui-pro": {
      "url": "https://pixilui.com/r/pro/{name}.json",
      "headers": { "Authorization": "Bearer ${PIXILUI_TOKEN}" }
    }
  }
}
Terminal
npx shadcn@latest add @pixilui-pro/file-edits

Adds file-edits.tsx with button.tsx, kbd.tsx, tooltip.tsx, code-block.tsx and diff.tsx, and installs clsx and tailwind-merge. The CLI reads PIXILUI_TOKEN from .env.local; if this computer has not logged in yet, run npx pixilui@latest login once.

Usage

example.tsx
import { FileEdits } from "@/components/pixilui/file-edits";

<FileEdits files={files} onStateChange={onStateChange} />

Fills its container; the files sit in 14 from the row on a hairline.

API reference

PropTypeDefault
filesRequiredFileEdit[]–The files the agent changed, each the Diff's options.
onStateChange(states: DiffFileState[]) => void–Each file's state changed (in order).
wordsPartial<FileEditsWords>–Every word the row says (each file's own words are on the file).
icons{ chevron?: ReactNode; undo?: ReactNode; redo?: ReactNode; done?: ReactNode }{}The icons it draws (the locked disclosure, undo, redo and done).

Also takes every native <section> attribute, and a ref.

Keyboard

TabReaches the row's Undo all and Keep all, then each file's row and its controls.
Enter SpaceDecides all, or folds the list from its row.

Accessibility

  • The row's status line says what all-at-once did (Kept 3 files.); focus moves to what took the button's place.
  • Each file is a Diff with its own named row, decisions and announcements.

Motion

  • Keep all and Undo all reach the files 90ms apart, down the list; each file plays its own Keep or Undo.
  • The row's end swaps with the quiet blur swap: Undo all and Keep all, then Kept, Undone with Redo all, or 2 kept · 1 undone.
  • Reduced motion: at once.
DiffKeep folds the old lines away, Undo erases the new ones, and the numbers stay right.
Code blockA key in the code renders masked, and Copy copies the mask, never the key.
CommandWhile it runs, the output prints in line by line and Stop ends it with ^C.

PixilUI Pro opens soon. The first 20 licenses are $99.