2.5 KiB
2.5 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 346c5a34-3fed-44ff-832a-b0c9eb42ca88 | decision | Decision: Auto-sync on dashboard mount when all entities stale >24h |
|
0.6 | 0.8 | 2026-03-02T02:09:10.166132+00:00 | 2026-03-02T02:21:01.979645+00:00 |
|
Auto-Sync on Dashboard Mount: Design Decision
Context
sba-scouting Rust TUI — dashboard screen loads sync statuses from the DB on mount.
Decision
After sync statuses load (in SyncStatusesLoaded handler), automatically trigger a full sync if ALL entity types (teams, players, transactions) have last_sync older than 24 hours OR have never been synced.
Rationale
- Avoids stale data on first launch of the day without requiring manual user action
- "All entities" check prevents partial re-sync when only one type is fresh
- Only fires on dashboard mount (when statuses load), not on every navigation to dashboard
Implementation
- Check fires in
DashboardState::handle_message()inside theSyncStatusesLoadedarm - Required adding
settings: &Settingsparameter tohandle_message()to pass totrigger_sync() - Standings use a separate
standings_cachetable with their own refresh mechanism — they do NOT participate in this check
Scope Limits
- Does not affect standings cache
- Does not re-trigger if user navigates away and back (statuses only load once on mount)