Fix parent folder checkbox not auto-checked when all children are marked as viewed#8615
Draft
Fix parent folder checkbox not auto-checked when all children are marked as viewed#8615
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/0fafc95a-8baa-49ec-8f27-602e4bcf370a
…ked as viewed Eagerly update ancestor directory checkbox states in processCheckboxUpdates before refresh, rather than relying solely on getTreeItem() which may not apply checkboxState changes with manageCheckboxStateManually: true. Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/0fafc95a-8baa-49ec-8f27-602e4bcf370a
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/0fafc95a-8baa-49ec-8f27-602e4bcf370a
Copilot
AI
changed the title
[WIP] Fix parent folder checkbox not auto-checked when all children are viewed
Fix parent folder checkbox not auto-checked when all children are marked as viewed
Mar 25, 2026
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.
With
manageCheckboxStateManually: true(added in #8527), VS Code doesn't applycheckboxStatechanges returned fromgetTreeItem()duringrefresh(). Directory checkbox states were only computed lazily ingetTreeItem(), so parent folders never visually updated when all children were individually checked.Changes
DirectoryTreeNode: MadesetCheckboxStatepublic, addedupdateCheckboxFromChildren()to eagerly recompute state from childrentreeUtils.ts: After updating file node states inprocessCheckboxUpdates, walk up from each affected node and eagerly set ancestor directory checkbox states before firing the tree refreshallChildrenViewed()andupdateCheckboxFromChildren()covering flat, nested, mixed, and state-transition scenarios📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.