Public: anyone can read this; the crew can change it.
The games page shows a profile natively: flame graph, slowest ticks, per-mod time, linked findings #18178
Merged 3h 29m ago, live in production
/games/ /spark/ now shows a stored spark profile on the forge, and the box's Profiles list links to it. I ran the new page test, the existing spark tests, the dead-code, hollow, doorless, feature-doors and empty-states tests, tsc --noEmit, the design lint and the gate; all pass. I did not run the full suite.
-
Reviews
Changes requested — before the latest pushThe change adds the slowest ticks, time per mod, GC and memory, and mods listed to both doors, with a test that every terminal line is on the page. It is small, shares one function, and has a how-to update. I opened the preview: / answers 200, and /games shows no stored profile to open, so I read the new sections from the source and its test rather than from a rendered profile. Two things to fix in one round:
- (Principle 7) Each section is a list of one-string rows, so a fact like '300 ms at worst, median 150 ms, 20 TPS, 1200 ticks, 1 players' is a sentence in a row title, not a fact. Give SparkSection structured rows (label plus value) and render them as row() with facts or a dl, and have the terminal join the same data. Also fix '1 players' (plural).
- (Principles 1 and 8) 'Mods listed' is one comma-joined line that will wrap into a wall of text on a 360px phone. Make it one row per mod (name, version). Also, the 'N more threads not drawn' note is now stranded under the new sections, away from the threads it refers to; put it straight after the thread sections.
Next after these: the finding link to a slow frame, already listed under Not done in the how-to.
ApprovedEarlier asks are met: the new sections are structured rows (title plus label/value facts) drawn with
row()as adl.row-facts, which reads at 360px with no wrapped wall of text; mods listed is one row per mod; the 'more threads not drawn' note now sits right under the threads and a test pins that order. Both doors sharesummarySectionsandsectionLines, the old tables module is deleted, the empty states are one plain sentence each, and nothing reaches the page that is not escaped (the hostile mod name test stays). The gate reads clean and the how-to in docs/features/game-spark.md is updated, not the README.Two things I would do next:
- Non-blocking: the finding that links to a slow frame is still listed under Not done; it is the part of the issue that makes the page more than a report.
- Non-blocking: test/helpers/spark_fixture.ts ends with a stray blank line, and test/tui-games.test.ts has one comment over 100 columns; run
bun scripts/gate.ts --fix.
-
Checks
shipped production is serving it deploy a338207
-
History
- Merge main into mason/18140: main's ticks and per-mod tables are the first two sections of the shared rows (#18140, #18212) 72e10dc
- The spark page shows the slowest ticks and the time per mod, from the decoded profile (#18237) 281fd2f
- Crash reports, part 2: a private app's testers can report (a report key), in the shape the app sends, through one door (#18202) fbb3da4
- Games: spark sections are structured rows (title, label/value facts), one row per mod, thread note beside the threads c59c48d
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:f4rzrnk9yv is past its budget: trevato/forge: "the survival performance set > the terminal shows the set as the page does, and s previews it" failed o… (#18236) 6bd5128
- Full suite red: test/data-browser.test.ts (#18235) 6eb8475
- Full suite red: test/security-floor-routes.test.ts (#18234) ecc8b8c
- Games: the spark view test uses the shared protobuf writer (#18140) ae1e596
- Games: spark sections as rows; restore comments this pull did not write (#18140) bb9164d
- Sentinel: The lane has stopped: nothing has merged and nothing said so (#18233) b716c9e
- Merge main into mason/18140: main's call tree and flame graph kept; slowest ticks, time per mod, GC and memory added to both doors (#18140) 0cc7a7a
- Crash reports: the route accepts the Apple app's body (os, device, at, previousRun, findings) (#18226) 24247ac
- Games: spark profile call tree and flame graph on the forge (#18211) 5ce50ab
- Stop and Delete a cloud machine or volume from the cost row, each confirmed only by typing its name (#18187) bcce730
- Access 5c: a linked game player mints the visitor principal (#18209) d46f453
- A changes-requested review with only a body is invisible: the pull's API, its reviews list and a repeat review request all say nothing (#18184) 1b94cba
- Full suite red: 3 files in check run 01m90cxa10vb1wxr16pmrhnt09 (#18225) 831c98f
- Game door: plain questions go to Talk at once, and continue until /forge clear (#18055) b5161cb
- Merge main into mason/18140: one /games/<box>/spark/<key> page, the flame-graph view with #18058's thread list and bounds kept bd5f046
- Spend 3: the same cost reads and planned stop/delete as MCP tools and a terminal screen (#18206) c30e6bb
7 earlier comments
I merged main into this branch, resolved the four conflicts, and pushed. bun x tsc --noEmit and bun scripts/gate.ts are clean, and test/game-spark.test.ts and test/game-spark-view.test.ts pass. Of the other three suites I ran (test/tui-games.test.ts, test/no-polling.test.ts, test/security-floor-routes.test.ts), only test/game-spark-view.test.ts failed, which I fixed and re-ran. I did not re-run those three after the fix or run the full suite; the forge's check does that on this push.
The conflict: main had landed #18096, a thread-list page at the same route, /games/<box>/spark/<key>, plus a terminal screen for it. This pull builds a fuller page for that route: findings, flame graph, slowest ticks, time per mod, and GC and memory.
What I kept from each side:
- Route and screens:
/games/<box>/spark/<key>now serves this pull's page, andpthenenteron the terminal opens this pull's screen. I deletedmain'sgameSparkViewpage and itsprofileScreenthread screen. - Thread list: both the page and the terminal screen show the threads, busiest first, escaped, so that part of #18058 survives.
- Decode limit: both decode with
READ_UNPACKED, so a hostile profile is still refused past 8 MiB unpacked. - Wording: an unreadable profile now says "is not a readable one: download it", as
main's tests expect. - Docs:
docs/features/game-spark.mddescribes the one page.
Test changes:
- I removed the assertions for "The call tree and flame graph are not shown here", which is no longer true.
- I updated one assertion in
test/game-spark-view.test.tsto the new unreadable-profile wording. - I dropped the duplicate
/games/:box/spark/:keyentry fromtest/no-polling.test.ts.
To try it: store a sampler profile in a box and open /games/<box>/spark/<key>.
[{"go":"/games/<box>/spark/<key>","look":"The Threads section after the flame graph","expect":"Threads listed busiest first with ms sampled, names escaped"},{"go":"/games/<box>/spark/<key> for a heap profile","look":"The notice","expect":"Says it is not a readable one and links to download it"}]
🤖 Generated with Claude Code
API Error: 402 This request requires more credits, or fewer max_tokens. You requested up to 128000 tokens, but can only afford 4000. To increase, visit https://openrouter.ai/workspaces/default/keys/b36b4d5ca03526e2ce9b015c94d62cc19d23669897752807e5fe44ac6efc00fd and adjust the key's monthly limit
Declined: already done on main in 5ce50ab8d. That commit (#18211, "spark profile call tree and flame graph on the forge") adds the same feature this pull builds, and I did not push a merge. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m90shv97dmmafdth01253nqa Left open: someone has spoken on this pull.
Declined: already done on main in 5ce50ab8d. That commit (#18211) adds the same spark profile page, flame graph and terminal call tree this pull builds, and I did not push a merge. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m90srv97t86g5hp66p7ap7m7 Left open: someone has spoken on this pull.
The builder found nothing to change, and the check of this head (bd5f046410e2) is red again after a re-check:
check failed: does not merge into main: conflicts in docs/features/game-spark.md, src/games/spark_view.ts, src/tui/screens/game_spark.ts, src/tui/screens/game_spark_view.ts, src/web/pages/games_spark_ failed: does not merge into main: conflicts in docs/features/game-spark.md, src/games/spark_view.ts, src/tui/screens/game_spark.ts, src/tui/screens/game_spark_view.ts, src/web/pages/games_spark_view.ts, test/game-spark.test.ts, test/tui-games.test.ts
It stays open for a person or a new head.
This pull now merges into main and adds what main still lacks: the slowest ticks, time per mod, GC and memory, and the mods listed, on both the web page and the terminal screen. tsc, the gate and the touched tests pass. The touched tests are games-spark-view, tui-games, game-spark, games-spark-profile, no-polling and parity. I did not run the whole suite; the forge runs it on this push.
What I did about the conflicts. main shipped #18211 with the same page, flame graph and terminal call tree this pull built. So I kept main's version of every conflicted file and dropped my duplicates: my flame layout, the CSS, my duplicate test and the extra budget fixture.
What changed on top of main:
summarySectionsinsrc/games/spark_view.tsreturns the four sections as plain lines.src/web/pages/games_spark_view.tsrenders those sections as rows under the threads.src/tui/screens/game_spark_view.tsappends the same lines to the terminal screen.test/games-spark-view.test.tshas a new test that checks every terminal line appears on the page.docs/features/game-spark.mdsays so.- The test fixture is now shared through
test/helpers/spark_fixture.ts, which also trimstest/games-spark-profile.test.ts.
What I left out:
- The findings list that linked to a slow frame. It depended on the flame-frame ids of my own layout, which
maindoesn't have. The docs list it under "Not done". - Comment rewraps I had made in files this pull doesn't own; I reverted them.
To try it, open /games/<box>/spark/<key> with a grant on the box, or press p then Enter on the box's terminal screen.
[{"go":"/games/<box>/spark/<key>","look":"Under the thread flame graphs: Slowest ticks, Time per mod, GC and memory, Mods listed","expect":"Each section is a list of rows; an empty one says so in one line; the terminal screen shows the same lines"}]The four new sections on a spark profile are now structured rows, and both feedback points are addressed.
What changed
- Structured rows.
SparkSectioninsrc/games/spark_view.tsnow holdsrows, each atitleplusfacts(label and value pairs), and anemptysentence for a section with no rows.- Slowest ticks: one row per window with Worst tick, Median, TPS, Ticks and Players. Players is a plain count, so the "1 players" wording is gone.
- Time per mod: one row per mod with Share and Time.
- GC and memory: one row per collector, then Heap, Non-heap and Machine memory, each with Used and Total.
- One row per mod. "Mods listed" has a row per mod with its name as the title and a Version fact, so nothing becomes a comma-joined wall of text at 360px.
- Page.
src/web/pages/games_spark_view.tsdraws each row withrow({ title, facts }), which renders adl.row-facts. An empty section shows itsemptysentence. - Terminal.
sectionLinesjoins the same rows asTitle: Label value, Label value, so the terminal still shows what the page shows. - Thread note. "N more threads not drawn" now comes straight after the thread sections and before the new ones. A test checks that order.
- Test. The test checks that every row title and every
<dt>/<dd>pair is on the page.
I ran the spark view tests, tsc, design-lint and the gate, and all passed. I did not run the full suite, and I did not look at a rendered profile in the preview; the page assertions come from the test's rendered HTML for the fixture profile.
Not done
- The finding link to a slow frame is still listed under Not done in the how-to; I took it as the next round, as you said.
- I did not update
docs/features/game-spark.mdto the new row format.
[
{"go": "/games/<box>/spark/<key> for a stored profile", "look": "Slowest ticks, Time per mod, GC and memory, Mods listed", "expect": "Each is a list of rows with a title and label/value facts; Mods listed has one row per mod with a Version"},
{"go": "same page, a profile with more than 10 threads", "look": "the 'more threads not drawn' note", "expect": "It sits directly under the thread sections, above Slowest ticks"},
{"go": "same page at 360px wide", "look": "Mods listed", "expect": "No long wrapped line; each mod is its own row"}
]
🤖 Generated with Claude Code
I merged main into the branch, resolved the five conflicts and pushed. tsc and design-lint are clean. I ran the spark, games-terminal and game-mods test files and they pass. I did not run the full suite; the forge runs that on the push.
main had added its own slowest-ticks and time-per-mod tables (#18237), which overlap with the structured sections this pull already had. I kept this pull's sections for both web and terminal, with ticks and mods as the first two, then GC and memory, then mods listed. I deleted src/web/pages/games_spark_ticks.ts, since nothing uses it any more.
What changed against main's version:
- Both doors now show the slowest ticks and per-mod time in this pull's row format (for example
80 ms,100%) rather thanmain's80.0 msand100.0%columns. - The empty-state wording is now "The profile attributes no time to a mod." in place of "This profile has no mod data…".
- I kept
main's test for a hostile mod name being escaped and adapted its expected strings to the new format. - I updated one assertion in
test/tui-games.test.tsfor the new empty-state wording.
gate.ts notes one comment line over 100 columns in test/tui-games.test.ts. I did not run --fix, and the gate says the nightly rewrap handles it on main.
/games/<box>/spark/<key>now shows a stored spark profile on the forge, and the box's Profiles list links to it. I ran the new page test, the existing spark tests, the dead-code, hollow, doorless, feature-doors and empty-states tests,tsc --noEmit, the design lint and the gate; all pass. I did not run the full suite.What the page shows
#id, and the target frame is highlighted./games/<box>/@spark/<key>, and the page links to it.Terminal door: Enter on a profile in the box's
pscreen openssrc/tui/screens/game_spark_view.ts. It shows the same findings, an indented frame tree, ticks, per-mod time, GC and memory.docs/features/game-spark.mdanddocs/design/areas/games.md(.flame) are updated.Reuse and tests
spark_profile.ts),boxOf,profileOf, and the existing page components.src/games/spark_view.ts(frame layout and findings, shared by page and terminal), the page, and the terminal screen.test/game-spark-view.test.tsbuilds a profile with a<script>in a class name, checks the escaping and the grant check, and checks that every finding link lands on a frame id on the page. The profile builder moved totest/helpers/spark_fixture.ts;games-spark-profile.test.tsnow imports it.test/game-spark.test.tsexpected the box page to link to/@spark/, and the link is now/spark/. It still checks that the raw URL opens.Left out or different from the issue
Review
To try it: post a spark profile to a box's upload address, open
/games/<box>, and click the profile under Profiles.Gate notes: a "Looks:" or "No look:" line was suggested for the page change, and I did not add one. Two comment lines over 100 columns in
games_routes.tsandgames.tswere left for the nightly rewrap.Closes #18140