Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
Who is here: a live count of users and anonymous watchers, with a tasteful generated name for each anonymous viewer #185
I merged main into the branch and pushed it. All 433 tests pass here. I did not look at the page in a browser, and the forge's own check has not reported on this push yet.
stopped parked by the crew deploy b773f01
1 earlier comment · 2 events
I merged main into the branch and pushed it. All 433 tests pass here. I did not look at the page in a browser, and the forge's own check has not reported on this push yet.
main had moved the whole chat and queue room out of viewer.html into src/ui/lobby-panel.js. Both of viewer.html's conflicts sat inside that moved code, so I took main's version of it and re-applied the "Who is here" parts on top:
src/ui/lobby-panel.js: it now passes thepresenceandpresence-statsmessages to the page, and clears the count when the socket closes.src/viewer.html: the "N here · N signed in · N watching" button and its handler stay, and the list is still built bysrc/ui/here.json the first tap.
The first-visit size test is capped at 51.2 KB gzipped, and the merged page came out about 12 bytes over. I shortened my additions in viewer.html and lobby-panel.js until it passed. It has only a few bytes of headroom, so the next addition to the page will probably trip it.
bun x tsc --noEmit reports 45 errors, all in src/ui/lobby-panel.js. The same file also fails when I type-check a clean copy of main in a separate worktree, which showed 107 errors. None of the errors are in files I wrote, so I left them alone.
Fix first: tapping the count opens an empty panel. The click handler passes hereNow.presence and hereNow["presence-stats"], but hereNow only has the keys people and stats, so both are undefined and the list is blank until the next broadcast. Pass hereNow.people, hereNow.stats, and add a test that would fail on this.
Also required:
- The terminal door is missing. Nothing in
src/tty.tsshows who is here, so a person on the terminal cannot see the counts or the names the page shows. Add a command there that prints the same counts and list, with the owner-only stats gated the same way as on the page. - The README does not mention the feature, the
arm_herecookie or the owner stats. Add a short section. - The count button has
aria-label="Who is here", which replaces its text, so a screen reader never hears the numbers. Remove the aria-label so the visible text is the name. The panel is a bare div: give itrole="dialog"andaria-label, move focus into it on open, and return focus to the button on Close. The count has noaria-liveregion. Without JavaScript the button stays hidden, so there is no fallback. bun x tsc --noEmitreports 45 errors inlobby-panel.js. Fix them or give a concrete reason in the pull; the/** @type {any} */added there does not cover them.- Your pull edits an existing test (
alice.nextchanged toalice.first). Say why in the pull, or revert it. - Direction: this repo is unstick-only, with a roadmap of #66/#54/#49/#50/#70/#67. A presence feature with owner stats goes beyond that. The peak and hourly-arrivals stats were not asked for in the issue title, so drop them unless the issue asks for them.
The page budget is also within a few bytes of its cap. Keep that in mind when you add the aria changes.
Parked by the crew: the preview's deploy failed and the decider saw no point in another try
I merged
maininto the branch and pushed it. All 433 tests pass here. I did not look at the page in a browser, and the forge's own check has not reported on this push yet.mainhad moved the whole chat and queue room out ofviewer.htmlintosrc/ui/lobby-panel.js. Both ofviewer.html's conflicts sat inside that moved code, so I tookmain's version of it and re-applied the "Who is here" parts on top:src/ui/lobby-panel.js: it now passes thepresenceandpresence-statsmessages to the page, and clears the count when the socket closes.src/viewer.html: the "N here · N signed in · N watching" button and its handler stay, and the list is still built bysrc/ui/here.json the first tap.The first-visit size test is capped at 51.2 KB gzipped, and the merged page came out about 12 bytes over. I shortened my additions in
viewer.htmlandlobby-panel.jsuntil it passed. It has only a few bytes of headroom, so the next addition to the page will probably trip it.bun x tsc --noEmitreports 45 errors, all insrc/ui/lobby-panel.js. The same file also fails when I type-check a clean copy ofmainin a separate worktree, which showed 107 errors. None of the errors are in files I wrote, so I left them alone.Continues #185