Skip to content

Parent folder checkbox not auto-checked when all children are marked as viewed #8584

Closed

Description

@Eiji-Kudo

Description

After the change in #8527 (manageCheckboxStateManually: true), when all child files in a folder are individually marked as viewed, the parent folder's checkbox does not automatically become checked.

Steps to reproduce

  1. Open a PR with files nested in folders (e.g., src/ containing multiple files)
  2. Check each child file individually as "viewed"
  3. Once all children are checked, observe that the parent folder checkbox remains unchecked

Expected behavior

Parent folder checkbox becomes checked when all children are checked (as it did before #8527).

Actual behavior

Parent folder checkbox stays unchecked despite all children being checked.

Environment

  • VS Code: 1.111.0
  • Extension: v0.132.0
  • OS: macOS 15.6

Analysis

The code in DirectoryTreeNode.getTreeItem() correctly computes the parent state via allChildrenViewed(), and refresh() is called on the topmost directory after checkbox changes. However, it seems that with manageCheckboxStateManually: true, the checkbox state update via refresh() → getTreeItem() may not be reflected in the UI by VS Code.

This may be a VS Code TreeView API limitation where checkboxState changes returned from getTreeItem() during a refresh() are not applied when manageCheckboxStateManually: true.

Activity

  1. nvt261991-sys commented on Mar 18, 2026

    @nvt261991-sys
  2. tgrandgent commented on Mar 20, 2026

    @tgrandgent

    This is a significant productivity drain when reviewing large PRs with many changed files. I hope it will be fixed ASAP.

  3. added this to the 1.114.0 milestone on Mar 24, 2026
  4. alexr00 commented on Apr 1, 2026

    @alexr00
    Member

    I'm having trouble reproducing this. Do you have a specific public PR it happens with that I could check?

  5. goncalo-fabric commented on May 4, 2026

    @goncalo-fabric

    This issue is still happening to me.

    VS Code info

    Version: 1.118.1
    Commit: 034f571df509819cc10b0c8129f66ef77a542f0e
    Date: 2026-04-29T17:36:44+03:00
    Electron: 39.8.8
    ElectronBuildId: 13870025
    Chromium: 142.0.7444.265
    Node.js: 22.22.1
    V8: 14.2.231.22-electron.0
    OS: Darwin arm64 25.4.0
    

    Extension info

    Version
    0.140.0
    Last Updated
    6 days ago
    

    Example 👇 The "filters" parent folder should be checked automatically.

    Image
  6. Eiji-Kudo commented on May 6, 2026

    @Eiji-Kudo
    ContributorAuthor

    Alex Ross (@alexr00) Thank you so much for working on this!

    On my side the parent folder checkbox auto-check still wasn't working even on the latest 0.142.0.

    Applying #8679 on top of main fixed it for me. Short video of it working with the patch:

    Screen.Recording.2026-05-06.at.19.29.55.mov

    I also left a confirmation comment on the PR: #8679 (comment)

    Would really appreciate if #8679 could be reviewed and merged.

  7. alexr00 commented on May 6, 2026

    @alexr00
    Member

    Eiji (@Eiji-Kudo) thank you for testing it and thanks for the nudges. I will merge the PR.

  8. goncalo-fabric commented on May 12, 2026

    @goncalo-fabric

    I still have the error.

    If I click the "Refresh" button, it automatically checks the parent, though.

    Installation
    Identifier: github.vscode-pull-request-github
    Version: 0.142.0
    Last Updated: 6 days ago
    
    Version: 1.119.0
    Commit: 8b640eef5a6c6089c029249d48efa5c99adf7d51
    Date: 2026-05-05T11:23:50-07:00
    Electron: 39.8.8
    ElectronBuildId: 13870025
    Chromium: 142.0.7444.265
    Node.js: 22.22.1
    V8: 14.2.231.22-electron.0
    OS: Darwin arm64 25.4.0
    
    Image

    --

    BTW, if I use this button to mark a file as viewed, the parent folder is automatically checked

    Image
  9. alexr00 commented on May 12, 2026

    @alexr00
    Member

    The new fix is not yet in the stable release. It should be available in the next day.

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions