Whole-feature review (26dff62..302f7c3) surfaced eight findings; fix the
two Important and three Minor here. #6/#7/#8 deferred (see commit body).
#1 (Important) Popup went stale-until-reopen after any interaction.
PopoutHost NotificationGroup.state is a binding over stateJson(); the
mutators (runAction/toggleGroup/toggleDnd/clearAll) imperatively
reassigned it, which destroys the binding in QML, so externally-arriving
notifications stopped appearing in the open popup. Mutators now call the
service for side-effects only and discard the return; stateJson() reads
reactive props so the binding re-evaluates on its own.
#2 (Important) nativeNotifications grew unbounded for the process life.
closeNotification now deletes its map entry (groups() skips closed rows
before liveRow(), so no stale read), and discardAllNotifications clears
the whole map. Verified: trackedNativeCount tracks the active set (3->3)
and drops to 0 on Clear all.
#3 (Minor) Full-mode card column reserved 92px of non-column width but
the Row consumes 102 (two 10px spacings, not one), overrunning the x by
10px. Fix the constant: -46 -> -56.
#4 (Minor) discardAllNotifications now also clears the toast stores, so a
sticky critical toast doesn't linger after "Clear all".
#5 (Minor) acceptNativeNotification only retains the native object when
history or a toast will reference it; a DND-suppressed transient
references neither and previously leaked an entry forever.
Deferred (review: "can follow"): #6 toast Timers restart on list rebuild
under a notification stream (UX quirk); #7 read is never set (mark-read
on open is a feature add); #8 relTime is not re-evaluated on a timer.
Verified: notificationsSelfTest green, journal warning-clean through a
mutator + normal/critical notifications with the popup open.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9090// size off the card's own (externally-set) width, NOT parent.width:// size off the card's own (externally-set) width, NOT parent.width:
9191// cardBody is a Row whose width derives from content, so reading it// cardBody is a Row whose width derives from content, so reading it
9292// here collapses the column to 0 (a binding loop). 22 = left+right margins.// here collapses the column to 0 (a binding loop). 22 = left+right margins.