Commit fef3a86
committed
Fix Mac offline UI consistency: red dot, correct status line, forceFetchAll on Try Again
MacControlCard: Add isOffline parameter (computed from >10 min staleness,
same threshold as MacReachabilityBanner). When offline:
- Status dot turns red instead of gray
- Status line shows 'Mac unreachable, commands will apply on reconnect'
instead of the stale 'Idle, sleeps when agents finish' message
MacReachabilityBanner: 'Try again' now calls forceFetchAll() when the Mac
is in .offline state. Incremental fetchChanges() is useless here because
the stale heartbeat was already seen by the sync engine; forceFetchAll()
wipes the token and does a full re-fetch so the Mac's record is returned
even if it has not changed since the last successful sync.
HomeView: Pull-to-refresh also uses forceFetchAll() so a user manually
refreshing the home screen when the Mac is unreachable gets a real re-fetch.
SettingsView: Rename 'Last sync' to 'iCloud sync' in the About section
to clearly distinguish it from 'Last seen' (Mac heartbeat age) in the
Connection section. 'iCloud sync: 51s' next to 'Last seen: 10 min' was
misleading -- it looked like everything was fine.
DemoView: Pass isOffline: false to MacControlCard (demo is always reachable).1 parent 8630793 commit fef3a86
5 files changed
Lines changed: 24 additions & 4 deletions
File tree
- DoomCoderCompanion/DoomCoderCompanion/UI
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
198 | 206 | | |
199 | 207 | | |
200 | 208 | | |
| 209 | + | |
201 | 210 | | |
202 | 211 | | |
203 | 212 | | |
204 | 213 | | |
| 214 | + | |
205 | 215 | | |
206 | 216 | | |
207 | 217 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
107 | 116 | | |
108 | 117 | | |
109 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
0 commit comments