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
server-commit-history-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
Use it when the history comes from an API a page at a time, like git log with a cursor.
API reference
ServerCommitHistory
| Prop | Type | Default |
|---|---|---|
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 | – |
sort | readonly SortSpec[] | NO_SORT |
pageSizeCommits per request. Default 100. | number | 100 |
labelsrequired | ServerCommitHistoryLabels | – |
Also takes CommitHistoryProps except commits, hasMore, loadingMore, onLoadMore, labels, count.
Other exports
type ServerCommitHistoryLabelstype ServerCommitHistoryPropsAccessibility
- 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.