Repository navigation
Conversation
The Files drawer flattened the whole expanded tree on every toggle and ran `git check-ignore` synchronously at the end, so a click walked every expanded directory and spawned git on the render thread even though a comment claimed "no git re-run". The same annotation also delayed the first rows of an ordinary background refresh: the worker published nothing until the whole vector, marks included, was complete. `tree_rows`/`tree_rows_wsl` now only enumerate. The snapshot worker publishes two stages: bare rows first, then the same rows annotated by git plus the VCS snapshot. `click_row` is incremental: collapse drops the contiguous DFS descendant run and reads nothing; expand reads only the newly opened directory (plus hidden expanded descendants) and inserts those rows. New rows start unannotated and are queued by path in `pending_ignore_paths`; one background `git check-ignore` pass annotates exactly those rows, so a click never re-checks the whole tree and a concurrent expand or collapse is never overwritten. A full snapshot carries `tree_generation`, so a row set captured before a local shape change is dropped instead of reverting it. Details that keep the incremental path equal to a re-flatten: - The bare stage keeps the ignore marks of the rows already on screen, matched by path; refreshing an annotated tree no longer blanks every italic mark until the annotated stage lands. The annotated stage stays authoritative. - A row set that fills `MAX_ROWS` is recorded as truncated (a full snapshot or an inserted subtree). Collapsing in that state re-arms one snapshot, because the freed space is not filled by the rows the cap dropped and only a re-flatten can restore them. - An expand that ends exactly at the cap counts as truncated too (`>=`), so a subtree cut by the budget is restored by the next collapse-triggered scan. - An expand reads only the rows that fit after the clicked directory (`MAX_ROWS - index - 1`), so the work matches the visible result. - The annotation pass only asks git about the rows the expand inserted; rows already on screen keep their mark, so expanding no longer re-checks up to `MAX_ROWS` paths (100-360 ms for a full tree). - A host expand whose `read_dir` fails drops the path from `expanded` and re-arms the snapshot instead of leaving an open chevron over nothing. - Filter changes no longer bump `tree_generation`: the filter only selects among `rows`, and bumping discarded a running full scan and paid for another. - The `.git` ancestor check left the 100 ms polling path; the worker already performs it. Design note: architecture/notes/pebrel_app/display/side_panel/2026-11-13-background-ignore-annotations.md Validation: - cargo test -p nebula --bin pebrel side_panel: 84 passed / 4 ignored on the previous revision. The narrowed annotation pass and its new test were not re-run locally (requested). - cargo check -p nebula --tests and scripts/check_architecture.py --base 09e5eb4 on that same revision.
not-exist
force-pushed
the
perf/side-panel-ignore-worker
branch
from
November 22, 2026 12:41
b776ad9 to
585dbe7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Result / User Outcome
The Files drawer no longer blocks the UI thread on full-tree ignore annotation or VCS probing:
MAX_ROWS,MAX_PER_DIR, ordering,.gitfiltering, WSL behavior, and refresh/error semantics remain bounded and intact.Design / Boundaries
pebrel_app/src/display/side_panel/mod.rscontinues to own the existing snapshot worker and slot.SnapshotUpdate::Rowspublishes a bare row snapshot before the annotated snapshot;SnapshotUpdate::Ignoredapplies only path-keyed incremental annotations.tree_generationprevents an older full snapshot from reverting a newer expand/collapse, whilepending_ignore_pathscoalesces follow-up work when the worker is busy.click_rowuses the privatecollapse_subtreeandexpand_subtreehelpers. The interaction path does not perform filesystem scans or wait for subprocesses. Truncated row sets and failed expansions re-arm a full snapshot when an incremental update cannot reconstruct the complete tree.architecture/notes/pebrel_app/display/side_panel/2026-11-13-background-ignore-annotations.md.SnapshotRunningGuard.Evidence / Validation
Local checks completed against base commit
c6d9d7bfebc50ee36389f4366aee7b6596cee645:python3 scripts/check_architecture.py --base c6d9d7bfebc50ee36389f4366aee7b6596cee645passed. It emitted the repository's existing review-only notices for legacy move records and file-budget tightening.pebrel-settingstests: 110 passed.pebrel --test file_line_budget: passed.cargo fmt --all -- --check: passed.cargo check -p pebrel --bin pebrel --features gpui-shell --tests --locked: passed.cargo test --locked -p pebrel --bin pebrel --features gpui-shell side_panelpassed.git diff --check origin/main...HEAD: passed.Regression coverage includes two-stage snapshot publication, preservation and authoritative clearing of ignore marks, the no-
.gitguard, incremental expand/collapse, row-cap truncation, failed host expansion, stale full snapshots, filter changes, path-keyed ignore-only updates, and symlink-aware repository lookup.The full native matrix and release workspace checks were not run locally. Based on
scripts/ci_plan.pyand the changed Rust test source, this PR should schedule native tests on Ubuntu, Windows x64, and Windows ARM; macOS native tests and macOS release workspace checks should be reported as not run for this path set. GitHub Actions remains authoritative for those checks.Required Review
CONTRIBUTING.md,docs/architecture.md, anddocs/project-constraints.md.python3 scripts/check_architecture.py --base <PR-base-commit>passes; budgets were not inflated to fit the change.