Skip to content

storage-inspector: When parent dir is searched, child files should be open too#8525

Merged
mscolnick merged 2 commits intomainfrom
sham/storage-inspector-ui-updates
Mar 3, 2026
Merged

storage-inspector: When parent dir is searched, child files should be open too#8525
mscolnick merged 2 commits intomainfrom
sham/storage-inspector-ui-updates

Conversation

@Light2Dark
Copy link
Collaborator

@Light2Dark Light2Dark commented Mar 2, 2026

Previously a search would only match exact files, so if a directory matched, children files would not show.

This fixes that
image

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Tests have been added for the changes made.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Pull request title is a good summary of the changes - it will be used in the release notes.

@Light2Dark Light2Dark requested a review from manzt as a code owner March 2, 2026 06:18
@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Mar 2, 2026 4:21pm

Request Review

@Light2Dark Light2Dark added the bug Something isn't working label Mar 2, 2026
manzt
manzt previously approved these changes Mar 2, 2026
Copy link
Collaborator

@manzt manzt left a comment

Choose a reason for hiding this comment

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

Nice, super minor comment/question.

const name = displayName(entry.path);
const hasSearch = !!searchValue.trim();

const selfMatches =
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if instead of threading parentMatched through both components, we could just clear searchValue for children of a matched directory:

const selfMatches =
  isDir && hasSearch && name.toLowerCase().includes(searchValue.trim().toLowerCase());

<StorageEntryChildren
  ...
  searchValue={selfMatches ? "" : searchValue}
/>

Shouldn't filterEntries already return everything when search is empty? Only difference is subdirectories under a matched parent won't auto-expand.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that's a much simpler fix, thank you!

@mscolnick mscolnick merged commit 98e8c02 into main Mar 3, 2026
28 checks passed
@mscolnick mscolnick deleted the sham/storage-inspector-ui-updates branch March 3, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants