Repository navigation
Virtualize automations run history table for large histories - #20916
Conversation
- Add virtual scrolling to AutomationRunHistory for efficient rendering of large run lists - Implement sticky table header that stays visible during scroll - Update keyboard navigation and focus management for virtualized rows - Move AutomationRunsTable header inside scroll container for visual consistency - Add virtualizer-test-stub for testing virtual scroll behavior without DOM measurement - Cache DateTimeFormat to avoid per-cell allocation overhead
- Tests verify row content renders spend, tokens, and workspace labels correctly - Keyboard navigation guards prevent operations during failed host reads - Load-more pagination triggers at scroll end and respects page boundaries - New fixtures support flexible automation run and usage test scenarios
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAutomation run history now uses virtualized rows with measured header offsets and updated keyboard navigation. The runs table uses a sticky header and flex-based loading and empty states. The detail pane delegates scrolling to the history component. Tests and fixtures now cover virtualization, row content, keyboard guards, table behavior, pagination, usage data, and worktree data. Date formatting reuses a module-scope formatter. Merge Risk: ⚪ Minimal · up to The virtualized history guards missing selections before scrolling, and no merge-blocking issue remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the problem, solution, scope, and testing. However, the required linked issue is blank, the ELI5 and Review sections are missing or empty, and Visual Proof is marked N/A despite layout and interaction changes such as sticky scrolling and keyboard navigation. Resolution Add a valid issue reference after “Fixes #”. Add the required ELI5 section and complete the Review section. Provide before-and-after visual proof for the UI and interaction changes, or justify N/A with a more accurate explanation. Document the platforms tested and the status of the required lint, typecheck, test, and build commands.
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
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: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: ae584043-6242-4e2a-8069-f2cd49f9cffe
📒 Files selected for processing (8)
src/renderer/src/components/automations/AutomationRunHistory.test.tsxsrc/renderer/src/components/automations/AutomationRunHistory.tsxsrc/renderer/src/components/automations/AutomationRunsTable.test.tsxsrc/renderer/src/components/automations/AutomationRunsTable.tsxsrc/renderer/src/components/automations/AutomationsDetailPane.tsxsrc/renderer/src/components/automations/automation-page-parts.tsxsrc/renderer/src/components/automations/automations-page-fixtures.tssrc/renderer/src/components/automations/virtualizer-test-stub.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — one coverage gap inline, plus two small notes.
Reviewed changes
AutomationRunHistoryvirtualization — replaces the fullruns.map()render withuseVirtualizer, adds a sticky in-scroller header with a measuredscrollMargin, and routes keyboard navigation through a ref so the window listener no longer resubscribes on every render.- Deferred keyboard focus — arrow moves record
pendingFocusRunIdRefand focus the row only after the scroll-driven render mounts it, since the target can sit outside the virtual window. AutomationRunsTableheader — moved inside the scroller assticky top-0; the scroll container is now a flex column.- Detail pane layout — the runs tab now owns its scrolling via a
p-5wrapper instead of padding onTabsContent. - Formatting and fixtures —
Intl.DateTimeFormatfrozen at module scope;makeRunUsage/makeWorktreefixtures added and anas Worktreecast dropped. - Tests — shared
virtualizer-test-stub.ts, plus new virtualization, row-content and load-more coverage.
ℹ️ Nitpicks
- The PR body says "no visible UI change", but the runs tab now has its own scroll, a sticky table header, and a fixed "Run history" bar. A before/after screenshot would confirm the new flex/scroll chain renders as intended.
RUNS_VIEWPORT_INITIAL_RECTis defined identically inAutomationRunHistory.tsxandAutomationRunsTable.tsx; a shared constant would keep the two viewport windows from drifting.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
- Implement scrollToIndex in virtualizer stub to move viewport window - Optimize row-size estimation to use predicate instead of labels - Test validates keyboard navigation scrolls rows into view before focus
There was a problem hiding this comment.
ℹ️ No critical issues — one minor coverage note inline.
Reviewed changes
- Extracted
isAutomationRunFoldedand switched row-size estimation to it, soestimateSizeno longer builds the occurrence label (and formats a date) for every unmounted index; the label still returns null exactly when the predicate is false, so the estimate is unchanged. - Made the shared virtualizer stub window move on
scrollToIndexinstead of always returning the first 21 items, and added a test that arrows a selection past the virtual window, asserting the row mounts, carriesdata-current, and takes focus (document.activeElement).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Virtualization test helpers extracted —
renderRuns,pressArrowandmakeRunsreplace the render/arrow loops duplicated across the virtualization cases. - Scroll-up focus coverage added — a case that arrows past the virtual window and back up, asserting the first row remounts with
data-currentand takes focus, closing the upward direction the previous commit left untested.
The new test is real: forcing the stub's index < current branch to a no-op makes it fail. Both prior pullfrog threads are addressed and resolved.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…i#20916) * refactor(automations): virtualize run history table - Add virtual scrolling to AutomationRunHistory for efficient rendering of large run lists - Implement sticky table header that stays visible during scroll - Update keyboard navigation and focus management for virtualized rows - Move AutomationRunsTable header inside scroll container for visual consistency - Add virtualizer-test-stub for testing virtual scroll behavior without DOM measurement - Cache DateTimeFormat to avoid per-cell allocation overhead * test(automations): add coverage for virtualized run table - Tests verify row content renders spend, tokens, and workspace labels correctly - Keyboard navigation guards prevent operations during failed host reads - Load-more pagination triggers at scroll end and respects page boundaries - New fixtures support flexible automation run and usage test scenarios * test(automations): verify scroll-to-focus path in virtualized runs - Implement scrollToIndex in virtualizer stub to move viewport window - Optimize row-size estimation to use predicate instead of labels - Test validates keyboard navigation scrolls rows into view before focus * add more tests

Problem
The automations run history table renders every run in the DOM, causing performance degradation when displaying large histories (thousands of runs).
Solution
Implements virtual scrolling using
@tanstack/react-virtualto render only visible rows at any time, keeping mounted DOM nodes bounded. Optimizes date formatting by freezingIntl.DateTimeFormatat module scope.What Changed
useVirtualizer; handles 5,000+ runs with <50 mounted rowsDateTimeFormatat module scope to avoid per-cell allocationsvirtualizer-test-stub.ts, comprehensive virtualization and row content testsWhy
Virtualization is the standard solution for large scrollable lists—ensures smooth scrolling and bounded memory regardless of history size.
Linked Issue
Fixes #
Visual Proof
N/A — performance improvement, no visible UI change
Testing
Virtualization: 5,000-run history test verifies <50 mounted rows
Row content: spend, tokens, workspace names, status, occurrence labels
Keyboard navigation: ArrowUp/Down/Enter with virtualized rows
Load-more: scroll position guards and pagination behavior
Selection: stale selection drops on automation change
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
N/A
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)