Connection notices wait three seconds before they show #73

Merged
calvin merged 1 commit from reconnect-notice-delay into master 2026-11-13 14:38:45 +00:00
Owner

Calvin's report (13 November 2026): switching apps on a phone and coming back to the browser shows the "Connection lost" notice for a moment, every time, although the page reconnects at once.

Change: #client-error and #server-error get a CSS animation with a 3 s delay (backwards fill), so they are invisible for the first three seconds after LiveView shows them. app.js starts that wait again on visibilitychange when the page becomes visible. No change to the markup or to LiveView's own behaviour.

Tested 14:20-14:26 UTC against the live sign-in page in headless Chrome 121 at 412x915 (mobile, touch), with this rule injected in the browser only (nothing changed on the server):

Case Without the rule With the rule
Connection dropped, page reconnects by itself after about 1 s notice visible from 0.8 s to 1.6 s notice never visible
Network away 6 s notice from 0.8 s notice from 3.7 s
Notice already up, page becomes visible again - notice hidden at once, wait starts again

Not tested: a real phone, and a real freeze of the page by the phone's browser (the drop was simulated by closing the socket and by cutting the browser's network). Reduced-motion preference: not measured separately; the rule sets only the animation duration to near zero there, the delay stays.

Seen while testing, not changed here: after a network cut LiveView reloads the page by itself once the network is back.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DnYzaTxC2GmdSpvCNyHNne

Calvin's report (13 November 2026): switching apps on a phone and coming back to the browser shows the "Connection lost" notice for a moment, every time, although the page reconnects at once. **Change:** `#client-error` and `#server-error` get a CSS animation with a 3 s delay (`backwards` fill), so they are invisible for the first three seconds after LiveView shows them. `app.js` starts that wait again on `visibilitychange` when the page becomes visible. No change to the markup or to LiveView's own behaviour. **Tested 14:20-14:26 UTC** against the live sign-in page in headless Chrome 121 at 412x915 (mobile, touch), with this rule injected in the browser only (nothing changed on the server): | Case | Without the rule | With the rule | |---|---|---| | Connection dropped, page reconnects by itself after about 1 s | notice visible from 0.8 s to 1.6 s | notice never visible | | Network away 6 s | notice from 0.8 s | notice from 3.7 s | | Notice already up, page becomes visible again | - | notice hidden at once, wait starts again | Not tested: a real phone, and a real freeze of the page by the phone's browser (the drop was simulated by closing the socket and by cutting the browser's network). Reduced-motion preference: not measured separately; the rule sets only the animation duration to near zero there, the delay stays. Seen while testing, not changed here: after a network cut LiveView reloads the page by itself once the network is back. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DnYzaTxC2GmdSpvCNyHNne
Connection notices wait three seconds before they show
All checks were successful
ci/woodpecker/pr/image Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/pr/integration Pipeline was successful
72658a4246
A phone pauses the live connection when the browser goes to the
background; on return the page reconnects within a moment and the
"connection lost" notice flashed each time. The two notices now stay
invisible for three seconds, and the wait starts again when the page
becomes visible.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DnYzaTxC2GmdSpvCNyHNne
calvin merged commit dacc9cf3ab into master 2026-11-13 14:38:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
external/salt-dns!73
No description provided.