Skip to content

fix(notifications): clean up NotificationPage and keep the info panel in sync with selection - #334

Open
gmmcosta15 wants to merge 7 commits into
feature/notification-unread-dotfrom
refactor/notification-page-cleanup
Open

fix(notifications): clean up NotificationPage and keep the info panel in sync with selection#334
gmmcosta15 wants to merge 7 commits into
feature/notification-unread-dotfrom
refactor/notification-page-cleanup

Conversation

@gmmcosta15

Copy link
Copy Markdown
Collaborator

Description

Select the type:

  • Feature
  • Bug fix
  • Code refactor
  • Documentation

Cleans up NotificationPage and fixes several cases where the info panel (Type/Time) fell out of sync with what's actually selected in the list.

  • Renamed leftover update_* widget/method names to notification_*.
  • Dropped the dead on_update_message signal and unused cli_tracking deque.
  • Notifications now insert newest-first (top of list) instead of appending at the bottom.
  • Fixed EntryDelegate.prev_index drift: since new notifications now prepend instead of append, every existing row shifts down on insert, prev_index (used to know which row's highlight to clear) is now kept valid via a rowsInserted handler.
  • The topmost notification is now auto-selected (info panel populated) on panel open and whenever a new notification arrives.Previously the user had to click it once before its data would show.
  • Fixed the expand/collapse arrow: clicking it only toggled the row's expanded state and returned early, so it never called item_selected.
  • Fixed duplicate-message collapsing (refresh_last_if_duplicate): the cached timestamp bumped correctly, but if that item was currently shown in the info panel, its Time label stayed frozen at the first occurrence. It's now refreshed too.
  • Fixed "Delete all" / "Delete" leaving stale info-panel state: Type/Time kept showing the last-viewed (now-deleted) notification and the Delete button stayed enabled pointing at nothing. Deleting now re-selects the new top item, or resets the info box if the list is empty.
  • Fixed EntryListModel.setData(ExpandRole) never returning True, violating Qt's setData contract.
  • Increased spacing between the left icon and text for all list-based pages (universal constant in the shared delegate — wifi/network, files, spoolman, filament, notifications).

Motivation

NotificationPage still carried dead code and naming from when it was the Update page. While reordering to newest-first, several latent bugs in the shared list delegate's click/selection handling surfaced (or became user-visible for the first time, since the newest/topmost item is now the first thing a user sees and clicks).

Tests

  • tests/util/test_notification_page_unit.py updated for the renamed widgets, all 4 tests pass.

@gmmcosta15 gmmcosta15 added the enhancement New feature or request. label Sep 9, 2026
@gmmcosta15 gmmcosta15 self-assigned this Sep 9, 2026
@gmmcosta15
gmmcosta15 added this pull request to stack #335 September 9, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant