brightsign: say what the 8182 status listener is for on screen

"status listener on 127.0.0.1:8182" told an operator a port was open and nothing
about why, next to a server that advertises 8181 - it reads like a stray listener.
It now says it feeds the diagnostics screen while the app is downloading, starting
or down, and that nothing off-device can reach it.

The port is interpolated through currentPort() rather than captured: server.env is
read after this module is evaluated, so a captured value would print the 3001
default instead of the port actually serving. Verified on the device - the line
renders ":8181".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014kfhrUPit5MCqxeTQyqr56
This commit is contained in:
ScreenTinker 2026-08-18 17:42:34 -05:00
parent 350cd31414
commit a87bd7d875

View file

@ -475,8 +475,15 @@ try {
* last printed, which is not a thing to hand to an unauthenticated caller on a network we do
* not control.
*/
statusServer.listen(STATUS_PORT, '127.0.0.1',
() => remember('log', ['status listener on 127.0.0.1:' + STATUS_PORT]));
statusServer.listen(STATUS_PORT, '127.0.0.1', () => remember('log', [
'status listener on 127.0.0.1:' + STATUS_PORT +
' - loopback only, it feeds THIS diagnostics screen (install progress, uptime, the log below)' +
// currentPort(), not a captured constant: server.env is read after this module is evaluated, so
// a value captured here would print the 3001 default rather than the port actually in use.
' while the app on :' + currentPort() + ' is downloading, starting, or down. Not part of the' +
' app; nothing' +
' off-device can reach it.',
]));
if (statusServer.unref) statusServer.unref();
} catch (e) {
remember('error', ['could not start the status listener', String(e && e.message ? e.message : e)]);