Arc
ComponentsBlocksScreensDocsPricingTry the demo
Get Pro
Saved

Docs

IntroductionInstallationThemingMotionAI and MCPChangelog

Components136

ButtonAction buttonSplit buttonButton groupFloating button groupExpanding button groupCopy buttonAction swapIcon morphConfirm morphTheme switcher

Hold to confirmSwipe actionsReactions

Dropdown menuContext menuUser menu

InputTextareaPassword fieldPassword strengthSearch fieldExpanding searchInline edit

Number fieldMoney inputPhone inputScrub inputTag inputMention inputShortcut recorder

SelectComboboxMulti-selectMorph selectChip group

Radio cardsBilling toggleCheckboxRadio groupSwitchSegmented controlRatingToggle group

SliderElastic sliderRange histogram sliderRuler sliderWindow rangeProLens rangeNewPro

CalendarDate pickerDate range pickerTime pickerColor pickerEmoji pickerPro

Rich text editorSignature padFile dropzoneAvatar uploadPro

TabsBreadcrumbPaginationMega menu morphProTable of contents progressPro

Scroll areaAccordionExpandable cardResizable panelsExpandable text

DialogDrawerBottom sheetPopoverHover cardTooltipShare accessProConfirm popoverPro

AlertToastToast stackAnnouncement barCookie consentUndo toastPro

ProgressSkeletonStepperCountdownUsage meterOnboarding checklist

AvatarAvatar groupBadgePresence stackPro

CardMetric cardEmpty stateMetric tickerPro

Line chartBar chartDonut chartStreamgraphBrush chartWaffle chartSlope chartSparklineGaugeActivity heatmapAnimated counterRidgelineTreemapSplit barPro

SunburstProSankey flowProFunnel chartProRadar chartProRealtime streamProRace bar chartProData gridPro

Sortable data tableTree tableTree viewReorderable listFilter toolbarCode blockJSON viewer

TimelineComment threadChat thread

Image compareCarouselCard stack

Text revealIn-view titleText morphText shimmer

Blocks123

KPI drilldownProMetric explorerProRevenue explorerProMRR waterfallProCohort retentionProUsage forecastProJourney flowProUptime statusProPivot builderProChoropleth explorerProConnected scatterProHorizon chartProAccount healthPro

Budget variancePro

Small multiplesProLine replayPro

AI chatProAI composerProAI answerProModel pickerProModel arenaProPrompt studioProDocument extractionProAgent memoryProAI side panelProAI inline editProResearch runProAI insight cardProCatch upProAI feature launchProAI search barProAI setup wizardProCall insightsProLead scoringPro

Agent runProAgent tasksProAgent approvalsProAgent routinesProAgent orchestratorProMCP serversProKnowledge baseProEval suiteProAgent builderProAgent galleryPro

SidebarPro4Page headerCommand paletteNotification centerSelection toolbarProEmpty statesSearch resultsPro

Login and sign up5, free and Pro variantsOnboarding illustrationProOTP inputMulti-step formProTwo-factor setupProMagic linkPro

Settings pageProSettings commandProSecurity settingsProBilling overviewProUsage billingProCancel flowProOnboarding surveyProSpend alertPro

Team membersProInvite peopleProRoles and permissionsProProfile pagePro

API keysProWebhooksProIntegrationsProImport wizardNewProEnvironment variablesProCode reviewNewProDomain verifyProWebhook testerPro

Plan comparisonPricing calculatorProUsage pricingProCart drawerProCheckout summaryProLive checkoutProSeat managerProCredit top-upPro

Wallet cardProDelivery trackerProSeat mapPro

Activity feedProSupport widgetProFeature votingPro

File uploadMedia playerPro

Availability pickerProRelease readinessProFeedback boardProSmart schedulerProTask breakdownProGoal trackerPro

Hero sectionHero signupPro

Scroll storyProSpotlight gridProFeature bentoProComparison table

Logo marqueeStudio perspectivesProStats band

Changelog feedFAQ sectionContact sectionTeam showcaseProBlog grid

Site headerSite footerCTA sectionNewsletter signup

Activity terrainProRevenue globeProCustomer galaxyProSemantic zoomProLayout morphProExploded viewPro

Screens14

Metrics dashboardProMarket terminalPro

Kanban boardProProject boardProGantt timelinePro

Week calendarProMonth calendarPro

Team directoryPro

Inbox triageProSupport conversationProHelp centerPro

Product listingProProduct detailProInvoice studioPro

Special components107

Share sheetProAction morphProMorph navProDockProLiquid tab barProOrbit menuPro

Glass menuProGlass segmentedProGlass cardProGlass tab barPro

Sheet stackProWallet stackProControl centerProHolo cardProCard to articleProLink unfurlPro

Product galleryProLightbox galleryProPhoto gridProCover flowPro

Voice orbProNow playingProVoice recorderPro

Booking pillProActivity ringsProTime dialProDate reelPro

Keycap keyboardProSlot textSand textProTypewriter terminalPro

Stretch refreshProMorph loaderProSkeleton morphProBlack holeProSlide to confirmNewProCharge sessionPro

Sticker peelProTicket tearProPage curlProOrbit logosProPrize wheelPro

Dot gridProImage trailProGravity wellProInk fluidProCursor trail drawPro

Agent statusProTool callProAgent planProAgent timelineProContext windowProReasoning blockProSource cardsProModel cardProAI workflowProCode suggestionProGhost textProImage generationProDictation buttonProSpeech playerProMeeting summaryProReply draftProAgent handoffProPII redactionProResponse feedbackProLLM cost calculatorProProvider keysProGeneration statsProAI translateProTL;DR toggleProConnector setupProSmart form fillProEnrich columnProTicket routerProAsk your dataProAgent cursorProProvider statusProTraining runProAI commandProStarter promptsProAI mascotProImage revealProAI sparkProPixel mascotProGhost mascotProCube mascotProTone tunerProUpgrade promptProReferral cardProTrial bannerProTeam switcherProLive visitorsProSocial proof toastProInstall snippetPro

Data flowProPayment flowProDNS resolutionProModel trainingProMulti-region failoverProVector searchProBranch graphProAgent loopProMixture of expertsProSpeculative decodingProPrompt cacheProReasoning treePro
What’s new4 new
BlocksCode review

Code review

Pro

A pull request review in one card: file tabs with viewed progress, a syntax tinted diff with a comment mark on every line, threads that fold away when resolved, suggestions that rewrite the diff in place, and an approve button that morphs into the approved state.

Live block · sample data

When to use

  • Reviewing a pull request with line comments and suggestions.
  • An internal tool that approves generated code changes file by file.
  • A review queue where viewed state and pending comments matter.

When not to use

  • Showing one read-only snippet; use the code block component.
  • Watching an agent write code live; use agent-run.
  • Comparing two text documents without review actions.

Installation

Pro source and install commands unlock with a Pro plan.

Usage

Use this for code review inside a developer tool. Load diffs and comments from your git provider; actions in the preview are local.

example.tsx
1import { CodeReview } from "@/components/arc/blocks/code-review/code-review";2 3export function PullRequestReview({ pr, files, threads }: ReviewData) {4  return (5    <CodeReview6      pull={pr}7      files={files}8      threads={threads}9      onApplySuggestion={(thread, lines) => api.commitSuggestion(pr.number, thread.id)}10      onSubmitReview={({ event, body, comments }) => api.submitReview(pr.number, { event, body, comments })}11    />12  );13}
Built fromTabsCode blockComment threadCheckboxButtonAnimated counter

API reference

CodeReview

A pull request review in one card. File tabs show which files are viewed and which have open conversations, with a progress bar beside them; the selected file shows its path, diffstat and a Viewed checkbox above a syntax tinted unified diff. Hover a line, or focus its line number, and an add comment mark appears in the gutter; press it to open a comment box under the line, optionally with a suggested change. Threads carry comments, an optional suggestion with Apply, Reply and Resolve. Applying a suggestion rewrites the diff in place and folds the thread to one line; Approve submits the review with your pending comments and morphs into an Approved state.

PropTypeDefaultDescription
pullPullRequestsample pull requestTitle, number, repository, head and base branches, commit count, author and when it was opened. Shown in the header.
filesReviewFile[]5 sample filesChanged files, shown as tabs in this order. Each has an id, path, language ("ts" or "md"), status ("added" or "modified") and diff lines. Lines are hunk headers with oldStart and newStart, followed by ctx, add and del lines; line numbers are derived, so edits renumber correctly.
threadsReviewThread[]2 sample threadsExisting conversations. Each is anchored under a line id, carries a label such as Line 9, its comments, whether it is resolved and an optional suggestion with the line ids it replaces. Resolved threads start folded.
viewerPersonOlivia BennettThe person reviewing. New comments and replies are written as them.
defaultFileIdstringfirst file with an open conversationThe file shown first.
onComment(thread: ReviewThread) => void–Called when a line comment is added. The thread is pending until the review is approved.
onReply(threadId: string, comment: ReviewComment) => void–Called when a reply is posted in a thread.
onResolve(threadId: string, resolved: boolean) => void–Called when a conversation is resolved or reopened. Applying a suggestion resolves its thread.
onApplySuggestion(thread: ReviewThread, lines: DiffLine[]) => void–Called after a suggestion is applied, with the thread and the file's new diff lines. Commit the change on your server here.
onViewedChange(fileId: string, viewed: boolean) => void–Called when a file is marked viewed or not viewed.
onSubmitReview(review: { event: "approve"; body: string; comments: ReviewThread[] }) => void | Promise<void>–Sends the approval with its pending comments. While a returned promise is pending the button shows progress; a rejected promise shows a Try again state. Without a handler the preview simulates a short submit.
classNamestring–Class on the root element.

Keyboard interactions

Tab
Moves through the approve button, the file tabs, the Viewed checkbox, one line number per file and the thread actions.
Arrow LeftorArrow Right, HomeorEnd
In the file tabs, selects the previous, next, first or last file.
Arrow UporArrow Down, HomeorEnd
On a line number, moves to the previous, next, first or last line.
EnterorSpace
On a line number, opens or closes the comment box for that line.
Cmd/Ctrl+Enter
Posts the comment or reply you are typing.
Escape
Closes the comment box or reply and returns focus to the line number.

Accessibility

  • The files are a tablist with roving focus; each tab reports its path, viewed state and open conversations, and controls the diff panel.
  • Each line number is a button named for the line, such as Comment on added line 9. Added and removed lines carry visually hidden prefixes, so the diff reads correctly without color.
  • Viewed is a role="checkbox"; Suggest a change is a pressed toggle; a folded thread is a button with aria-expanded that opens it again.
  • Adding comments, applying suggestions, resolving, marking files viewed and approving are announced in a polite live region.
  • Reduced motion applies every change at once while keeping focus and announcements.

Motion

  • Comment boxes and threads open as bands in the flow of the diff, height and opacity on the smooth spring, so the lines below slide instead of jumping.
  • Posting a comment keeps its band: the box crossfades into the new thread while the height springs between them.
  • Applying a suggestion folds the old line out while the new line grows in at the same place, then the new line settles from a stronger tint to the normal added color. The Apply button morphs to Applied and the thread folds a beat later.
  • A resolved thread folds to a one line summary: the summary fades in at the top while the band springs to its new height, once, with no chained springs.
  • The add comment mark scales in on the gutter edge with a short delay, so a passing pointer does not light up every line.
  • The tab highlight slides between files on the morph spring and the diff crossfades with a short slide in the direction of travel; progress fills on the smooth spring with a rolling counter.
  • Approve shows progress, then morphs its label and width into Approved and a status band opens under the header.

Responsive behavior

  • The header stacks and the progress bar moves above the tabs below 560px of card width; tabs scroll sideways when they do not fit.
  • Below 560px one line number column remains. Long lines never wrap: the diff scrolls sideways with the line numbers pinned, and threads stay the width of the card.

Performance

  • Rows are memoized and only animate when they enter or leave; hover and the add comment mark are CSS only.
  • Heights animate only on a real change of content, never on every resize.
  • Keep single files to a few hundred lines, or split long files into hunks.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Choose this for a code review inside a developer tool. Load the diff from your git provider and map hunks to hunk lines with oldStart and newStart; everything else is derived.
  • Anchor threads by line id, not by line number, so they stay attached after suggestions rewrite the file.
  • Suggestions only replace new side lines: added lines are swapped, unchanged lines become deletions followed by the new lines. Keep the commit on your server; the block updates the diff optimistically.
  • The card grows with its content and only the diff scrolls sideways. In a centered layout, pin it to the top if height changes should not move it.
/components/blocks/code-review/markdown

The full library index for assistants is at /llms.txt.

Related

Agent runProBlockA single card that follows one AI coding agent through a task: steps stream in with the live one shimmering, tool calls open in place, and the agent stops on a two-file diff for you to approve or send back before it writes. When the run ends, the steps fold into one line and a result shows the files changed, the checks that passed and a pull request button.
PreviousAI inline editNextImport wizard
Arc · 123 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown

Retry failed webhook deliveries with backoff #2184

Daniel Kim wants to merge 4 commits into main from daniel/webhook-backoff

000123456789/5 viewed
src/webhooks/backoff.tsNew+110012345678900123456789−000123456789
@@ −0,0 +1,11 @@
+Added: export const MAX_ATTEMPTS = 8;
+Added: const BASE_DELAY_MS = 30_000;
+Added:
+Added: /**
+Added: * Exponential backoff with full jitter, so retries from many
+Added: * endpoints never land on the queue at the same moment.
+Added: */
+Added: export function nextDelay(attempt: number, random = Math.random) {
+Added: const ceiling = BASE_DELAY_MS * 2 ** (attempt - 1);
Line 9
  1. Marcus Johnson38 min ago

    Without a cap, the eighth attempt can wait over an hour. Can we hold the ceiling at 15 minutes so the whole schedule stays inside the retry window?

Suggested change

−Remove:   const ceiling = BASE_DELAY_MS * 2 ** (attempt - 1);
+Add:   const ceiling = Math.min(BASE_DELAY_MS * 2 ** (attempt - 1), 15 * 60_000);
+Added: return Math.round(random() * ceiling);
+Added: }