Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

Each other person's chat line has an accessible 44 px Report button that sends {type:'report',id} and turns disabled 'Reported' only on the server's 'reported' frame - page module and test only #339

Parked opened this
Closed without merging

Signed-in users now see a Report button on other people's chat lines, and it changes only when the server's reported frame for that id arrives. Tests pass; the type check did not run, because bun install and bun x tsc both failed here with ReadOnlyFileSystem on the temp dir.

Notes

stopped parked by the crew deploy 3007412

opened this

Signed-in users now see a Report button on other people's chat lines, and it changes only when the server's reported frame for that id arrives. Tests pass; the type check did not run, because bun install and bun x tsc both failed here with ReadOnlyFileSystem on the temp dir. The forge's check will be the first type check.

  • Visibility: a new exported mayReport(m, me) in src/ui/lobby-panel.js returns true only for a signed-in user on someone else's line. Guests, your own lines and system lines get no button.
  • Send: a click sends {type:"report",id}.
  • State change: on a reported frame for that id, the button becomes disabled and reads "Reported". It uses aria-live="polite", and its aria-label names the author. An error frame leaves it as it was. Confirmed ids are kept, so a line redrawn later (history or a reconnect) still shows "Reported".
  • Layout: the button is always drawn on eligible lines. In src/viewer.html, .line.rep is a flex row with min-height: 44px and the button is at least 44×44, so reporting shifts nothing.
  • Tests: src/ui/lobby-panel.test.ts covers mayReport, the button on another's line but not your own or a guest's, the send shape, and no change on an error frame. It does not check the 44 px size or aria-live's announcement.
  • Test runs: the src/ui suites and src/compress.test.ts pass (124 tests). The full bun test run, made before my last test fix, had 582 passing and 3 failing, one of which was my own test. I did not rerun the whole suite afterwards, so the first-visit gzip budget test is covered only through compress.test.ts.
  • Prior work: I did not use any of pull #299.

🤖 Generated with Claude Code

Closes #317

commented

Signed-in users now see a Report button on other people's chat lines, and it changes only when the server's reported frame for that id arrives. Tests pass; the type check did not run, because bun install and bun x tsc both failed here with ReadOnlyFileSystem on the temp dir. The forge's check will be the first type check.

  • Visibility: a new exported mayReport(m, me) in src/ui/lobby-panel.js returns true only for a signed-in user on someone else's line. Guests, your own lines and system lines get no button.
  • Send: a click sends {type:"report",id}.
  • State change: on a reported frame for that id, the button becomes disabled and reads "Reported". It uses aria-live="polite", and its aria-label names the author. An error frame leaves it as it was. Confirmed ids are kept, so a line redrawn later (history or a reconnect) still shows "Reported".
  • Layout: the button is always drawn on eligible lines. In src/viewer.html, .line.rep is a flex row with min-height: 44px and the button is at least 44×44, so reporting shifts nothing.
  • Tests: src/ui/lobby-panel.test.ts covers mayReport, the button on another's line but not your own or a guest's, the send shape, and no change on an error frame. It does not check the 44 px size or aria-live's announcement.
  • Test runs: the src/ui suites and src/compress.test.ts pass (124 tests). The full bun test run, made before my last test fix, had 582 passing and 3 failing, one of which was my own test. I did not rerun the whole suite afterwards, so the first-visit gzip budget test is covered only through compress.test.ts.
  • Prior work: I did not use any of pull #299.

🤖 Generated with Claude Code

commented

Parked by the crew: the preview's deploy failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs