Skip to content

Fix#7364 file explorer refresh collapsing tree and add scoped folder refresh#7426

Merged
mattcasters merged 1 commit into
apache:mainfrom
leehaut:hotfix/lance-common-86
Jul 4, 2026
Merged

Fix#7364 file explorer refresh collapsing tree and add scoped folder refresh#7426
mattcasters merged 1 commit into
apache:mainfrom
leehaut:hotfix/lance-common-86

Conversation

@leehaut

@leehaut leehaut commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Fix #7364

Improves the Hop GUI file explorer refresh behaviour so that refreshing no longer collapses the entire tree, and fixes several related edge cases around deletion and project switching.

  • Scoped refresh: When the user has selected a folder (or a file inside a folder), F5 / the refresh toolbar action refreshes only that folder via refreshFolder(), preserving expanded state elsewhere in the tree. If nothing has been selected, behaviour falls back to a full tree rebuild.
  • Smarter expand-state restore: Replaces TreeMemory.setExpandedFromMemory() with restoreTreeItemExpandedFromMemory(), which loads lazy-loaded folders before expanding them. This prevents blank placeholder rows after refresh.
  • Delete handling: After deleting a file or folder, the parent folder is refreshed in place, lastSelectedFolderPath is updated to the parent, and stale tree nodes are removed.
  • Project switching: When the explorer root changes (e.g. switching projects), lastSelectedFolderPath and per-tree TreeMemory state are cleared, and scoped refresh is only allowed for paths under the current project root.

@mattcasters

Copy link
Copy Markdown
Contributor

Real smooth @leehaut! Nice!

@mattcasters mattcasters merged commit e513514 into apache:main Jul 4, 2026
3 checks passed
@leehaut

leehaut commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Real smooth @leehaut! Nice!

Thanks! Appreciate it! 😊

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Folder level refresh in file explorer tab/panel

2 participants