Commit 7c19d2c
fix: prevent empty screen flash when team data temporarily unavailable
When agents.json is being rewritten by the daemon, getTeamData() returns
null and getAllData() was returning empty arrays. This payload would get
broadcast to all WebSocket clients, wiping their UI with a blank screen.
Now getAllData() returns null when team data is unavailable, and
broadcastData() skips the broadcast entirely—preserving the last valid
payload on clients. Initial WebSocket connects still send a fallback
empty structure so new clients render immediately.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 74b2c51 commit 7c19d2c
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1989 | 1989 | | |
1990 | 1990 | | |
1991 | 1991 | | |
1992 | | - | |
| 1992 | + | |
1993 | 1993 | | |
1994 | 1994 | | |
1995 | 1995 | | |
| |||
2297 | 2297 | | |
2298 | 2298 | | |
2299 | 2299 | | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
2300 | 2308 | | |
2301 | 2309 | | |
2302 | 2310 | | |
| |||
2449 | 2457 | | |
2450 | 2458 | | |
2451 | 2459 | | |
2452 | | - | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
2453 | 2465 | | |
2454 | 2466 | | |
2455 | 2467 | | |
| |||
0 commit comments