Edit History
The versions of an image through iterative edits, newest last. Select one to edit on from it, or compare it with the version it came from.
In use
The Image Edit Studio's strip of versions. Each edit starts from the selected one; picking an older one branches.
Your image will appear here
Your image will appear here
Your image will appear here
Your image will appear here

Paint over what to change. Tab reaches the marks: arrow keys move one, Enter edits its note, Delete removes it.
Your video will appear here
Installation
pnpm dlx shadcn@latest add https://mgp.paukraft.com/r/edit-history.jsonEditHistory
A radio group of versions: click one, or use the arrow keys. Send the selected version's src as the next edit's input: FLUX 3 Image's images, Kontext's input_image, or Erase's image with a Markup mask.
| Prop | Type | Default |
|---|---|---|
| history | EditHistoryStateFrom useEditHistory, which also tracks the selection. | — |
Branching
Editing an older version branches instead of discarding what came after it: every version was paid for. The new version is appended with the older one as its parent, and the caption says which it came from.
useEditHistory
| Prop | Type | Default |
|---|---|---|
| original | stringThe image the edits start from. A new one starts a new history. | — |
| versions | EditVersion[]Oldest first: { id, prompt, parentId, status, progress?, src?, error?, startedAt?, settledAt? }. | — |
| selected / parent | EditVersion / EditVersion | undefinedWhat the next edit starts from, and what it was edited from: the two sides of a Compare Slider. | — |
| push | ({ prompt, ...result }) => stringAdds an edit of the selected version, queued unless given a status, and selects it. Returns its id. | — |
| update | (id, result: Partial<ImageGenResult>) => voidApplies a task result, e.g. trackBflTask's onResult. Stamps settledAt once it settles. | — |
| select | (id: string) => voidSelects a version, as clicking or the arrow keys do. | — |
Parts
| Prop | Type | Default |
|---|---|---|
| EditHistoryRoot | { history } & RadioGroup propsThe strip. Scrolls the selected version into view. | — |
| EditHistoryItem | { version }A version's thumbnail and number. In flight, its parent blurred under a progress ring. | — |
| EditHistoryCaption | { history }The selected version's number, prompt, the version it branched from, and its status while not ready. | — |