Remember type hierarchy expansion without flashing on return - #1988
Merged
Merged
Conversation
BryonLewis
approved these changes
Sep 25, 2026
BryonLewis
left a comment
Collaborator
There was a problem hiding this comment.
Restructured to move things into their own Types folders because components and utility functions have grown so much
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The annotation type list forgets expanded parents and collapsed branches when the viewer is remounted, and metadata reloads reset it to compact mode. Returning from another page can therefore flash a different hierarchy view.
Persist presentation state per sequence and restore it synchronously before rendering. Metadata hydration no longer resets it. Sidebar and bottom layouts, and cameras of the same sequence, share the preference. Other sequences and group lists retain independent views. A bounded local store remembers the last 100 views; unavailable browser storage falls back to memory.
Category definitions, checked types, confidence thresholds, and annotation timelines are unchanged.
Validation: 60 hierarchy/list/storage tests pass, including immediate first-render assertions after remount, metadata reload, dataset switching, persistence across store recreation, malformed storage, and storage failures. ESLint and TypeScript checks pass.
An Electron rendering check remounted a bottom hierarchy panel, reloaded its metadata, and observed only the saved expanded-parent view while retaining its collapsed branch. The combined viame/main changes passed 298 tests and desktop/web production builds.