Skip to content
Eskais UI

Git

Server Commit History

A CommitHistory over a PageSource: older commits load as the end scrolls into view and from a Load more button, the header counts the source's total, and the graph carries on across pages.

Example

Loading

Installation

npx shadcn@latest add @eskais/server-commit-history

Usage

Import
import { ServerCommitHistory } from "@/components/ui/server-commit-history"

Use it when the history comes from an API a page at a time, like git log with a cursor.

API reference

ServerCommitHistory

PropTypeDefault
sourcerequiredPages of commits, newest first; each page continues the last, as `git log --skip` or a cursor does.PageSource<Commit, F>–
filterrequiredWhat the source filters on, like the branch: a new filter starts again from the newest commit.F–
sortreadonly SortSpec[]NO_SORT
pageSizeCommits per request. Default 100.number100
labelsrequiredServerCommitHistoryLabels–

Also takes CommitHistoryProps except commits, hasMore, loadingMore, onLoadMore, labels, count.

Other exports

type ServerCommitHistoryLabelstype ServerCommitHistoryProps

Accessibility

  • Older pages arrive below without moving focus; Load more reaches them from the keyboard.

Agent actions

The CommitHistory actions, plus Load more by name.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.