Skip to content

Persist expanded projects in the project tree view - #2082

Open
simon0356 wants to merge 1 commit into
DependencyTrack:mainfrom
simon0356:persist-project-tree-expansion
Open

simon0356 wants to merge 1 commit into
DependencyTrack:mainfrom
simon0356:persist-project-tree-expansion

Conversation

@simon0356

@simon0356 simon0356 commented Nov 9, 2026 •

Copy link
Copy Markdown

Description

Remember which projects are expanded in the project list tree view, so the hierarchy is restored when coming back to the list instead of always starting fully collapsed.

Addressed Issue

Closes DependencyTrack/dependency-track#XXXX

Additional Details

  • The UUIDs of expanded projects are stored in localStorage under ProjectListExpandedProjects, alongside the existing project list preferences (page size, sorting, flat view, inactive projects).
  • When the tree is rendered, stored projects are expanded again. Their children are fetched on demand through the existing getChildren path, so the expansion cascades down the hierarchy as child rows are appended.
  • Collapsing a project removes it from the stored set. Projects that no longer have children are pruned.
  • Flat view and search behavior are unchanged.

Checklist

The project tree view always started fully collapsed, so users with a
deep project hierarchy had to re-expand the same parents on every visit
to the project list.

Store the UUIDs of expanded projects in localStorage, alongside the
other project list preferences (page size, sorting, flat view), and
restore them when the list is rendered. Children of restored projects
are fetched on demand, so expansion cascades down the hierarchy.
Collapsing a project removes it from the stored set, and projects that
no longer have children are pruned.

Signed-off-by: stropee <[email protected]>
@simon0356 simon0356 closed this Nov 9, 2026
@simon0356

Copy link
Copy Markdown
Author

I will create a enhancement request first.

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.

1 participant