Skip to content

fix(tui): stream large Git index and status output for project tree (#2120) - #2580

Closed
turkonthelurk wants to merge 2 commits into
tetsuo-ai:mainfrom
turkonthelurk:cursor/stream-project-tree-git-listing-3ec5
Closed

turkonthelurk wants to merge 2 commits into
tetsuo-ai:mainfrom
turkonthelurk:cursor/stream-project-tree-git-listing-3ec5

Conversation

@turkonthelurk

Copy link
Copy Markdown
Contributor

Closes #2120

Draft for review only. Not to be merged by automation; a maintainer decides when and whether it lands. Opened from fork turkonthelurk/agenc-core. Nothing pushed to main on either repo. Based on upstream main only. Independent of #2117/#2579 and #2119. Does not change Neovim write-gate or sync frame budgeting.

Problem

Project-tree Git commands used execFile without maxBuffer. Node’s 1 MiB default turned successful large-repo Git output into errors, after which the tree fell back to a 10k/depth-8 filesystem scan and could silently omit files.

Verified still present on upstream main at 6a2a92d before changing anything.

Change

  • Spawn Git and parse ls-files -z / status incrementally (no execFile default ceiling).
  • Bound at 16 MiB / 250k entries with the existing 5s timeout.
  • Distinct failure modes: ok, truncated, not-git, timeout, output-limit, error.
  • Filesystem scan (10k/depth-8) only for a non-Git workspace or an empty successful index; timeout/output-limit keep the Git result and surface a warning instead of a silent truncated scan.

Tests

Hermetic: 80 passed across project-tree Git listing / tree / branch-footer suites, including >1 MiB NUL-delimited output, a real >1 MiB index, newline filenames, and no silent scan on Git failure.

This does not merge.

Opened from fork turkonthelurk/agenc-core. Companion fork PR (to close): turkonthelurk#22

cursoragent and others added 2 commits September 18, 2026 07:55
Project-tree Git reads used execFile without maxBuffer, so indexes over
1 MiB failed and the tree silently fell back to a 10k/depth-8 scan.

Parse ls-files and status incrementally from a spawned process with
explicit byte and entry bounds, and keep timeout or output-limit
failures distinct from a non-Git workspace.

Closes tetsuo-ai#2120

Co-authored-by: turk <turkonthelurk@users.noreply.github.com>
Use a flushed payload for >1 MiB fake Git output, and read the workspace
listing warning field so truncated listings stay visible on the tree.

Co-authored-by: turk <turkonthelurk@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor Author

Closing as obsolete. Target surface was removed in #2618; see #2624. No merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(tui): stream large Git index and status output for project tree

2 participants