Skip to content

Refresh updates after broad Preferences changes - #1110

Closed
rafaumeu wants to merge 1 commit into
linuxmint:masterfrom
rafaumeu:fix/preferences-broad-dirty-refresh
Closed

rafaumeu wants to merge 1 commit into
linuxmint:masterfrom
rafaumeu:fix/preferences-broad-dirty-refresh

Conversation

@rafaumeu

Copy link
Copy Markdown

Fixes #603

Replacement for the closed #1105, revised per maintainer feedback:

  • Mark the Preferences session dirty for any GSettings mutation, not only blacklist edits.
  • Also mark a successful automation touchfile transition dirty.
  • Refresh only when closing a dirty Preferences session; keep application-restart precedence.

Verification:

  • test_preferences_dirty_state.py: broad signal, no-op close, destroy disconnect, restart precedence, automation transition.
  • Independent QA: 14/14 AST/contract checks; py_compile; git diff --check.

AI-assisted contribution; author reviewed and verified all changes.

Replace the unconditional refresh(False) after closing Preferences
with a broad effective-dirty check, per maintainer feedback on linuxmint#1105
('overly broad than explicitly narrow').

- PreferencesWindow marks its session dirty on any GSettings 'changed'
  signal during the window lifetime (handler connected at init and
  disconnected on destroy), and on a successful automatic-upgrade
  touchfile state transition.
- No-op open/close (no effective mutation) no longer refreshes.
- Restart precedence preserved: app_restart_required still restarts
  without a preliminary refresh.
- Export blacklist and failed/reverted automation changes stay clean.

Hermetic characterization harness: test_preferences_dirty_state.py.
Closes rationale for linuxmint#603; supersedes closed PR linuxmint#1105 scope.
@mtwebster

Copy link
Copy Markdown
Member

My feedback was meant to indicate this is not necessary at all, not that I wanted it changed or improved. This is overkill.

@mtwebster mtwebster closed this Oct 30, 2026
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.

Don't refresh mintupdate if the Preferences weren't changed

2 participants