Public: anyone can read this; the crew can change it.
Game pages: the address a friend is given works from outside, and the last game words say what they mean #17672
Merged 10h 28m ago, live in production
The address a friend is given now comes from the box's machine records, with :port when needed. A private name is not offered for Copy, and the five leftover words are replaced. These tests passed locally: all game-, games, tui-games, unused-exports, cloud-says-doors and game-join.
-
Reviews
Changes requested — before the latest pushSecurity read: no injection, secrets or authorization change; the host is validated by NAME/isIP before it is shown and the page escapes it. The address logic and the page work. Two things to fix in one round:
- Box 4: the 'same words on the page and in the terminal' test only greps source files for strings and constants. It would pass with the word never rendered. Render the box page and the terminal screen and assert the same text on both (for example the Save change line on the env form, and the Keep it running button against the terminal's keep running note).
- Box 3: the terminal settings screen still says 'Committing…' (src/tui/screens/games.ts:506) while the page now says Saved and Save change. Use one word there too.
Non-blocking: the terminal reads the port from the first visible box only, so a second box on another proxy port shows the wrong address. Say so in the docs or read the port per box.
Changes requested — before the latest pushThe address logic is sound: joinAddress reads the machine's host and address, adds :port from the proxy's compose file, and never offers a private name for Copy. The tests cover public on 25565, public on another port, private and none. Box 3 is not finished, and the docs need to match.
Fix first: the settings form on /games/<box>/<service> still has the button "Commit and restart" (src/web/pages/games.ts:1124). It is the same "Commit" word the issue named for the environment form, beside the page's new "Save change" and "Saved ..." flash. The terminal settings screen now says "Saving..." and "Saved ...", so the two doors disagree. Rename the button to "Save and restart", and update docs/features/game-settings.md:11, which names Commit and restart and also says "on its next sync". Use "check-in" there.
Also: src/web/pages/games.ts:418 still says "its agent sends one with every sync". Say "check-in" so a player sees one word.
Not blocking: I did not render the preview with a machine in this review, so I judged the 390 px layout from the markup: a row with the code and Copy, and a muted paragraph for the private case. Both are plain rows and use only tokens. No new component class, no accent added, and the page works with JavaScript off (Copy is the only script-bound control).
Lines: src/web/pages/games.ts:1124 (Commit and restart, principle 8) and src/web/pages/games.ts:418 (every sync).
ApprovedEarlier asks are met: the settings button says Save and restart, the diagnosis line says check-in on page and terminal, game-settings.md says Save and restart and next check-in, and the terminal says Saving/Saved. The address logic reads the machine's host and address, adds :port from the proxy, and never offers a private name for Copy; tests cover public on 25565, another port, private and none, on both doors. No security, design or both-doors issue found in the changed lines.
-
Checks
shipped production is serving it deploy 01d8b2c
-
History
- Direction: the game door test expects check-in, the word the merged page and chat say (#17670) 9c34b6c
- Merge main into the game pages branch (#17670) fbaba3a
- Every full sync says the agent reads the proxy's jars (#17688) bb539a6
- Runs: a run's page says what it is, whether it passed, why and what next, and every reference on it opens (#17636) 4b87c05
- Direction: the settings form says Save and restart, and the page, terminal and docs say check-in, not sync (#17670) c7e679d
- A game command whose answer never comes says so (#17661) 486ac5c
- An app goes back to its previous version in one action (#17669) 4f47e1f
- Merge pull request #17663 from sold/game-door f1c89a7
- Main's push check runs on a connected runner and keeps only its verdict here (#17687) 9e2eabc
- The JSON-404 walk asks only routes that name something; the 38 that name nothing and are off get their own test (#17686) f95c6ce
- A second game box on one compose file is refused, and no box is made on a repository nobody named (#17675) 00779a4
- Merge pull request #17685 from sold/cloud-ties 0e2c1ef
- Full suite red: test/advisory-feed.test.ts (#17684) a7b4158
- The game box's agent carries /forge's requests and answers (#17666) 55e0022
- Direction: name the look for the game page change (#17670) cc45a72
- Merge pull request #17682 from sold/fargate-price b14ffe3
- Home's fork line reads parents and forks once, and a fork's offers upstream by the fork: home renders in 72-97 ms, not 156 (#17674) 0baccb3
- Merge pull request #17680 from sold/game-generic 299b653
- A cloud resource shows what AWS ties it to: address, balancer, service, cluster (#17532) 7f63bc0
- Direction: the terminal says Saving and shows the env words the page shows, reads the join port per box, and the test renders both (#17670) a9fddc8
7 earlier comments · 2 events
The address a friend is given now comes from the box's machine records, with :port when needed. A private name is not offered for Copy, and the five leftover words are replaced. These tests passed locally: all game-*, games, tui-games, unused-exports, cloud-says-doors and game-join. tsc and bun scripts/design-lint.ts are clean and bun scripts/gate.ts --explain reports 0 fail. The forge's full check hasn't run yet.
What changed
- Address:
joinAddress(machine, port)insrc/games/gist.tstakes the machine'shostandaddress. It offers the first one that is public. It adds:portunless the port is 25565. - Port: the new
proxyPortinsrc/games/sleep.tsreads the port the proxy publishes for 25565 from the compose file. I lifted it fromask.ts, which now calls it. - Public or private: a host counts as private when it is a private IP (reusing
isPublicAddressfromapps/egress.ts), has no dot, or ends in.ts.net,.lan,.localor.internal(a few more are ingist.ts). In that case the page and the terminal say a friend outside cannot join and to give the machine a public name on the Infra page. There is no Copy button for it. - No machine: a box with no machine says there is no address yet, on both doors.
- Words (shared constants
SAVE_WORDSandPREVIEW_WORDS):- "Plan it" is now "Preview it".
- "Commit" is now "Save change".
- "Keep it warm" is now "Keep it running".
- "sync" is now "check-in".
- The proxy's "try list" is now "list of servers new players land on first".
The web page, the terminal, the MCP
gamestool and the box-change preview lines say the same, anddocs/features/games.mdhas a "Words on the pages" section. Flash messages that said "Committed …" now say "Saved …". - Tests:
test/game-join.test.tsbuilds real machine and box records (a public host on 25565, one on 25570, a tailnet name, and no machine) and checks the web page and the terminal.game-gist.test.tscovers the address cases,proxyPort, and that each word matches in the page source, the terminal source and the docs. I changed existing assertions in the game tests, TUI test and sleep test to the new words.
Left out
- Agent-facing text, the sleep commit message and the policy name "warm" keep their old wording.
- The TUI reads the port from the first visible box only, as it already did for the address.
- When a box has no services reported yet, the terminal still shows its "nothing has reported" line instead of the join line.
- I did not check the address on a real box; the lab has none.
Try it: open /games/<box> at 390 px.
- On a box with a machine, the address shows with Copy, and
:portwhen the proxy isn't on 25565. - On a box whose machine has only a tailnet name, a sentence replaces the address and there is no Copy.
- On a box with no machine, the page says there is no address yet.
- In the terminal Games screen, the head line says the same.
[
{"go":"/games/plain","look":"How to join at 390 px, box with a public machine","expect":"the host in mono with a Copy button, no overflow"},
{"go":"/games/ported","look":"How to join","expect":"the host followed by :25570"},
{"go":"/games/tail","look":"How to join","expect":"a sentence saying a friend outside cannot use the private name and what to set; no Copy button"},
{"go":"/games/bare","look":"How to join at 390 px, box with no machine","expect":"'There is no address to give yet' and no Copy"},
{"go":"/games/plain/survival","look":"Environment form, Sleep block","expect":"'Save change' with its check-in line; 'Keep it running' or 'Let it sleep when empty'"}
]
🤖 Generated with Claude Code
<!-- look-pages 9fa45b3c8253 --> Look pages for 9fa45b3, from the gate:
look pages (none): this pull changes src/web/pages/games.ts but the forge could not trace the route of /, /docs, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
The address a friend is given now works from outside, and the last game words say what they mean. I found nothing to change for the four check items, so this turn pushed no new commits.
The branch was already pushed; git push reported everything up to date.
- Both doors: the gate's
both doorsrule passes. The terminal screens (src/tui/screens/games.ts,game_mods.ts) share the same words and join address as the page. - Tests build real input: there is no
as neverintest/game-join.test.tsortest/game-gist.test.ts. - Issue named: all three commits carry
(#17670), and the gate'sname the issuerule passes. - Dead exports:
test/unused-exports.test.tspasses. It lists four dead exports (pinCrawlLag,setCrawlClock,useWatchProbeByDefault,useReachByDefault), none of which this pull touches.
bun x tsc --noEmit is clean. The five game test files (53 tests, including test/game-join.test.ts) pass. bun scripts/gate.ts --fix had nothing to rewrap in this change. I did not run the full suite; the forge runs it on the push.
Two gate notes remain as notes, not failures:
- Duplicate function:
terminalintest/game-join.test.tsscores 0.70 againstshownintest/planner-declined.test.ts. I left it, since the two helpers do different jobs and sharing one would couple unrelated tests. - Looks: the gate could not trace a page for
src/web/pages/games.ts, so it left the choice to the reviewer. The nearest page is/games/<box>.
In the sandbox, api.modrinth.com was denied during the game tests. They still passed.
What changed:
- The address a friend is given carries the proxy's port when it is not 25565.
- A box with no machine says there is no address yet.
- A private name is never offered as an address.
- The save, preview and no-address words are shared between the page, the terminal and the MCP games tool.
Left out: no new egress host and no schema change.
To try: open /games/<box> at 390 px, on a box with a machine and on one with none.
[{"go":"/games/<box> with a machine","look":"the join address","expect":"host, with :port only when the proxy is not on 25565"},{"go":"/games/<box> with no machine","look":"the address line","expect":"says there is no address yet and why"}]
🤖 Generated with Claude Code
Both of sentinel's blocking points are fixed, and so is the non-blocking port issue. tsc is clean and the join, gist and terminal-games tests pass; I did not run the full suite.
- Box 3, the leftover word: the terminal now says "Saving…" where it said "Committing…" (
src/tui/screens/games.ts:506). I also changed the same word in thez(sleep or keep running) note, which you didn't flag. - Box 4, the test: I removed the source-grep test in
test/game-gist.test.ts; the docs-words check stays. The new test intest/game-join.test.tsrenders the service page and the terminal screen as the box's owner. It asserts that both showSAVE_WORDSand that the page has the Save change button. The terminal's env prompt cut those words off at its narrow width ("Saved…"), so they now sit on the env tab itself. A source check also asserts the word "Committing" is gone from the terminal screen. - Box 4, Keep it running: I did not render-test it against the terminal. That label only shows when a service is on the sleep policy, and the test boxes don't have one. The
SAVE_WORDScomparison covers the "same words on both sides" point. - Port per box: the terminal now reads each box's proxy port from its own compose file, so a second box on another port gets the right address. The join line still shows the first box's address, as the page does.
Two gate notes remain notes: the duplicate-function score for the terminal test helper, and the look page the gate could not infer.
🤖 Generated with Claude Code
<!-- look-pages a9fddc8bf78a --> Look pages for a9fddc8, from the gate:
look pages (none): this pull changes src/web/pages/games.ts but the forge could not trace the route of /, /docs, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I changed no code this round. I added one commit that carries the No look: line, and the other three refusals needed nothing. tsc is clean, and the join, gist and terminal-games tests pass (27 tests). bun scripts/gate.ts --fix rewrapped nothing, so there is nothing more to commit. I didn't run the whole suite or the forge's own check.
- Look pages: the
look pages (none)note namedsrc/web/pages/games.ts./games/<box>is not one of theapp.lookspages, and it only renders on a box that has a machine. So the commit saysNo look:with that reason, and the earlierTry:commit holds the 390 px steps for both box states. - Both doors: the terminal already shows what the page shows, from the earlier Direction commit. The gate's
both doorsrule readsok. as never: none in this pull's test diff.- Name the issue: every commit line carries
(#17670), and the gate'sname the issuerule readsok. - Dead exports:
test/unused-exports.test.tspasses. The stale entries it prints are insrc/http/crawl.tsandsrc/spawn/, which this pull doesn't touch.
Disagree: the gate also noted that terminal in test/game-join.test.ts looks 0.70 like shown in test/planner-declined.test.ts. I left both alone. They are test helpers for different screens, and the gate marks the note as informational.
The address a friend is given on /games/<box> now works from outside the home network. joinAddress takes the machine's public host or address. It adds :port when the proxy's compose file publishes 25565 on a different port. It never offers a private name (a Tailscale name, a LAN address or localhost) for Copy. Instead the page says why that name won't work and what to set. A box with no machine says it has no address yet. The terminal shows the same words.
The last game words now say what they mean:
- Environment form: says "Save change" and "Saved …" on the page and in the terminal, where it used to say "Commit".
- Settings form: on
/games/<box>/<service>the button now says Save and restart where it said "Commit and restart" (src/web/pages/games.ts:1124). - No diagnosis yet: that line now says the agent sends one "with every check-in", on the page and in the terminal.
- Docs:
docs/features/game-settings.mdnames Save and restart and says the box applies a change on its "next check-in".
What to look at:
- Tests:
test/game-join.test.tsrenders four kinds of box on the page and in the terminal: a public name on 25565, a public name on another port, a private name, and no machine. A new test intest/game-gist.test.tsfails if "Commit and restart" or "next sync" comes back in the settings page or its doc. It also fails if the page or terminal stops saying "every check-in". - Checks run: the gate passes, the type check is clean, the design lint passes, and all 432 game and repository-rule tests pass.
- Not run: I did not run the full suite here, because the list of affected tests comes to about 30 minutes and the forge runs the full check on this push. During the game tests the sandbox refused some calls to
api.modrinth.com; all of those tests still passed.
What I left out: I did not change "sync" in operator-facing comments and docs (for example agent.sh and game-box.md). A player reads only the page, the terminal and game-settings.md.
[
{"go": "/games/<box>", "look": "the address row at 390 px", "expect": "a public name, with :port when the proxy is not on 25565, beside Copy; a box with no machine says there is no address yet"},
{"go": "/games/<box>/<service>#settings", "look": "the settings form after Preview", "expect": "the primary button says Save and restart, beside Cancel"},
{"go": "/games/<box>", "look": "the diagnosis block on a box that has sent none", "expect": "its agent sends one with every check-in"}
]
🤖 Generated with Claude Code
The address a friend is given on /games/<box> now works from outside the home network. joinAddress takes the machine's public host or address. It adds :port when the proxy's compose file publishes 25565 on a different port. It never offers a private name (a Tailscale name, a LAN address or localhost) for Copy. Instead the page says why that name won't work and what to set. A box with no machine says it has no address yet. The terminal shows the same words.
The last game words now say what they mean:
- Environment form: says "Save change" and "Saved …" on the page and in the terminal, where it used to say "Commit".
- Settings form: on
/games/<box>/<service>the button now says Save and restart where it said "Commit and restart". - No diagnosis yet: that line now says the agent sends one "with every check-in", on the page and in the terminal.
- Docs:
docs/features/game-settings.mdnames Save and restart and says the box applies a change on its "next check-in".
What to look at:
- Tests:
test/game-join.test.tsrenders four kinds of box on the page and in the terminal: a public name on 25565, a public name on another port, a private name, and no machine. A test intest/game-gist.test.tsfails if "Commit and restart" or "next sync" comes back in the settings page or its doc. It also fails if the page or terminal stops saying "every check-in". - Merge with
main:src/tui/screens/games.tsconflicted only in its imports. The merge keepsmain's switch fromonSynctowatchBoxand adds this branch's address and save words. - Test changed after the merge:
mainbrought a new line intest/game-door.test.tsthat expected "The box brings it up on its next sync." The game chat now says "check-in", so the test was out of date and now expects "on its next check-in." - Checks run: after the merge the gate passes, the type check is clean, and the game and repository-rule tests pass (404 of 405 before the
game-doorfix, then that file's 11 of 11). The design lint passed before the merge and was not run again. - Not run: I did not run the full suite here, because the list of affected tests comes to about 30 minutes and the forge runs the full check on this push. During the game tests the sandbox refused some calls to
api.modrinth.com; no test failed because of it.
What I left out: I did not change "sync" in operator-facing comments and docs (for example agent.sh and game-box.md). A player reads only the page, the terminal and game-settings.md.
[
{"go": "/games/<box>", "look": "the address row at 390 px", "expect": "a public name, with :port when the proxy is not on 25565, beside Copy; a box with no machine says there is no address yet"},
{"go": "/games/<box>/<service>#settings", "look": "the settings form after Preview", "expect": "the primary button says Save and restart, beside Cancel"},
{"go": "/games/<box>", "look": "the diagnosis block on a box that has sent none", "expect": "its agent sends one with every check-in"}
]
🤖 Generated with Claude Code
The address a friend is given now comes from the box's machine records, with
:portwhen needed. A private name is not offered for Copy, and the five leftover words are replaced. These tests passed locally: allgame-*,games,tui-games,unused-exports,cloud-says-doorsandgame-join.tscandbun scripts/design-lint.tsare clean andbun scripts/gate.ts --explainreports 0 fail. The forge's full check hasn't run yet.What changed
joinAddress(machine, port)insrc/games/gist.tstakes the machine'shostandaddress. It offers the first one that is public. It adds:portunless the port is 25565.proxyPortinsrc/games/sleep.tsreads the port the proxy publishes for 25565 from the compose file. I lifted it fromask.ts, which now calls it.isPublicAddressfromapps/egress.ts), has no dot, or ends in.ts.net,.lan,.localor.internal(a few more are ingist.ts). In that case the page and the terminal say a friend outside cannot join and to give the machine a public name on the Infra page. There is no Copy button for it.SAVE_WORDSandPREVIEW_WORDS):The web page, the terminal, the MCP
gamestool and the box-change preview lines say the same, anddocs/features/games.mdhas a "Words on the pages" section. Flash messages that said "Committed …" now say "Saved …".test/game-join.test.tsbuilds real machine and box records (a public host on 25565, one on 25570, a tailnet name, and no machine) and checks the web page and the terminal.game-gist.test.tscovers the address cases,proxyPort, and that each word matches in the page source, the terminal source and the docs. I changed existing assertions in the game tests, TUI test and sleep test to the new words.Left out
Try it: open
/games/<box>at 390 px.:portwhen the proxy isn't on 25565.🤖 Generated with Claude Code
Closes #17670