Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
Terminal: /report <name|#n> files a report, and /reports lists them for the owner and moderators #348
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
The terminal now has /report and /reports, and both are pushed. src/terminal.test.ts passes (25 tests), but I couldn't type-check: bun x tsc --noEmit failed in this sandbox with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first type check.
shipped merged
The terminal now has /report <name|#n> and /reports, and both are pushed. src/terminal.test.ts passes (25 tests), but I couldn't type-check: bun x tsc --noEmit failed in this sandbox with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first type check.
/report <name|#n>: sends{type:'report', id}for that person's latest line, or for line#n. It printsreported #<id>when the server confirms. A line that doesn't exist or a name the terminal hasn't seen gets an error./reports: the owner and moderators get one line per report, newest first (report #n author: text (by reporter)), orno reports. Anyone else is told "reports are for the owner and moderators". This check is made in the terminal, from the role the server reported.- Join and new reports: the owner and moderators see
N reports to review: /reportson join, then one line per new report. - Help and docs: HELP and the header comment list both commands.
Software/README.mddocuments them and says reports are kept in$FORGE_APP_DATA/so101/reports.json. - Tests: a new case in
src/terminal.test.tscovers the refusal, reporting by name and by#id, the error cases, the/reportslisting, the owner hearing a new report live, and the join count. - Server: no change; the terminal only uses the report frames the lobby already sends.
I only ran src/terminal.test.ts, not the whole bun --cwd Software/so101 test.
🤖 Generated with Claude Code
Approved. The terminal now has /report <name|#n> and /reports, matching the page. The client only saves a round trip: signed-in, ban and line-exists checks stay on the server, and the owner/moderator gate on /reports matches the server role. The new test would fail without the change, the README and HELP are updated, there is no new dependency, and the change is confined to the terminal module and does not widen scope. I read the diff and did not run it. I did not exercise the preview.
Two things to do next:
- /reports and the live report lines print the reporter as an id (by u-carol). Show the reporter name when the server can send it, or resolve it from room.seen.
- The pull says only terminal.test.ts was run and tsc was not. Watch the forge check for type errors on the widened Typed union and the new Room.reports field. Also drop the odd hear(emptyRoom(), reports: []) assertion at the end of the test, or give it its own test.
The terminal now has
/report <name|#n>and/reports, and both are pushed.src/terminal.test.tspasses (25 tests), but I couldn't type-check:bun x tsc --noEmitfailed in this sandbox with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The forge's check will be the first type check./report <name|#n>: sends{type:'report', id}for that person's latest line, or for line#n. It printsreported #<id>when the server confirms. A line that doesn't exist or a name the terminal hasn't seen gets an error./reports: the owner and moderators get one line per report, newest first (report #n author: text (by reporter)), orno reports. Anyone else is told "reports are for the owner and moderators". This check is made in the terminal, from the role the server reported.N reports to review: /reportson join, then one line per new report.Software/README.mddocuments them and says reports are kept in$FORGE_APP_DATA/so101/reports.json.src/terminal.test.tscovers the refusal, reporting by name and by#id, the error cases, the/reportslisting, the owner hearing a new report live, and the join count.I only ran
src/terminal.test.ts, not the wholebun --cwd Software/so101 test.🤖 Generated with Claude Code
Closes #319