Re-scope the open activity log when the active list changes - #49
Merged
Conversation
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.
Summary
LogbookController.base_optioncloses its entity set over at build time; nothing told it to rebuild whencurrent_list_namechanged underneath it.Changes
LogbookController.rebuild_options(new): swaps an open session's scope options and re-applies the active one, keeping the paged window/maximized state — a scope change in place, not a reopen.HACLI._table_log_options/refresh_table_log_scope(new): builds freshlist/list_devices/cursor/cursor_deviceoptions from whatever the table currently shows; no-ops for a graph/i-scoped session, whose entity set is a deliberate snapshot.refresh_table_log_scope()intoListController.select_or_create,rename_list, the delete/set_defaultpopup actions,apply_membership(guarded to the active list), and leaving a list via Escape.Test plan
tests/unit/test_logbook_controller.py—rebuild_optionsre-applies the active option, preserves paging/maximized state, skips afollows_cursoroption, no-ops with no sessiontests/test_activity_log.py— switching lists re-scopes an openlist/list_deviceslog, View All / leaving a list retitles it, switching into an empty list closes it, ani-opened log is untouched, toggling membership of the active list refreshes itpytest(full suite, 1317 tests) passesruff check ./pyrightclean