Commit Graph
4 Commits
Author SHA1 Message Date
OrcaWinandBrennan Benson e109e78ebf fix(source-control): keep huge change sets responsive (#9477)
* fix(source-control): keep huge change sets responsive

* Fix cancellation and retry handling for capped status

* Harden capped status for conflict-heavy repositories

* Harden capped status recovery and cancellation

* fix(source-control): preserve capped status correctness

* fix(source-control): translate submodule status at render time

---------

Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
2026-07-20 14:50:12 -07:00
OrcaWin c869891b37 test(e2e): defer large repo cleanup until shutdown (#8228) 2026-07-10 22:43:12 -07:00
Jinjing 73e082b577 fix(source-control): avoid render-time layout reads (#8193)
* fix(source-control): stop measuring layout on every virtual list render

Shared-scroller scrollMargin used a deps-less useLayoutEffect that called
getBoundingClientRect after every React render (including git-status polls).
Measure on mount/attach only, then refresh via ResizeObserver and childList
MutationObserver with cleanup, and add focused tests for no render-time
layout reads plus multi-section margin updates.

* fix(source-control): prune stale layout observers
2026-07-10 18:12:57 -07:00
JinjingandOrca f495b39a6a Fix untracked line-stat cache thrash and add source-control scale benchmark (#8022)
* Fix untracked line-stat cache thrash and add source-control scale benchmark (#8013)

The untracked line-stat cache capped at 2,048 entries while a git status
scan can carry up to DEFAULT_GIT_STATUS_LIMIT (10,000) untracked entries.
A sequential scan over more files than the cap FIFO-evicted every entry
before the next poll revisited it (~0% hit rate), so every 3s status poll
re-read every untracked file's full contents. Measured with 64KB files:
warm rescan cost per file was 17x higher just past the cap.

- Size the cache to 2x the status entry limit and make eviction LRU
  (delete-before-set on hit and refresh) so a hot worktree's entries
  survive another worktree's scan.
- Add tests/e2e/source-control-large-file-count.spec.ts: a 5-scenario
  Playwright benchmark (pnpm run test:e2e:source-control-scale) that
  reproduces #8013 deterministically — event-loop stall, DOM node count,
  JS heap, and OS-level renderer working set at 5k/9.5k/11k changed files,
  plus a clean-repo control and a cache-effectiveness gate. Scenarios
  asserting bounded row mounting go green with the SourceControl
  virtualization fix (#7619).

Co-authored-by: Orca <help@stably.ai>

* Address review: historical cache comment + fixture cleanup on partial setup failure

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-07-09 22:33:55 -07:00