Reference in New Issue
Block a user
Delete Branch "fix/78-79-update-visibility"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #78
Closes #79
Field report: running v1.2 against a repo with v1.3.0 published gave no prompt, and there appeared to be no way to check manually.
The checker itself is fine — I hit the releases API live and it correctly returns
v1.3.0and reports 1.2.0 as outdated. It was invisible, for two independent reasons. (A third cause was specific to that build: v1.2.0 stampedupdate/lastCheckbefore running the check, so a single failed check suppressed retries for 24h. That's #37, already fixed in v1.2.1.)#78 — the notice was written somewhere that doesn't survive a click
21 other call sites rewrite that same label. The check runs off-thread and lands a second or two after launch — precisely when the user starts interacting — so the next selection, save, or refresh wiped it.
This is the same bug fixed for the MSIX warning in #35, which got a persistent banner. That fix was never carried across to the update notice, which has the identical lifetime problem.
Fix:
NoticeBanner— a persistent, dismissible notice that carries its own action button ("Open releases page"). Built as a shared widget rather than a second bespoke banner, so the next thing needing attention doesn't reach for the status bar again.#79 — and you couldn't go looking for it either
The only "Check for updates" affordance was a button inside the About dialog. Reaching it required knowing to open About first.
Compounding that: the About action was created without a menu role. Qt auto-assigns
AboutRoleto actions whose text begins with "About", which relocates it into the application menu on macOS. So the notice's own hint — "Help ▸ About to view it" — pointed at a menu that on macOS doesn't contain the item. Nothing at the call site hints this happens.Fix: Help gets its own "Check for updates…" with an explicit
ApplicationSpecificRole, and the About action now states itsAboutRolerather than inheriting it invisibly. The menu-driven check is never throttled and always reports back — the user asked, so silence would read as a broken button.Where the logic lives
core.update_notice(current, release)owns both the should-we-notify decision and the wording. CI installs onlypytest+cryptography— no PySide6 — so anything inbcc.pyis untestable by construction, and putting this in the GUI would have meant shipping it uncovered.One test asserts the notice text names no menu path at all. That's the thing that went stale here, so it's worth a guard rather than a comment.
Tests
366 passed, 1 skipped (+8). Ruff clean.
Newer/current/older releases; failed checks (
None) and malformed payloads ({}, empty/None/non-string version, a list) all staying silent rather than producing a notice pointing at nothing; URL fallback;v-prefix handling.Also fixed while writing the tests: the text read "Version v1.3.0 is available. You're running 1.2.0" — tags carry a
v,__version__doesn't. Both render bare now; the machine-readableversionfield keeps the real tag.Not done here
The MSIX banner still uses its own
QLabel. Migrating it ontoNoticeBanneris the right end state — two mechanisms is the drift that caused this — but I didn't want to bundle a refactor of working, shipped behaviour into a bug fix I can't visually verify. Worth a follow-up issue.Verification limits
No visual confirmation — PySide6 needs
libEGL.so.1to render even offscreen and I don't have root in this sandbox. The core logic is covered by tests; the banner's appearance and the macOS menu placement need a human. The macOS menu behaviour is the part I'd most want checked, since that's a platform behaviour I'm reasoning about rather than observing.Merge order
Touches
_build_menu_bar, which #80 (theming) also touches — #80 adds a View menu just above the Help menu. Small, adjacent-lines conflict if both land; whichever goes second takes both hunks.Three conflicts, two of them semantic rather than textual: - bcc.py QSS: this branch added the noticeBanner rules using the old module-level constants ({MUTED}, {ACCENT}); main had since moved the stylesheet onto palette slots ({p.muted}). Took main's form and translated the notice rules into it -- picking either side wholesale would have either dropped the banner styling or reintroduced globals that test_stylesheet_builder_has_no_hardcoded_colours now forbids. - bcc.py methods: both sides appended to MainWindow (update-notice handlers vs theme handlers). Additive, kept both. - tests/test_core.py: the usual EOF append. Kept both blocks. _build_menu_bar auto-merged cleanly (View menu above, Help menu below); verified both are present with their menu roles intact. Verified: 272 test functions = 265 (main) + 7 (this branch), no duplicates; 421 passed, ruff clean.