Repository navigation
Add automation runs dashboard with pagination and filtering - #18226
Conversation
There was a problem hiding this comment.
Important
The runs dashboard has a staleness bug on re-entry after you have scrolled/loaded more, and the pagination "cursor" is offset-based rather than opaque — both covered inline.
Reviewed changes
Adds an automation runs dashboard (a toolbar "Runs" button, a pageView toggle, and a breadcrumb) backed by cursor pagination across local/SSH/runtime hosts, with a virtualized AutomationRunsTable, status/host/search filters, 24h/7d summary cards, and a failure banner for unavailable histories. Backend adds listAutomationRunsPage/paginateAutomationRuns, threads limit/cursor through the automation.runs RPC with owner-fence checks, and mechanically splits runtime-automation-controller helpers into runtime-automation-run-context.ts and runtime-automation-update-value.ts.
- Cursor pagination —
listAutomationRunsPage(persistence) andpaginateAutomationRuns(runtime fallback) slice newest-first run lists via an integer-index cursor; theautomation.runsschema/handler acceptlimit/cursor. - Dashboard surface —
AutomationRunsDashboard/AutomationRunsDashboardSurfacerender the summary cards, filters, failure banner, and virtualized table. - Dashboard data hook —
useAutomationRunsDashboardfetches per-row pages with concurrency 4, dedups by run id, and tracksnextCursorper row for infinite scroll. - Navigation —
pageViewtoggles the runs view; breadcrumb and Escape return to the list;onOpenRunroutes into the existing detail pane. - Tests — unit tests for pagination and dashboard filtering, a (mocked-virtualizer) bounded-render test, and an E2E navigation smoke test.
ℹ️ Nitpicks
listAutomationRunsPageForTargetinsrc/renderer/src/components/automations/automation-host-client.ts:135is exported but has no callers — dead code that invites confusion about which page helper to use.paginateAutomationRuns(src/main/runtime/automation-run-pagination.ts) duplicates the offset/cursor slicing inlistAutomationRunsPage(automation-run-operations.ts); the runtime fallback could share the same bounded-slice helper rather than reimplementing it.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds cursor-based pagination for automation runs across persistence, runtime, RPC, and renderer layers. It adds a runs dashboard with filtering, outcome summaries, virtualization, pagination, navigation, and run selection. New tests cover cursor stability, dashboard modeling, hook reload behavior, virtualization, RPC routing, and end-to-end navigation. Additional edits reformat documentation and source code and update callback dependencies. Merge Risk: ⚪ Minimal · up to The dashboard adds paginated automation-run history while preserving ownership checks and deterministic ordering; no actionable merge-blocking risk remains, so it is merge-ready after normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the problem, solution, implementation areas, and verification steps. However, it does not follow the repository template and omits the required Linked Issue, Visual Proof or explicit N/A, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. Resolution Update the description to include all required template sections. Add the linked issue after ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
src/main/persistence/scheduling-automations/automation-run-operations.test.ts (1)
17-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the continuation cursor opaque in the test.
The test describes
nextCursoras opaque but asserts the internal value'2'. Assert that the cursor is non-null, then pass it to the next request. This keeps the test valid if pagination changes to a stable keyset or snapshot cursor.Suggested test update
- expect(first.nextCursor).toBe('2') + expect(first.nextCursor).not.toBeNull()
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 42bd252f-696d-4b54-9796-5cc2235a5c8a
📥 Commits
Reviewing files that changed from the base of the PR and between 6062edf and ec5e7bcdecc73d53ec13b1f8efa2f89b292ca5ca.
📒 Files selected for processing (43)
README.mddocs/reference/git-compatibility.mddocs/reference/wsl-probe-failure-semantics.mddocs/site/content/docs/review/annotate-ai-diff.mdxsrc/main/daemon/terminal-attach-cancellation.tssrc/main/persistence/loading-store/automation-persistence.tssrc/main/persistence/scheduling-automations/automation-run-operations.test.tssrc/main/persistence/scheduling-automations/automation-run-operations.tssrc/main/runtime/automation-run-pagination.tssrc/main/runtime/orca-runtime-fence-automation-owner.tssrc/main/runtime/rpc/methods/automation-schemas.tssrc/main/runtime/rpc/methods/automations.test.tssrc/main/runtime/rpc/methods/automations.tssrc/main/runtime/runtime-automation-controller.tssrc/main/runtime/runtime-automation-run-context.tssrc/main/runtime/runtime-automation-update-value.tssrc/main/runtime/runtime-store-contract.tssrc/main/worktree-create-preparation-pool.tssrc/renderer/src/components/automations/AutomationListToolbar.tsxsrc/renderer/src/components/automations/AutomationRunsDashboard.tsxsrc/renderer/src/components/automations/AutomationRunsDashboardSurface.tsxsrc/renderer/src/components/automations/AutomationRunsTable.test.tsxsrc/renderer/src/components/automations/AutomationRunsTable.tsxsrc/renderer/src/components/automations/AutomationsListPanel.test.tsxsrc/renderer/src/components/automations/AutomationsListPanel.tsxsrc/renderer/src/components/automations/AutomationsPageBreadcrumb.tsxsrc/renderer/src/components/automations/AutomationsPageSurface.tsxsrc/renderer/src/components/automations/automation-host-client.tssrc/renderer/src/components/automations/automation-owner-action-runner.tssrc/renderer/src/components/automations/automation-page-state.tssrc/renderer/src/components/automations/automation-row-action-dispatch.tssrc/renderer/src/components/automations/automation-runs-dashboard-model.test.tssrc/renderer/src/components/automations/automation-runs-dashboard-model.tssrc/renderer/src/components/automations/automation-scoped-list-client.tssrc/renderer/src/components/automations/use-automation-runs-dashboard.tssrc/renderer/src/components/automations/use-automations-page-controller.tssrc/renderer/src/components/automations/use-automations-page-destination-state.tssrc/renderer/src/components/automations/use-automations-page-escape.tssrc/renderer/src/components/automations/use-automations-page-local-state.tssrc/renderer/src/components/automations/use-selected-automation-run-history.tssrc/renderer/src/store/slices/runtime-status-recheck.tssrc/shared/automations-types.tstests/e2e/automation-runs-dashboard.spec.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
@coderabbitai Fixing. Will be in the next commit |
|
Tip For best results, initiate chat on the files or code changes.
You are interacting with an AI system. |
fe08d0e to
7dd192e
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 03eb788a-b31e-42b4-8302-f5c42412feca
📒 Files selected for processing (44)
README.mddocs/reference/git-compatibility.mddocs/site/content/docs/review/annotate-ai-diff.mdxsrc/main/daemon/terminal-attach-cancellation.tssrc/main/persistence/loading-store/automation-persistence.tssrc/main/persistence/scheduling-automations/automation-run-operations.test.tssrc/main/persistence/scheduling-automations/automation-run-operations.tssrc/main/runtime/orca-runtime-fence-automation-owner.tssrc/main/runtime/rpc/methods/automation-schemas.tssrc/main/runtime/rpc/methods/automations.test.tssrc/main/runtime/rpc/methods/automations.tssrc/main/runtime/runtime-automation-controller.tssrc/main/runtime/runtime-automation-run-context.tssrc/main/runtime/runtime-automation-update-value.tssrc/main/runtime/runtime-store-contract.tssrc/main/worktree-create-preparation-pool.tssrc/renderer/src/components/GitLabItemDialog.tsxsrc/renderer/src/components/automations/AutomationListToolbar.tsxsrc/renderer/src/components/automations/AutomationRunsDashboard.tsxsrc/renderer/src/components/automations/AutomationRunsDashboardSurface.tsxsrc/renderer/src/components/automations/AutomationRunsTable.test.tsxsrc/renderer/src/components/automations/AutomationRunsTable.tsxsrc/renderer/src/components/automations/AutomationsListPanel.test.tsxsrc/renderer/src/components/automations/AutomationsListPanel.tsxsrc/renderer/src/components/automations/AutomationsPageBreadcrumb.tsxsrc/renderer/src/components/automations/AutomationsPageSurface.tsxsrc/renderer/src/components/automations/automation-host-client.tssrc/renderer/src/components/automations/automation-owner-action-runner.tssrc/renderer/src/components/automations/automation-page-state.tssrc/renderer/src/components/automations/automation-row-action-dispatch.tssrc/renderer/src/components/automations/automation-runs-dashboard-model.test.tssrc/renderer/src/components/automations/automation-runs-dashboard-model.tssrc/renderer/src/components/automations/automation-scoped-list-client.tssrc/renderer/src/components/automations/use-automation-runs-dashboard.test.tsxsrc/renderer/src/components/automations/use-automation-runs-dashboard.tssrc/renderer/src/components/automations/use-automations-page-controller.tssrc/renderer/src/components/automations/use-automations-page-destination-state.tssrc/renderer/src/components/automations/use-automations-page-escape.tssrc/renderer/src/components/automations/use-automations-page-local-state.tssrc/renderer/src/components/automations/use-selected-automation-run-history.tssrc/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.tssrc/shared/automation-run-cursor.tssrc/shared/automations-types.tstests/e2e/automation-runs-dashboard.spec.ts
🚧 Files skipped from review as they are similar to previous changes (40)
- src/renderer/src/components/automations/automation-page-state.ts
- src/renderer/src/components/automations/AutomationsPageBreadcrumb.tsx
- src/renderer/src/components/automations/use-automations-page-local-state.ts
- docs/reference/git-compatibility.md
- docs/site/content/docs/review/annotate-ai-diff.mdx
- README.md
- src/main/daemon/terminal-attach-cancellation.ts
- src/main/runtime/rpc/methods/automations.test.ts
- src/main/worktree-create-preparation-pool.ts
- src/main/runtime/runtime-automation-run-context.ts
- src/renderer/src/components/GitLabItemDialog.tsx
- src/renderer/src/components/automations/use-automations-page-destination-state.ts
- src/main/persistence/loading-store/automation-persistence.ts
- src/main/runtime/runtime-store-contract.ts
- src/main/runtime/runtime-automation-controller.ts
- src/renderer/src/components/automations/use-selected-automation-run-history.ts
- src/renderer/src/components/automations/AutomationsListPanel.tsx
- src/renderer/src/components/automations/automation-runs-dashboard-model.test.ts
- src/renderer/src/components/automations/AutomationListToolbar.tsx
- src/renderer/src/components/automations/AutomationRunsTable.test.tsx
- src/main/runtime/orca-runtime-fence-automation-owner.ts
- src/renderer/src/components/automations/automation-owner-action-runner.ts
- src/shared/automations-types.ts
- src/main/runtime/rpc/methods/automations.ts
- src/renderer/src/components/automations/AutomationsListPanel.test.tsx
- src/renderer/src/components/automations/AutomationRunsDashboardSurface.tsx
- src/main/runtime/rpc/methods/automation-schemas.ts
- src/renderer/src/components/automations/use-automations-page-controller.ts
- tests/e2e/automation-runs-dashboard.spec.ts
- src/renderer/src/components/automations/AutomationRunsDashboard.tsx
- src/renderer/src/components/automations/automation-host-client.ts
- src/renderer/src/components/automations/automation-runs-dashboard-model.ts
- src/main/persistence/scheduling-automations/automation-run-operations.ts
- src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts
- src/renderer/src/components/automations/AutomationsPageSurface.tsx
- src/renderer/src/components/automations/automation-scoped-list-client.ts
- src/renderer/src/components/automations/use-automations-page-escape.ts
- src/renderer/src/components/automations/AutomationRunsTable.tsx
- src/main/runtime/runtime-automation-update-value.ts
- src/renderer/src/components/automations/automation-row-action-dispatch.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the delta against the prior Pullfrog review (ec5e7bc): both prior findings are resolved and no new issues were introduced.
- Keyset pagination — replaced the offset-based cursor with an opaque
createdAt:idkeyset in a new sharedsrc/shared/automation-run-cursor.ts; the persistence and runtime paginators now share it, and a bare-integer legacy offset cursor still decodes so pre-upgrade cursors keep working. - Re-entry staleness fix —
useAutomationRunsDashboardnullsgenerationRefwhile disabled and tracksloadMoreTokenin the generation, so a fresh re-entry refetches the head instead of appending from stale cursors. - Broader request key — the query key now includes the authority pairing revision and the fallback host target, so a re-pair or an uncaptured row moving targets reloads from the head.
- Outcome-window guard — future-dated runs are excluded from the 24h/7d summary cards.
- Tests — added coverage for prepend stability, pruned-boundary resume, legacy-offset cursors, re-entry/re-pair reloads, and future-dated exclusion.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Adds a new Runs view in the Automations page that lets users browse all runs across automations with status/host filtering, search, and pagination support. Includes virtualized table rendering for efficient handling of large run histories and summary cards showing 24h/7d success/failure counts.
Missing dependencies in useCallback can cause stale closure bugs. This adds missing state setters to dependency arrays and consolidates type imports for consistency.
Pagination now uses createdAt:id boundaries instead of offsets, so new runs arriving between pages don't shift the window. Maintains backwards compatibility with legacy offset cursors. Move pagination to shared module, fix outcome counting for future-dated runs, and improve hook state tracking on authority re-pairing or target changes.
Moves run display from detail pane to dedicated page, establishing three-level navigation (Automations → Runs → Run Details) and simplifying the detail pane component.
0ff9705 to
0106757
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the delta against the prior Pullfrog review (7dd192ef). The run-detail view was lifted out of the detail pane into a top-level pageView === 'run' page with origin-aware back navigation.
- Top-level run page — extracted the run-detail rendering (title, breadcrumb, status badge, rerun/open-workspace actions) out of
AutomationsDetailPaneinto a newAutomationRunDetailsPage, reached via a newpageView === 'run'state. runPageOriginnavigation — a newrunPageOrigin('runs' | 'automation') records whether a run was opened from the dashboard or an automation's detail, and drives both the breadcrumb and the back button / Escape target.- Top bar + breadcrumb — a new
AutomationsPageTopBarhosts the header and owner-conflict notice, andAutomationsPageBreadcrumbnow renders three states (runs,run,automation) with distinct back callbacks. - Detail-pane cleanup —
AutomationsDetailPaneno longer renders automation run pages (external runs remain), and delete dialogs moved intoAutomationsPageDeleteDialogs. - Hook hygiene —
useAutomationRunsDashboardwritesinputRef/stateRefinsideuseEffectinstead of during render.
Verified the back/Escape paths are consistent across showAutomationsList / showRunsDashboard / showAutomationDetails, and that the added surface/breadcrumb tests assert the new navigation behavior.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: cdbaafed-b555-4a47-94d0-c24f71d3aa69
📒 Files selected for processing (18)
src/renderer/src/components/automations/AutomationRunDetailsPage.tsxsrc/renderer/src/components/automations/AutomationRunPageFrame.tsxsrc/renderer/src/components/automations/AutomationRunsDashboardSurface.test.tsxsrc/renderer/src/components/automations/AutomationRunsDashboardSurface.tsxsrc/renderer/src/components/automations/AutomationsDetailPane.run-count.test.tsxsrc/renderer/src/components/automations/AutomationsDetailPane.test.tsxsrc/renderer/src/components/automations/AutomationsDetailPane.tsxsrc/renderer/src/components/automations/AutomationsPageBreadcrumb.test.tsxsrc/renderer/src/components/automations/AutomationsPageBreadcrumb.tsxsrc/renderer/src/components/automations/AutomationsPageDeleteDialogs.tsxsrc/renderer/src/components/automations/AutomationsPageSurface.tsxsrc/renderer/src/components/automations/AutomationsPageTopBar.tsxsrc/renderer/src/components/automations/automation-page-state.tssrc/renderer/src/components/automations/use-automation-run-page-state.tssrc/renderer/src/components/automations/use-automation-runs-dashboard.test.tsxsrc/renderer/src/components/automations/use-automation-runs-dashboard.tssrc/renderer/src/components/automations/use-automations-page-escape.tssrc/renderer/src/components/automations/use-automations-page-local-state.ts
💤 Files with no reviewable changes (2)
- src/renderer/src/components/automations/AutomationsDetailPane.run-count.test.tsx
- src/renderer/src/components/automations/AutomationsDetailPane.test.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.
- Define a stable total order with createdAt and id tiebreaker to prevent runs tied on createdAt from being dropped when the boundary run is pruned between page requests - Retain cursor on failed pagination so pages remain retryable - Update ownerNotice type to AutomationActionNotice
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the delta against the prior Pullfrog review (0106757). This commit hardens the keyset pagination for createdAt ties and makes a failed load-more retryable. Both fixes are correct and covered by tests that would fail against the previous code.
- Keyset tie-break on
id— newcompareAutomationRunsNewestFirstbreakscreatedAtties by ascendingid;sortedAutomationRunsand the pruned-boundary fallback inpageStartIndexnow share one total order, so a boundary run pruned between pages no longer takes the runs tied with it. - Cursor retention on load-more failure —
useAutomationRunsDashboardkeeps a row's cursor when a page fetch fails, sohasMorestays true and the row's remaining history stays reachable through a retry instead of appearing exhausted. - Type narrowing —
AutomationsPageTopBar.ownerNoticetightened fromstring | nulltoAutomationActionNotice | null, matching theAutomationOwnerConflictNoticeconsumer. - Tests — added a regression test for tied-
createdAtpruned-boundary resume and one asserting a failed load-more retains the cursor and succeeds on retry.
Verified the tie-break is deterministic (UUIDs are ASCII, so localeCompare is locale-independent) and that the persistence path now sorts with the same comparator the shared paginator expects.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Split AutomationsPageSurface into smaller, focused modules for better maintainability and reusability. Move list panel UI rendering to AutomationsPageListPanel component and worktree map selection logic to a standalone utility function.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Extracted the list panel — moved the
<AutomationsListPanel>render out ofAutomationsPageSurfaceinto a newAutomationsPageListPanelwrapper that takes the wholeAutomationsPageControllerplus anonOpenDetailcallback; the wrapper now ownsonListFilterChange,onRefresh,isRefreshing, andonOpenRuns.
Verified the extraction is behavior-preserving: all 45 AutomationsListPanel props map one-to-one, and the moved handlers source the same controller fields (hostCatalog, pageRefresh, isLoading, setPageView) as the inlined version. The surface's now-unused destructured fields (sourceAvailability, sshConnectionStates, runtimeStatusByEnvironmentId, the search/filter local state) were dropped cleanly. No behavior change, no new issues.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Adds localized strings for the automation runs dashboard view, including search, filtering by host and status, run counts for 24h/7d windows, and empty state messaging across all supported languages.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the delta against the prior Pullfrog review (eb6d0f7). This commit only adds the localization catalog entries for the runs-dashboard surface; no component or logic changes.
- i18n strings — added
AutomationRunsDashboard(search, host/status filters, 24h/7d summary labels, loading/empty states, single/plural unavailable-history notice),AutomationListToolbar.runs, andAutomationsPageBreadcrumb(ariaLabel,runDetails) entries to all five locales.
Verified the key sets are identical across en/es/ja/ko/zh, that the {{count}} placeholder in historyUnavailableMany is fed by { count: visibleFailures.length } at the call site, and that the new keys resolve under the auto.components.automations namespace the components already reference.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…#18226) * Add automation runs dashboard with pagination and filtering Adds a new Runs view in the Automations page that lets users browse all runs across automations with status/host filtering, search, and pagination support. Includes virtualized table rendering for efficient handling of large run histories and summary cards showing 24h/7d success/failure counts. * Fix missing dependencies in useCallback hooks and imports Missing dependencies in useCallback can cause stale closure bugs. This adds missing state setters to dependency arrays and consolidates type imports for consistency. * Use keyset pagination for stable automation runs pages Pagination now uses createdAt:id boundaries instead of offsets, so new runs arriving between pages don't shift the window. Maintains backwards compatibility with legacy offset cursors. Move pagination to shared module, fix outcome counting for future-dated runs, and improve hook state tracking on authority re-pairing or target changes. * Extract automation run details to top-level page view Moves run display from detail pane to dedicated page, establishing three-level navigation (Automations → Runs → Run Details) and simplifying the detail pane component. * Fix pagination stability when automation runs share createdAt - Define a stable total order with createdAt and id tiebreaker to prevent runs tied on createdAt from being dropped when the boundary run is pruned between page requests - Retain cursor on failed pagination so pages remain retryable - Update ownerNotice type to AutomationActionNotice * Extract automations list panel and worktree map logic Split AutomationsPageSurface into smaller, focused modules for better maintainability and reusability. Move list panel UI rendering to AutomationsPageListPanel component and worktree map selection logic to a standalone utility function. * Add i18n strings for automation runs dashboard Adds localized strings for the automation runs dashboard view, including search, filtering by host and status, run counts for 24h/7d windows, and empty state messaging across all supported languages. * fix missing translation * fix missing translation

Problem
Users have no centralized view of automation run history across all automations. The only way to see runs is within individual automation details, limiting visibility into overall automation health and recent activity.
Solution
Changes
Backend:
automation-run-operations.ts: AddedlistAutomationRunsPage()with opaque cursor-based paginationautomation-run-pagination.ts: Shared pagination logic for in-memory datasetslimitandcursorparametersFrontend:
AutomationRunsDashboardsurface with search, filters, and summary cardsAutomationRunsTablewith React Virtual for efficient rendering of large listsautomation-runs-dashboard-model: Filters, search, and outcome counting logicpageViewtoggles between automations list and runs dashboardTesting:
Verification
npm test tests/e2e/automation-runs-dashboard.spec.tsnpm test -- automation-run-operations.test.ts automation-runs-dashboard-model.test.ts