A repository's history beside the selected commit, the working tree's staged and unstaged changes, a repository picker and a commit view, from CommitHistory, GitDiff, GitTree and RepositorySelect.
History beside the commit
CommitHistory takes about 40% of the width (at least 34rem) and keeps the selected commit with selected and onSelect: a press, Enter or Space selects a row, which carries aria-selected and the current-page look, and a press on the selected row opens its details. HEAD is selected at first. headerStart puts a RepositorySelect before the branch switcher, and upstreamHead marks the commits that aren't pushed. The pane beside it is a header and a GitDiff with a collapsible file tree, 13rem wide.
Read from the local checkout at ~/work/acme/api
Working tree clean on main · up to date with origin/main
Read the repository again1,284 commits
Add token-bucket rate limiting to the public API
Mara Lindqvist9be07d2Copy the full hashParent 1210b70API-118
On a dirty checkout, workingTree adds an "Uncommitted changes" row above the newest commit, with a hollow dashed node and the staged and unstaged counts. It shares the history's focus and selection as WORKING_TREE, so it can start selected. The pane shows the staged and unstaged changes read-only, one at a time behind a toggle, or both in one diff with groups: the file tree gets a section per group, each file header names its group, and a file staged and then edited again shows in each.
Read from the local checkout at ~/work/acme/app
Read the repository again2 not pushed2,310 commits
Show changes in src/onboarding/step-indicator.tsxAddedsrc/onboarding/step-indicator.tsxsrc/onboarding/step-indicator.tsx19 additions, 0 deletions+19−0
@@ -0,0 +1,19 @@
+Added, line 1import { cn } from "@/lib/utils"
+Added, line 2
+Added, line 3type StepIndicatorProps = { steps: readonly string[]; current: number }
+Added, line 4
+Added, line 5export function StepIndicator({ steps, current }: StepIndicatorProps) {
+Added, line 6 return (
+Added, line 7 <ol className="flex items-center gap-2" aria-label="Onboarding progress">
+Added, line 8 {steps.map((step, index) => (
+Added, line 9 <li
working-tree.tsxCopy code
// One group at a time, behind a read-only Staged/Unstaged toggle<GitDiff aria-label="Staged changes" patch={staged} fileTree="collapsible" />// Or both, as sections of the file tree, each header naming its group<GitDiff aria-label="Uncommitted changes" groups={[ { label: "Staged", patch: staged }, // git diff --cached { label: "Unstaged", patch: unstaged }, // git diff ]}/>
Repository and branch
One history across the page, with the repository and branch in a toolbar above it. Each repository shows its path, its branch and its state; the branch select is a plain Select composition with ahead and behind counts.
Read from the local checkout at ~/work/acme/api, unpushed commits included
Read the repository again1,284 commits
A commit's files
The commit view replaces the history, like a route. A GitTree of every file at the commit drives the diff through currentFile and follows it through onCurrentFileChange; createDiffViewController(), exported from git-diff, does the same from code.
Add token-bucket rate limiting to the public API
Each API token gets a bucket of 120 requests that refills at 2 per second. Buckets live in Redis
when REDIS_URL is set and in memory otherwise. Over the limit, the API answers 429 with
retry-after and x-ratelimit-* headers. Replaces the fixed-window throttle in src/legacy.
Mara Lindqvistcommitted Nov 18, 2026, 4:12 PM UTC9be07d2Copy the full hashParent 4f1a9c3API-118
.github
docs, Has changes
api, Has changes
authentication.md
pagination.md
rate-limits.md, Renamed, from docs/rate-limits.mdR
webhooks.md
runbooks
errors.md
migrations
scripts
src, Has changes
auth, Has changes
api-tokens.test.ts, ModifiedM
api-tokens.ts, ModifiedM
hash.ts
sessions.ts
config, Has changes
defaults.ts, ModifiedM
index.ts
schema.ts, ModifiedM
db
http, Has changes
middleware, Has changes
cors.ts
index.ts, ModifiedM
rate-limit.ts, AddedA
request-id.ts
timing.ts
errors.ts, ModifiedM
health.ts
server.ts, ModifiedM
jobs
legacy, Has changes
throttle.test.ts, DeletedD
throttle.ts, DeletedD
metrics, Has changes
counters.ts, ModifiedM
registry.ts
rate-limit, Has changes
index.ts, AddedA
redis-store.ts, AddedA
store.ts, AddedA
token-bucket.test.ts, AddedA
token-bucket.ts, AddedA
routes, Has changes
admin
public, Has changes
events.ts
index.ts, ModifiedM
invoices.ts
webhooks.ts
search
webhooks
main.ts
test
.editorconfig
.gitignore
.nvmrc
CHANGELOG.md, ModifiedM
Dockerfile
README.md
docker-compose.yml
package.json, ModifiedM
pnpm-lock.yaml
tsconfig.json
vitest.config.ts
165 additions, 39 deletions+165−39
Show changes in src/rate-limit/token-bucket.tsAddedsrc/rate-limit/token-bucket.tssrc/rate-limit/token-bucket.ts33 additions, 0 deletions+33−0
@@ -0,0 +1,33 @@
+Added, line 1import type { BucketStore } from "./store.ts"
+Added, line 2
+Added, line 3export type BucketPolicy = {
+Added, line 4 /** Requests a full bucket allows in a burst. */
+Added, line 5 capacity: number
+Added, line 6 /** Tokens added back per second. */
+Added, line 7 refillPerSecond: number
+Added, line 8}
+Added, line 9
commit-view.tsxCopy code
const [current, setCurrent] = useState<string | null>(null)<GitTree aria-label="Files at 9be07d2" files={filesAtCommit} current={current} onOpenFile={setCurrent} /><GitDiff aria-label="Changes in 9be07d2" patch={patch} fileTree={false} currentFile={current} // setting it scrolls the diff to that file onCurrentFileChange={setCurrent} // the tree follows the diff as it scrolls/>
Changes in a scrolling dialog
height="auto" grows to the whole diff with no scroller of its own: the dialog body is the one scroller, and the diff still renders only the lines in view, reads find in page and moves the body with j/k. The file tree beside it stays in view, up to 40rem tall.
To cap a diff instead, set --diff-max-height on it or an ancestor: past it the diff scrolls inside, and at its top or bottom the wheel moves the dialog body on. Set the cap below the body's visible height, never in viewport units.
In split layout an added or deleted file shows its one side across the whole width.