Skip to content

Conversation

@Anoop-2024si96509
Copy link
Contributor

Resolved / Related Issues

Steps used to test these changes

  1. Tested if Details pane now shows accurate item counts matching the file list view based on user preferences like:
    i)Show\Hide Hidden files & folders
    ii)Show\Hide protected system files & folder
    iii)Every possible combination of above 2 cases.
image

@yaira2 yaira2 changed the title Fix: Fixed an issue where Details pane items count isn't always correct Fix: Fixed an issue where the items count was sometimes incorrect in the Details Pane Jan 6, 2026
@yaira2
Copy link
Member

yaira2 commented Jan 6, 2026

@Anoop-2024si96509 the commit history seems to be a bit messed up. Can you try rebasing from main (please let me know if you want any help with this)?

@yaira2 yaira2 added the ready for review Pull requests that are ready for review label Jan 6, 2026
@Anoop-2024si96509
Copy link
Contributor Author

Anoop-2024si96509 commented Jan 6, 2026

@Anoop-2024si96509 the commit history seems to be a bit messed up. Can you try rebasing from main (please let me know if you want any help with this)?

@Anoop-2024si96509 the commit history seems to be a bit messed up. Can you try rebasing from main (please let me know if you want any help with this)?

@yaira2 okey. Yes I need few inputs from you.

My plan is to create a new clean branch from main and cherry-pick my commit. So here should I create a new PR or Change the PR to point to the new branch ?

@yaira2
Copy link
Member

yaira2 commented Jan 6, 2026

I suggest keeping the PR and just changing the branch.

@Anoop-2024si96509

This comment was marked as outdated.

@Anoop-2024si96509

This comment was marked as outdated.

@0x5bfa

This comment was marked as outdated.

@Anoop-2024si96509

This comment was marked as outdated.

@0x5bfa

This comment was marked as outdated.

@yaira2
Copy link
Member

yaira2 commented Jan 6, 2026

@Anoop-2024si96509 I updated the branch from main. Please confirm that everything is good and then sync your local branch with the remote to make sure it's up to date. I'll go ahead and mark the earlier comments as outdated.

@yaira2 yaira2 force-pushed the Files_BugFixBranch branch from f268e1e to 1199d53 Compare January 6, 2026 04:14
@Anoop-2024si96509
Copy link
Contributor Author

Anoop-2024si96509 commented Jan 6, 2026

@Anoop-2024si96509 I updated the branch from main. Please confirm that everything is good and then sync your local branch with the remote to make sure it's up to date. I'll go ahead and mark the earlier comments as outdated.

Thanks @yaira2 All good, and my branch is now up to date., Kindly review my commit made to the file:
src/Files.App/ViewModels/UserControls/Previews/FolderPreviewViewModel.cs

var items = await Folder.GetItemsAsync();

// Get actual item count including hidden items based on user settings.
int itemCount = await Task.Run(() => CountItemsInFolder(Item.ItemPath));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is adding this method necessary? In theory, we should be able to use the same code that we do in the status bar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaira2 This is addressed now: (bd9a916)

@mdtauk
Copy link
Contributor

mdtauk commented Jan 7, 2026

Just so I am clear, the Details Pane will always show the total file and folder count, even with a filtered view right?

Where as the status bar can show a count for the current view, be it filtered or not filtered?

Hidden files exist, even if not viewed. And files not included in the filter still exist in the folder and it's folder size calculations?

@Anoop-2024si96509
Copy link
Contributor Author

the Details Pane will always show the total file and folder count, even with a filtered view right?

Both the Details pane and the Status pane respect the filter settings and display the count according to how many files are viewable to the user.

1. Show Hidden files filter enabled:
image
image

1. Show Hidden file filter disabled:
image
image

@mdtauk
Copy link
Contributor

mdtauk commented Jan 7, 2026

the Details Pane will always show the total file and folder count, even with a filtered view right?

Both the Details pane and the Status pane respect the filter settings and display the count according to how many files are viewable to the user.

I am not sure I agree with that, as the Details pane should be a source of truth, and just because you are filtering the view, does not mean the folder's contents have changed.

@Anoop-2024si96509
Copy link
Contributor Author

the Details Pane will always show the total file and folder count, even with a filtered view right?

Both the Details pane and the Status pane respect the filter settings and display the count according to how many files are viewable to the user.

I am not sure I agree with that, as the Details pane should be a source of truth, and just because you are filtering the view, does not mean the folder's contents have changed.

In my opinion, the Details Pane data should reflect what the user actually sees. This behavior is consistent with Microsoft Windows Explorer.

@yaira2
Copy link
Member

yaira2 commented Jan 7, 2026

Just so I am clear, the Details Pane will always show the total file and folder count, even with a filtered view right?

@mdtauk after this PR, yes.

Where as the status bar can show a count for the current view, be it filtered or not filtered?

Please see #17289.

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

Labels

ready for review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Details pane folder count isn't always correct

4 participants