- {data.hasMore && limit < MAX_LIMIT ? (
-
Load more
- ) : null}
- {data.hasMore && limit >= MAX_LIMIT ? (
-
- Showing the maximum page size ({MAX_LIMIT}). Narrow filters to inspect older events.
-
+ {data.hasMore ? (
+
void loadMore()} disabled={loadingMore}>
+ {loadingMore ? "Loading…" : "Load more"}
+
) : null}
+ {error ?
{error}
: null}
void load()}>Refresh
diff --git a/src/api/routes.ts b/src/api/routes.ts
index 0eda0c41a8..820d3ace16 100644
--- a/src/api/routes.ts
+++ b/src/api/routes.ts
@@ -672,6 +672,7 @@ const selfhostDeadLetterQueueQuerySchema = z
const skippedPrAuditQuerySchema = z
.object({
limit: z.coerce.number().int().optional(),
+ offset: z.coerce.number().int().optional(),
repoFullName: z.string().trim().min(3).max(200).optional(),
reason: z.enum(PUBLIC_SURFACE_SKIP_REASONS).optional(),
since: z.string().trim().min(1).max(64).optional(),
@@ -1725,6 +1726,7 @@ export function createApp() {
if (repoFullNames instanceof Response) return repoFullNames;
const page = await listPrVisibilitySkipAuditEvents(c.env, {
limit: clampInteger(parsed.data.limit ?? 50, 1, 100),
+ offset: Math.max(0, parsed.data.offset ?? 0),
repoFullNames,
reason: parsed.data.reason,
sinceIso,
@@ -1732,6 +1734,7 @@ export function createApp() {
return c.json({
generatedAt: nowIso(),
limit: page.limit,
+ offset: page.offset,
hasMore: page.hasMore,
filters: {
repoFullName: requestedRepo ?? null,
diff --git a/src/db/repositories.ts b/src/db/repositories.ts
index 0aa1f4fb4f..dee5c82499 100644
--- a/src/db/repositories.ts
+++ b/src/db/repositories.ts
@@ -3191,6 +3191,7 @@ export type PrVisibilitySkipAuditEvent = {
export type PrVisibilitySkipAuditPage = {
limit: number;
+ offset: number;
hasMore: boolean;
items: PrVisibilitySkipAuditEvent[];
};
@@ -3199,14 +3200,17 @@ export async function listPrVisibilitySkipAuditEvents(
env: Env,
options: {
limit?: number | undefined;
+ offset?: number | undefined;
repoFullNames?: string[] | undefined;
reason?: string | undefined;
sinceIso?: string | undefined;
} = {},
): Promise