Auto-activate annotation groups and files in the full-screen TUI viewer - #222
Open
bobvh wants to merge 2 commits into
Open
Auto-activate annotation groups and files in the full-screen TUI viewer#222bobvh wants to merge 2 commits into
bobvh wants to merge 2 commits into
Conversation
DB-derived annotation groups already auto-activated on load; annotation files required an explicit checkbox toggle every time, unlike the Jupyter and inline widgets where both auto-load. Extract activate_annotation_file, shared by the toggle handlers and a new auto_activate_annotation_files_for_viewport pass that activates every resolvable file, skipping ones that fail to load instead of blocking the rest. Both groups and files clear and re-activate fresh on block group switch. Auto-activation runs after the frame has already drawn, so the checkboxes and canvas from that frame are stale. The render loop then blocked on input for up to an hour before redrawing. Track whether activation did work this iteration and use a zero-length poll wait in that case so the change is visible immediately.
force_reload() always reset list_state and picked the first selectable item, discarding the current selection whenever annotation groups changed (which happens on nearly every block group switch). It now re-finds the row for the newly selected block group instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QzZ6H1MBUhwFzu4mMgkTBZ
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.
Split out of #221. During that demo we also noticed the full-screen TUI viewer required manually toggling on annotation files every time, unlike the Jupyter and inline widgets where groups and files both auto-load.
activate_annotation_filehelper with the checkbox toggle handlers. A file that fails to resolve is skipped instead of blocking the rest.force_reload()was resetting the list selection to the top on every annotation-group change (which happens on nearly every block group switch). It now re-finds the row for the current selection instead.