Skip to content

Remember type hierarchy expansion without flashing on return - #1988

Merged
BryonLewis merged 4 commits into
mainfrom
fix/remember-type-hierarchy-view
Sep 25, 2026
Merged

BryonLewis merged 4 commits into
mainfrom
fix/remember-type-hierarchy-view

Conversation

@mattdawkins

@mattdawkins mattdawkins commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

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.

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Restructured to move things into their own Types folders because components and utility functions have grown so much

@BryonLewis
BryonLewis merged commit 5d5ba1a into main Sep 25, 2026
3 checks passed
@BryonLewis
BryonLewis deleted the fix/remember-type-hierarchy-view branch September 25, 2026 19:27
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.

2 participants