KQ-2076 · RERUN/BENCH
Rerun Bench
A debugging bench for one recorded tool call: its arguments as real fields beside its response as indented rows. Editing an argument dims the response in place as stale; when the fresh run arrives one accent line sweeps down and each row's new value drops in on springs.flick as it passes, fields that differ flash once and keep a change mark that grows in on springs.snap, and the run strip's selection slides on snap. Cmd or Ctrl+Enter re-runs, Alt with Up and Down steps through earlier runs, the strip is a radiogroup on the arrow keys, and Escape in an edited field restores it.
Fernworks support · Larkspur Studio · billing question
run #2 of 2 · 185 ms · re-run of #1 · fernworks crm
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/rerun-bench
Props
- diffStyle
- "gutter" | "inline" | "wash"
- default "gutter"
- How a changed field keeps its mark: a bar in the gutter, the old value struck through before the new one, or a soft wash on the row.
- density
- "compact" | "cozy" | "roomy"
- default "cozy"
- Row height, field height and type size.
- accent
- string
- default "var(--accent-bright)"
- Selection, change marks, the sweep and Re-run — any CSS colour.
- call
- RerunBenchCall
- default defaultRerunCall
- The tool, its server and every parameter it takes (name, type string/number/boolean/enum, options, description, required).
- runs
- RerunBenchRun[]
- default defaultRerunRuns
- Every run oldest first: args, response (any JSON), ms, at, from (the run it was re-run from), recorded, error.
- run / defaultRun
- string
- default — / the newest run
- The id of the run on the bench, controlled or initial. Uncontrolled, the bench moves to each new run as it arrives.
- onRunChange
- (id: string) => void
- default —
- Fires from the pick or the Alt+Up/Down step that changed the run.
- args
- RerunBenchArgs
- default —
- Controlled argument draft. Uncontrolled, the draft starts as the shown run's arguments and resets when the run changes.
- onArgsChange
- (args: RerunBenchArgs) => void
- default —
- Fires from every edit, restore or run change with the whole draft.
- onRerun
- (args: RerunBenchArgs, fromRunId: string) => void
- default —
- Re-run or Cmd/Ctrl+Enter: call the tool with these arguments. Add the result to runs to stream it in.
- onRestore
- (runId: string) => void
- default —
- Restore: the draft went back to this run's arguments.
- onSaveAsTest
- (run: RerunBenchRun) => void
- default —
- Save as test: keep this run's arguments and response as a test case.
- status
- "ready" | "loading" | "running"
- default "ready"
- loading shows skeleton fields and rows; running keeps the response dimmed with a scanning hairline.
- error
- string | null
- default null
- The last re-run never came back: shown over the response with Retry.
- now
- number
- default defaultRerunNow
- The moment relative run times count from, in ms.
- baseline
- "previous" | "recorded"
- default "previous"
- What a run's marks are drawn against: the run it was re-run from, or the recorded call.
- streamMs
- number
- default 520
- How long a fresh response takes to stream over the stale one, in ms.
- label
- string
- default "<tool> rerun bench"
- The bench's accessible name.
- disabled
- boolean
- default false
- Read only: nothing can be edited or re-run.
- className
- string
- default —
- Classes for the outer surface.
| Prop | Type | Default | Description |
|---|---|---|---|
| diffStyle | "gutter" | "inline" | "wash" | "gutter" | How a changed field keeps its mark: a bar in the gutter, the old value struck through before the new one, or a soft wash on the row. |
| density | "compact" | "cozy" | "roomy" | "cozy" | Row height, field height and type size. |
| accent | string | "var(--accent-bright)" | Selection, change marks, the sweep and Re-run — any CSS colour. |
| call | RerunBenchCall | defaultRerunCall | The tool, its server and every parameter it takes (name, type string/number/boolean/enum, options, description, required). |
| runs | RerunBenchRun[] | defaultRerunRuns | Every run oldest first: args, response (any JSON), ms, at, from (the run it was re-run from), recorded, error. |
| run / defaultRun | string | — / the newest run | The id of the run on the bench, controlled or initial. Uncontrolled, the bench moves to each new run as it arrives. |
| onRunChange | (id: string) => void | — | Fires from the pick or the Alt+Up/Down step that changed the run. |
| args | RerunBenchArgs | — | Controlled argument draft. Uncontrolled, the draft starts as the shown run's arguments and resets when the run changes. |
| onArgsChange | (args: RerunBenchArgs) => void | — | Fires from every edit, restore or run change with the whole draft. |
| onRerun | (args: RerunBenchArgs, fromRunId: string) => void | — | Re-run or Cmd/Ctrl+Enter: call the tool with these arguments. Add the result to runs to stream it in. |
| onRestore | (runId: string) => void | — | Restore: the draft went back to this run's arguments. |
| onSaveAsTest | (run: RerunBenchRun) => void | — | Save as test: keep this run's arguments and response as a test case. |
| status | "ready" | "loading" | "running" | "ready" | loading shows skeleton fields and rows; running keeps the response dimmed with a scanning hairline. |
| error | string | null | null | The last re-run never came back: shown over the response with Retry. |
| now | number | defaultRerunNow | The moment relative run times count from, in ms. |
| baseline | "previous" | "recorded" | "previous" | What a run's marks are drawn against: the run it was re-run from, or the recorded call. |
| streamMs | number | 520 | How long a fresh response takes to stream over the stale one, in ms. |
| label | string | "<tool> rerun bench" | The bench's accessible name. |
| disabled | boolean | false | Read only: nothing can be edited or re-run. |
| className | string | — | Classes for the outer surface. |