Sweep apply
Reviews a set of suggested changes to one file, hunk by hunk. Accept or reject each change, or sweep through all of them as a highlight travels down each hunk while it merges.
Fix: hold to confirm never fires
Three edits from Kofi Mensah's review of pull request #482
hold-to-confirm.tsx3 of 3 changes pendingNothing applied yet. Saving keeps the file as it is.
When to use
- Reviewing an assistant's edits to a file before they are written.
- Applying a set of suggested fixes where each one needs a yes or no.
When not to use
- Comparing two files with no decision to make; use the file diff.
- Merge conflicts, which need a third side to choose from.
Installation
pnpm dlx shadcn@latest add @caliper/sweep-apply
Adds its 7 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
SweepApply
8 props
countSweepChanges
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes status and region semantics, with aria-hidden and aria-label kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/sweep-apply.mdThe index of every part is at /llms.txt.