claude-memory/graph/decisions/decision-auto-sync-on-dashboard-mount-when-all-entities-stal-346c5a.md
2026-03-01 20:21:02 -06:00

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
sba-scouting
rust
sync
dashboard
decision
auto-sync
0.6 0.8 2026-03-02T02:09:10.166132+00:00 2026-03-02T02:21:01.979645+00:00
target type direction strength edge_id
3a2ec27f-99ac-463f-a451-f99fe8fb1136 RELATED_TO outgoing 0.68 f5e85e8d-acfa-4eda-8ca4-ddd5cd005849
target type direction strength edge_id
39379120-896b-46cd-befa-b83d09d7556b RELATED_TO outgoing 0.73 373fbb71-c49c-4558-8fc2-52eb877e64b0
target type direction strength edge_id
62ee21e8-2b56-4d38-a73d-47e2724f08c6 BUILDS_ON outgoing 0.73 285800e7-a6b0-4cf2-b017-91b209ef61bd
target type direction strength edge_id
77c0b897-4124-432f-84de-700ff82dcde1 RELATED_TO outgoing 0.8 fbf4a323-421b-4964-ba27-bffd66df6d69
target type direction strength edge_id
d75e2afd-8348-4fe6-9ea1-731604505aa6 FOLLOWS incoming 0.8 ec429a7a-f8ec-452e-a8ab-0defc5d5ca9f
target type direction strength edge_id
1d64c80d-61ec-434f-902a-3a511e2b92c2 BUILDS_ON outgoing 0.7 aca4887b-3c88-443d-b7d1-fc137d414832
target type direction strength edge_id
e1fad787-7de7-4f62-afb7-6df2ffdea1ed RELATED_TO outgoing 0.65 bbed0cf1-0bb9-4479-97f5-41b0dc40c63b

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 the SyncStatusesLoaded arm
  • Required adding settings: &Settings parameter to handle_message() to pass to trigger_sync()
  • Standings use a separate standings_cache table 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)