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

forked from trevato/cs

Take updates from trevato/cs #396

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

This merges trevato/cs `main` (7513f8b, staged at `refs/following/main`) in three commits. `bun run test` passes: typecheck plus 1652 tests. The app boots and `/` answers 200 in about 9 ms.

shipped production is serving it deploy ae07c2d

opened this

This merges trevato/cs main (7513f8b, staged at refs/following/main) in three commits. bun run test passes: typecheck plus 1652 tests. The app boots and / answers 200 in about 9 ms.

  1. Merge commit (c604121): every conflicted file keeps this repository's version, so its tree matches main exactly.

- Earlier syncs were squashed, so git still merges from 0644e74 and replays upstream #188–#236 as 41 conflicts. - This repository already has all of those in its own form, the last through #393. - Only upstream #237, #238 and #239 are new.

  1. Port of #238: the death notice gives the killer's health.
  2. Port of the part of #237 this repository was missing.

Per file (merge commit):

  • This side won in README.md, src/client/{bots,hud,main,map,motion,report,summary,weapons,world}.ts and their tests, combat.test.ts, spectate.test.ts, src/db.ts, db.test.ts, src/pages/game.ts, game.test.ts, src/server.ts, server.test.ts and src/rl/arena.test.ts. Upstream's text in these files predates the engine being pulled out, and its changes up to #236 are already here.
  • This side won in src/client/{bodies,earshot,input,physics,plan,renderer,settings}.ts, their tests, saved.test.ts and src/readme.test.ts: they stay deleted. Their work lives in src/engine/ (controls, renderer, physics) and src/plan/, as earlier syncs decided.
  • Upstream's zoom.ts and zoom.test.ts stay out. look.ts already handles scoped sensitivity.
  • Upstream's auto-merged additions to src/client/match.ts and src/rl/arena.ts are dropped, as in #379–#393. This repository has no settings store for them to serve.
  • Upstream's src/escape.ts stays out. summary.ts deliberately keeps its own escapeHtml, because a browser bundle may not import the server's page code. The page and the final board already escape every name.
  • #239 (recorder.test-helper.ts, reportPanel.test.ts) stays out. It only adds tests for upstream's reportPanel.ts, which this repository doesn't have. The shared recording context it creates already exists here as paint.test-helper.ts.

#238, ported:

  • src/client/world.ts: FeedEntry gains killerHealth, the killer's health at the moment of the kill. It is null for a death nobody else caused (a fall, your own grenade).
  • src/rooms/wire.ts, room.ts: a room's log carries the value.

- Incoming, it is validated as a finite number or null, then rounded and clamped to 0–100. - A missing or non-numeric value is refused.

  • src/client/hud.ts: this repository never had upstream's "X killed you with Y" line, so the port adds it as deathLine: who killed you, with what, "headshot", and "N hp left".

- It is drawn above the "Watching …" panel, or under "You are dead" when there is nobody left to watch. - A fall reads "You fell too far". Your own grenade reads "You killed yourself with HE Grenade" and gives no health. - The feed is matched by name, which is this repository's design: a room keeps names unique.

  • Tests:

- world.test.ts: the health is kept at the kill and doesn't change if the killer is hurt later, and a fall gives null. - hud.test.ts: the notice's text, colour and position, and that it is absent while alive and at match over. Fall and grenade deaths say how and give no health. - wire.test.ts: validation and clamping. - room.test.ts: logSince carries the value. - session.test.ts fixtures gain the field.

#237, ported where missing:

  • This repository already shows the final board, both sides and ten rows, ranked by scoreLines (the ranking the Tab board uses) and escaped.
  • What it lacked is upstream's height budget. #sumboard now scrolls inside max-height:min(40vh,17rem), so on a phone held sideways Play again stays on screen.
  • game.test.ts checks the rule and the README says it.
  • Upstream's rankPlayers, finalBoard and finalBoardHtml are not ported, because scoreLines and boardHtml already do that job.

To try it: in the preview, die to a bot. The line above the spectator panel names the bot, the gun, and how much health it had left. Finish a match on a phone held sideways: the board scrolls and the buttons stay visible.

Closes #394

🤖 Generated with Claude Code

Closes #394

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs