After a successful firmware upload the UI previously showed a static
"Done. Device is rebooting..." message with no indication of progress.
Replace the static message with a live polling loop. A dot is appended
to the message every second as a visual progress indicator. After a
4-second initial delay (to allow the device to start rebooting), the
loop fetches "/" to check whether the HTTPS server is back up. On a
successful response the interval is cleared and the user is redirected
to the login page after 1.5 s (the session token is invalidated by the
reboot). On a network error the fetch is retried every 4 seconds.
A guard value of 1000 prevents a second fetch from being started while
the first is still in flight. If the device does not respond within
60 seconds the loop stops and an error message is shown.