Refresh tray immediately on pause/resume and during pause
The in-process SNI tray was frozen once the observer entered a
paused state: the two call sites that previously drove tray
refreshes (post-boundary mode change and end-of-normal-iteration)
are unreachable from the paused branch, so the icon, status
submenu, and pause/resume menu items never reflected the new state.
Add a small Observer._refresh_tray() helper that wraps the
existing try/except + disable pattern, and invoke it from three
new points:
- Observer.pause() — immediate icon/menu flip when a pause is
initiated from the tray.
- Observer.resume() — immediate flip back on manual resume.
- Paused branch of main_loop() — runs once per 5s tick so the
"resume (N minutes remaining)" label counts down live and any
sync-status change during pause is reflected.
The three existing tray-update sites migrate to the same helper
for consistency (no behavior change at those sites).
Not manually smoke-tested on a GNOME Wayland session in this
change — coverage relies on the new pause/resume unit tests and
code review.
Co-Authored-By: Codex <noreply@openai.com>