Clear every read-only marker when the store becomes writable again

"Erneut prüfen" refreshed the banner but left the window title and the status bar
reading "NUR LESEN" -- both were built once and never updated -- while the banner
itself asked for a restart that the recheck exists to avoid.

Title, status bar and banner are refreshed from one place now, so none of them can
be left behind, and the main window owns the title instead of app.py setting it
once at startup. The banner points at "Erneut prüfen" and says outright that no
restart is needed. Since the startup pass was skipped, its task list is empty
rather than current, so a successful recheck offers the housekeeper run that
fills it.

UI tests cover both directions of the recheck; their Tk root moved into a shared
conftest fixture, because a second root in another module invalidates the icon
images bound to the first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Marcel Peterkau
2026-08-29 00:01:37 +02:00
co-authored by Claude Opus 5
parent ae53c168fd
commit 528c24ad42
6 changed files with 164 additions and 43 deletions
+20
View File
@@ -0,0 +1,20 @@
import pytest
@pytest.fixture(scope="session")
def tk_root():
"""One Tk root for the whole test session, shared by every UI test module: the
icon library binds its images to the first root, so a second one (or a root torn
down between tests) invalidates them with 'image "pyimage1" doesn\'t exist'.
Skips where there is no display, which keeps the suite running on headless CI."""
tk = pytest.importorskip("tkinter")
from ccma.ui.theme import load_theme
try:
root = tk.Tk()
except tk.TclError as exc:
pytest.skip(f"kein Display verfügbar: {exc}")
root.withdraw()
load_theme(root, "dark")
yield root
root.destroy()