Repository navigation
fix(neotree): keep large workspaces responsive - #344
Merged
Merged
Conversation
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.
Why
Opening Neo-tree could freeze the editor while Git scanned a large worktree. Directory listing already ran in the background, but
GetGitStatuswaited synchronously for Git before the editor could process input or redraw.Changes
Rretry hint on failure; retain previous decorations but label them stale.CancelGitStatusand the nonselectableSetPanelStatusfooter in host API0.16.0, with documentation and regression coverage.How to Test
Run
cargo build --bin red, thentarget/debug/red --root ../large-repository, substituting an existing large Git worktree.Press
Ctrl-e. While Git is pending, navigate withj/korGand expand a directory. The tree should remain responsive, with Git decorations arriving separately.Press
Rduring a scan, thenqandCtrl-e. Closing should respond immediately, and reopening should not apply results from the cancelled request.Run the deterministic timeout, stale-status, and cancellation regressions:
cargo test --lib -- \ git_status_timeout_and_cancellation_stop_the_child \ neotree_coalesces_refreshes_and_preserves_stale_status_on_error \ neotree_discards_late_results_after_close_and_reopenThese should confirm that the child exits on timeout/cancellation, failed refreshes retain stale decorations and allow retry, and late results cannot repaint a reopened panel.
Validation
76c7e1c9, covering Neo-tree, Git status, directory listings, panel rendering/navigation, and host API contracts.cargo clippy --all-targets --all-features -- -D warnings, formatting, and diff checks passed.