Commit dcbe264
Web UI: skip status re-render when nothing the UI shows changed (#41)
The backend pushes a status SSE event on every platform state change, and
the client re-ran setConnectionState + renderEmptyState + chat-header
chrome on each one. A flapping bridge — e.g. a signal-cli crash loop that
tears down and reconnects every few seconds — turned that into a constant
banner/header rebuild that visibly flickered the whole app (reported live:
"flickering every few seconds, unusable", traced to signal-cli 0.14.1
NPE-ing on an unparseable envelope and the bridge flapping connected).
applyAppStatus now renders only when a signature of the *visible* state
changes. The signature keys secondary platforms off whether they're PAIRED
(what the banner/empty-state actually use), not their live connected flag,
so a Signal/WhatsApp connect↔disconnect flap with the Platforms dialog
closed is a no-op. Live per-platform detail (connect progress, QR) is
folded in only while that dialog is open, and freshness timestamps are
excluded so message arrival never triggers a chrome rebuild. Genuine
changes — Google connect/disconnect, pairing progress, a new QR — still
render.
Verified with a new e2e test: 6× Signal flap leaves the banner
byte-identical while a Google disconnect still updates it.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 435d407 commit dcbe264
2 files changed
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1089 | 1089 | | |
1090 | 1090 | | |
1091 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4582 | 4582 | | |
4583 | 4583 | | |
4584 | 4584 | | |
| 4585 | + | |
| 4586 | + | |
| 4587 | + | |
| 4588 | + | |
| 4589 | + | |
| 4590 | + | |
4585 | 4591 | | |
4586 | 4592 | | |
4587 | 4593 | | |
| |||
8340 | 8346 | | |
8341 | 8347 | | |
8342 | 8348 | | |
| 8349 | + | |
| 8350 | + | |
| 8351 | + | |
| 8352 | + | |
| 8353 | + | |
| 8354 | + | |
| 8355 | + | |
| 8356 | + | |
| 8357 | + | |
| 8358 | + | |
| 8359 | + | |
| 8360 | + | |
| 8361 | + | |
| 8362 | + | |
| 8363 | + | |
| 8364 | + | |
| 8365 | + | |
| 8366 | + | |
8343 | 8367 | | |
8344 | 8368 | | |
8345 | 8369 | | |
| |||
9773 | 9797 | | |
9774 | 9798 | | |
9775 | 9799 | | |
| 9800 | + | |
| 9801 | + | |
| 9802 | + | |
| 9803 | + | |
| 9804 | + | |
| 9805 | + | |
9776 | 9806 | | |
9777 | 9807 | | |
9778 | 9808 | | |
| |||
0 commit comments