Skip to content

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

Open
leehaut wants to merge 1 commit into
apache:mainfrom
leehaut:hotfix/lance-common-86
Open

Fix#7364 file explorer refresh collapsing tree and add scoped folder refresh#7426
leehaut wants to merge 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.

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

1 participant