Commit b735a89
authored
fix(masthead): restart_needed means a restart HELPS — behind boards get their own cue (#1722)
The filing guessed at "an mtime-vs-process-start comparison that trips on file
touches that aren't builds". There is no such comparison. The flag was one
expression:
"restart_needed": bool(server.get("stale")) or bool(behind)
Observed state had server_stale false, so `behind` was the trigger — a logical
certainty from the code, not an inference: nothing else writes this flag.
Two conditions were sharing one flag and one sentence, and they have DIFFERENT
REMEDIES. A stale server is fixed by restarting the Monitor. A board on older
firmware is fixed by FLASHING THE BOARD — restarting does nothing for it. The
operator was told to do something that cannot work.
The sharper half: the masthead ALREADY has the correct cue for behind boards —
N boards on older fw (latest X) [tooltip: device @ fw, ...]
— and it sits in an `else if` AFTER restart_needed. So while `behind` fed that
flag, the accurate message was UNREACHABLE. Every behind board rendered "newer
build - restart the Monitor" instead. The right words were written, shipped, and
could never appear.
Fix: restart_needed = server_stale. `behind` is untouched and still published in
the firmware block; it simply no longer claims a restart is the answer, which
lets the correct cue render for the first time.
The tooltip loses "or a board is behind" — that clause was the conflation stated
out loud — and now says restarting does not reflash a board.
One test asserted `restart_needed is True` for a behind board. That was the
defect written down as an expectation, so it is amended rather than deleted, with
the reason in place: a reader hitting that diff should see a corrected model, not
a fixture tweak.
Deliberately NOT changed: when the server is stale AND boards are behind, the
restart cue still wins the `else if`. That precedence predates this and showing
both is a masthead-density question, not an honesty one — the remaining cue is
true in that state.
AC1's intent is pinned by a test asserting restart_needed tracks server_stale
exactly, so a third condition cannot be folded in later without bringing its own
cue and its own remedy.
Refs #1712
Lane: DX1 parent 8055bb9 commit b735a89
3 files changed
Lines changed: 89 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
381 | 392 | | |
382 | 393 | | |
383 | 394 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
1003 | | - | |
| 1003 | + | |
1004 | 1004 | | |
1005 | 1005 | | |
1006 | 1006 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
0 commit comments