utils/sickdays/sickdays/gui
Krzysztof kuhy Rudnicki 7f2443ce48
Some checks failed
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
sickdays pre-commit / pre-commit (push) Has been cancelled
sickdays tests / test (push) Has been cancelled
sickdays.gui: refuse a write while a background sync is in flight
sync() reads the pool, waits on the network, then writes its merged copy
back without a lock. A second write landing inside that window was
silently overwritten. Marking day A and then clearing day B within a
second or two lost the clear, so B stayed a sick day.

Every background sync now holds a module lock, and each write tries it
without blocking. A click that lands mid-sync shows "Syncing -- try again
in a moment." in the panel and calls on_saved with nothing. The phone's
picker avoids the same race by making the grid inert while it syncs.

The red-first test pins the lost write with a sync stub that reads, waits,
then writes back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PAhbNszs5JKdtnD4uBi3xp
2026-10-17 13:51:26 +02:00
..
__init__.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
_calendar.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
_panel.py sickdays.gui: refuse a write while a background sync is in flight 2026-10-17 13:51:26 +02:00
_text.py sickdays.gui: refuse a write while a background sync is in flight 2026-10-17 13:51:26 +02:00
_tokens.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
_widgets.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00
_window.py sickdays 0.3.0: desktop sick-day picker and embeddable KeepPanel 2026-10-17 13:47:26 +02:00