Skip to content

fix(desktop): nested hidden files not showing when toggle enabled#1230

Merged
Kitenite merged 4 commits into
mainfrom
fix/nested-hidden-files
Feb 5, 2026
Merged

fix(desktop): nested hidden files not showing when toggle enabled#1230
Kitenite merged 4 commits into
mainfrom
fix/nested-hidden-files

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 5, 2026

Summary

  • Invalidate all expanded directory nodes (not just root) when toggling "show hidden files", because invalidateChildrenIds doesn't cascade to child nodes
  • Nested hidden files inside already-expanded directories now correctly appear/disappear when the toggle is changed

Based on the original work by @de1mat in #1220.

Closes #1193

Test plan

  • Expand a directory containing hidden subdirectories
  • Toggle "show hidden files" on — verify hidden files appear at all levels, not just root
  • Toggle off — verify they disappear again
  • Toggle while no directories are expanded — verify root-level hidden files still toggle correctly

de1mat and others added 4 commits February 5, 2026 16:09
- Update ref synchronously before invalidation so getChildren uses
  correct includeHidden value
- Invalidate all expanded directories on toggle, not just root,
  so nested hidden files appear when setting is enabled

Closes #1193
# Conflicts:
#	apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/FilesView.tsx
invalidateChildrenIds doesn't cascade, so toggling hidden files
must invalidate every expanded directory node, not just root,
for nested hidden files to appear.

Closes #1193
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

This change addresses a bug where nested hidden files and folders were not displaying when the "Show Hidden Files" toggle was enabled. The fix implements full tree invalidation cascading through all directory items instead of partial invalidation, ensuring hidden content at any nesting level appears correctly.

Changes

Cohort / File(s) Summary
Hidden Files Tree Invalidation
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/FilesView.tsx
Enhanced toggle hidden files flow to force full tree invalidation by explicitly invalidating root children and iterating through all directory items to invalidate their child ids. Added clarifying comment about ref usage to prevent stale closures in dataLoader callbacks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Nested folders hid so deep,
Even when toggle said "peek"!
Now cascading invalidates with care,
Hidden treasures everywhere!

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main fix: making nested hidden files appear when the toggle is enabled.
Linked Issues check ✅ Passed The PR successfully addresses issue #1193 by invalidating all expanded directory nodes when toggling hidden files, ensuring nested hidden files appear at all levels.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the nested hidden files toggle issue; no unrelated or out-of-scope modifications detected.
Description check ✅ Passed The pull request description provides a clear summary, related issue (closes #1193), detailed test plan, and acknowledges prior work, following the template structure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/nested-hidden-files

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Kitenite
Copy link
Copy Markdown
Collaborator Author

Kitenite commented Feb 5, 2026

Duplicate of #1220

@Kitenite Kitenite marked this as a duplicate of #1220 Feb 5, 2026
@Kitenite Kitenite closed this Feb 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 5, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

@Kitenite Kitenite reopened this Feb 5, 2026
@Kitenite Kitenite merged commit a79d57d into main Feb 5, 2026
6 checks passed
@Kitenite Kitenite deleted the fix/nested-hidden-files branch February 5, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] nested hidden folders do not show even when "Show Hidden Files" is enabled

2 participants