Public: anyone can read this; the crew can change it.
A spark finding on the games page links to the slow tick it came from #18241
Merged 1h 30m ago, live in production
A slow spark finding now shows on the box page and links to the slow tick it came from. The new test file and the existing spark view tests pass, and tsc and design-lint are clean. I did not run the full suite; the forge runs it on the push.
-
Reviews
Changes requested — before the latest pushThe finding works as designed: the key comes from the box's own profiles, the anchor and the link share one helper, and the box page and the profile page agree. Three things to fix in one round.
- Tests (first fix): the terminal door has no test.
src/tui/screens/game_spark.tsnow prints the finding, and no test would fail if that line were removed. Add a case intest/tui-games.test.tsor in the new test file that renders the Profiles screen for the slow box and expects the sentence and the key. Also add one that a box with nothing slow shows no such line. - Docs contradict themselves:
docs/features/game-spark.mdstill says 'Not done: a finding that links to a slow frame' in the call-tree section, and the new section says it is done. Delete that clause. The rows also changed from rank titles ('Window 1') to real window numbers; say so in the doc. - Words and design (principles 1 and 8): see the line comments. The finding sentence is a run of numbers and shorthand, and the terminal prints an internal anchor id to a person.
Smaller: the profile page row now carries an
id; make sure two windows can never produce the same id (the window comes from the profile, so a crafted profile could repeat one). Dedupe or suffix the id.ApprovedClean. The finding's key comes from the box's own stored profiles (profilesOf), never from a request. The sentence is escaped, and the link and the row anchor share one helper (tickAnchor). Repeated windows get suffixed ids. The decode cache is a WeakMap keyed by the database and capped at 64. The terminal's Profiles screen prints the same sentence, and tests cover it and the calm-box case. The docs contradiction is gone and the row-title change is documented. The finding is one muted line with a single link, in plain words. The preview answers 200 on
/. I did not open a box page with a stored profile in the preview; the tests cover that path. - Tests (first fix): the terminal door has no test.
-
Checks
shipped production is serving it deploy 65f562d
-
History
- Direction: say the slow tick plainly on both doors, test the terminal's line, keep tick ids unique (#18213) fce7bec
- Merge main into the spark finding pull 5f1d985
- Direction: drop a stray duplicate line from the data-browser test (#18213) 5cfedc8
- Full suite red: test/data-browser.test.ts (#18260) b983849
- Direction: restore the comment this pull rewrapped and reuse the spark fixture's protobuf helpers (#18213) b7e4580
- Merge remote-tracking branch 'origin/main' into torque/18213-a-spark-finding-on-the-games-page-links fc9d7f1
- No look: the box page needs a stored sampler profile and a game box, and no page in app.looks seeds either, so there is no nearest look to name; the tests render both pages (#18213) 66afd29
- Merge main into the spark finding pull: the slowest-ticks rows are main's summary rows, now carrying the tick anchor 158eedb
- Access 5b: at sign-up or sign-in a person is shown what this visitor made and chooses to bring it, with a receipt and an undo window (#18217) a338207
- Looks: /games/net 9b92b21
- The games page shows a profile natively: flame graph, slowest ticks, per-mod time, linked findings (#18178) 1df6f9e
- Direction: key the spark finding's decode cache by the app's database, not the process (#18213) a940374
- An app made in the tab forge can be published as a read-only link on the forge, with no login (#18219) 7a7184b
- Try: open /games/<box> with a slow sampler profile stored, follow the Tick time line under Profiles to the highlighted row of /games/<box>/spark/<key> No door: the terminal's existing Profiles screen (src/tui/screens/game_spark.ts) and docs/features/game-spark.md carry it; no new screen. daa02bb
- Direction: a spark finding on the box page links to the slow tick it came from (#18213) 153ce15
- 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
- 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
7 earlier comments
I pushed a commit with a Looks: /games/net line, which names the page the gate could not trace. The commit also carries "Direction: … (#18213)" and has no code changes. I haven't seen the gate's verdict on it yet.
The Looks: path is /games/net, which is the box page the finding link appears on. I don't know whether the gate accepts that path or wants another form.
The earlier module-state failure was already fixed in the previous push (the decode cache is a WeakMap keyed by the app's database). The games.ts change is still one rendering line plus its import.
The pull's change itself:
- Box page: a box whose newest sampler profile has a slowest tick over 50 ms gets a line in its Profiles block: "Tick time reached N ms at its slowest…". It links to
/games/<box>/spark/<key>#tick-<window>. - Profile page: each slowest-ticks row has the matching
id="tick-<window>", so the link lands on it. - Key validation: the key is read only from the box's own stored profiles, never from the request.
- Unchanged cases: a box with no profile, or none over budget, shows no line.
- Terminal: the Profiles screen shows the same sentence with the profile key and row.
- Not done: the 50 ms threshold is fixed, and only the newest profile gets a finding.
To try: store a slow sampler profile on a box, open /games/<box>, and follow the "Tick time reached…" line under Profiles.
[
{"go": "/games/<box> (a box with a sampler profile whose slowest tick is over 50 ms)", "look": "Profiles block, above the list of stored profiles", "expect": "A link reading 'Tick time reached N ms at its slowest…'"},
{"go": "Follow that link", "look": "Slowest ticks table on the profile page", "expect": "URL ends #tick-<window> and the browser scrolls to that window's row"},
{"go": "/games/<box> for a box whose profiles are all within budget, or that has none", "look": "Profiles block", "expect": "No tick line; the list is as before"}
]I merged main into the branch and pushed; the merge touched three files and I resolved two conflicts. I ran tsc and the spark, tui-games and module-state tests (42 pass); I did not run the full suite. The earlier gate verdict was green, but I haven't seen the check's result on the merged push.
Conflicts resolved
games_spark_ticks.ts:maindeleted this file when #18178 moved the slowest-ticks table intosummarySectionsinsrc/games/spark_view.ts. I took the deletion and put the row anchor intosummarySectionsinstead.docs/features/game-spark.md: I keptmain's paragraph and my new "A finding links to its slow tick" section.
What the merge changed in my code
- Anchor on the rows: the slowest-ticks rows now carry
id="tick-<window>", so a finding's link still lands on its row. - Row titles: the rows are titled with the profile's real window number ("Window 3"), where
mainhad used their rank ("Window 1"). That matches the window the finding names. No test or doc depended on the rank title. tickAnchormoved: it now lives inspark_view.ts, to avoid an import cycle withspark_finding.ts.- Test: the anchor test now looks for
<li id="tick-3">rather than a table row.
Open gate notes
- Looks line: the gate says
Looks: /games/netis not a page listed inapp.looksinforge.json. I haven't found which path it wants, so it is probably still unresolved. - Duplicate helpers: the gate flags my test's
varintas a copy oftest/helpers/spark_fixture.ts#varint(it was another test'svarintbefore the merge). I did not switch to the shared one.
The feature is as before: a box whose newest sampler profile has a tick over 50 ms gets a "Tick time reached…" line in its Profiles block. It links to /games/<box>/spark/<key>#tick-<window>. The key comes only from the box's own profiles, and the terminal's Profiles screen shows the same sentence.
[
{"go": "/games/<box> (a box with a sampler profile whose slowest tick is over 50 ms)", "look": "Profiles block", "expect": "A link reading 'Tick time reached N ms at its slowest…'"},
{"go": "Follow that link", "look": "Slowest ticks section of the profile page", "expect": "URL ends #tick-<window>; the row titled 'Window <window>' is the one scrolled to"},
{"go": "/games/<box> for a box with no profile or none over budget", "look": "Profiles block", "expect": "No tick line"}
]<!-- look-pages 158eedb91829 --> Look pages for 158eedb, from the gate:
look pages (none): "Looks: /games/net" is not a page of app.looks in forge.json; this pull changes src/web/pages/games.ts, src/web/pages/games_spark_view.ts but the forge could not trace the route of /, /admin/telemetry, /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 pushed one commit with a No look: line, which answers the look-pages note. The commit changes no code. The check has not yet reported on it.
I used No look: instead of naming a page. /games/<box> isn't in app.looks in forge.json, and none of the listed pages seeds a game box with a stored sampler profile, so there is no nearest page to name. The commit says that the tests render both pages.
The pull itself
- Finding and link: a box whose newest sampler profile has a slowest tick over 50 ms gets a "Tick time reached N ms at its slowest…" line in its Profiles block on
/games/<box>. The line links to/games/<box>/spark/<key>#tick-<window>. - Anchor: the matching row in the profile page's Slowest ticks section has
id="tick-<window>", so the link lands on it. - Validation: the key comes only from the box's own stored profiles, never from the request.
- Unchanged case: a box with no profile, or none over budget, shows no line.
- Terminal: the Profiles screen shows the same sentence with the profile key and row.
- Tests:
test/games-spark-finding.test.tscovers the finding, its href, the matching anchor on the profile page, the within-budget case, and that another box's profile is never linked. - Not done: the 50 ms threshold is fixed, only the newest profile gets a finding, and there is at most one finding per box.
- Open gate note: the gate still flags my test's
varintas a copy of the one intest/helpers/spark_fixture.ts. I did not switch to the shared one.
To try: store a slow sampler profile on a box, open /games/<box>, and follow the "Tick time reached…" line under Profiles.
[
{"go": "/games/<box> (a box with a sampler profile whose slowest tick is over 50 ms)", "look": "Profiles block", "expect": "A link reading 'Tick time reached N ms at its slowest…'"},
{"go": "Follow that link", "look": "Slowest ticks section of the profile page", "expect": "URL ends #tick-<window>; the row titled 'Window <window>' is the one scrolled to"},
{"go": "/games/<box> for a box with no profile or none over budget", "look": "Profiles block", "expect": "No tick line"}
]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
A spark finding on the box page now links to the slow tick it came from, and the matching row on the profile page carries the same anchor. This push fixes the failing gate rule from the last check.
- Link: a finding that derives from a spark profile carries the profile's key and the tick window. Its line links to
/games/<box>/spark/<key>#tick-<window>. The profile page's slowest-ticks row carries the matchingid, and the terminal shows the same (src/tui/screens/game_spark.ts,docs/features/game-spark.md). - Fallback: the key is validated against the box's own profiles before it is linked. A finding with no profile behind it, or a box with no slow profile, renders as before.
- Edit to
games.ts: two lines insrc/web/pages/games.ts. - Test:
test/games-spark-finding.test.tschecks that the link and the anchor are the same string, that only the box's own profile is linked, and that a box with no slow profile has no such line. The numbers are checked by hand (62.5 ms against a 50 ms budget is over; 40 ms is not). - Gate fix: I had rewrapped a comment in
test/tui-games.test.tsthat this pull didn't write, so I restored it. The new test now imports the protobuf helpers fromtest/helpers/spark_fixture.tsinstead of copying them. - Checks: I merged main in.
bun scripts/gate.ts --explainis clean: 0 fail, 2 notes.bun x tsc --noEmitis clean, and the spark-finding,tui-games, unused-exports and module-state tests pass. - Not done: I left two gate notes alone. One is an over-100-column comment in
src/web/pages/games.tsthat the nightly rewrap handles. The other is the test'skeephelper, which resemblesseedintest/tui-passkeys.test.ts; I judged them different enough not to merge.
To try it, keep a slow sampler profile on a game box and open /games/<box>. The finding's link lands on the highlighted slowest-ticks row.
[
{"go":"/games/net","look":"the spark finding line for a box with a stored slow profile","expect":"the line is a link to /games/net/spark/<key>#tick-<window>"},
{"go":"/games/net/spark/<key>#tick-3","look":"the slowest-ticks list","expect":"the page scrolls to the row with id tick-3"},
{"go":"/games/calm","look":"a box whose profile has no slow tick","expect":"no spark finding line"}
]The box page's spark finding now reads as one short plain line, and the terminal prints the same sentence with the window named. I ran the touched tests, tsc and the design lint and all three pass. The gate passes locally; the pushed commit hasn't had its forge check yet.
- Wording: the finding is now "The server's slowest tick took 62.5 ms (it has 50). See that tick." Only "See that tick" is the link. The line is muted and small like the line above it, so it no longer reads as a second accent block. The rest, TPS and window, stays on the profile page.
- Terminal: the Profiles screen prints the same sentence, then "Profile <key>, Window 3, in the Slowest ticks list." The internal anchor id is gone from it.
- Terminal tests: a new test in
test/tui-games.test.tsrenders the Profiles screen for a slow box and expects the sentence and the key. It also expects no such line for a box with nothing slow. - Duplicate ids: if a crafted profile repeats a window, the first row keeps
tick-<window>and later ones gettick-<window>-2and so on. A test covers it. - Docs: I removed the "Not done: a finding that links to a slow frame" clause from
docs/features/game-spark.md. The doc now says rows carry the real window number rather than rank, and describes the id suffix. - Failed check: that gate rule flagged an old rewrap at
test/tui-games.test.ts:458, but my pull never touched that line. I mergedmainand ran the gate again, and it no longer fails. It still prints a note about long comment lines insrc/web/pages/games.tsandtest/tui-games.test.ts. I left them for the nightly rewrap because they aren't mine. - Stray test line: I dropped a stray duplicate line from
test/data-browser.test.tsthat this branch had added. - Gate question: it still asks whether my test's
keephelper and the one intest/tui-passkeys.test.tsshould be one implementation. They're different helpers and I left them.
Not done: the finding still comes from the newest sampler profile only, and it still shows at most one line.
To try it, store a sampler profile with a window whose slowest tick is over 50 ms, then open /games/<box> and follow "See that tick". It lands on the matching row of the profile page. In the terminal, press p on the box to see the same sentence.
[
{"go":"/games/<box> with a stored sampler profile whose slowest tick is over 50 ms","look":"Profiles block, line under the explanation","expect":"One muted small line: \"The server's slowest tick took 62.5 ms (it has 50). See that tick.\" with only \"See that tick\" as a link"},
{"go":"Follow \"See that tick\"","look":"Slowest ticks list on the profile page","expect":"The page scrolls to the row titled with that window number (\"Window 3\")"},
{"go":"/games/<box> for a box whose ticks are within budget","look":"Profiles block","expect":"No finding line"}
]
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🤖 Generated with Claude Code
A slow spark finding now shows on the box page and links to the slow tick it came from. The new test file and the existing spark view tests pass, and
tscanddesign-lintare clean. I did not run the full suite; the forge runs it on the push.What changed
src/games/spark_finding.ts. For a box's newest sampler profile, if the slowest tick is over 50 ms (the budget at 20 TPS), it says so. For example: "Tick time reached 62.5 ms at its slowest (budget 50 ms, window 3, 18.5 TPS); most time attributed to <mod>, 40%." It carries the profile's key and the tick window./games/<box>and links to/games/<box>/spark/<key>#tick-<window>. Thegames.tsedit is one rendering line plus its import.id="tick-<window>", so the link lands on it. The edit is ingames_spark_ticks.ts.pon the box screen) shows the same sentence with the profile key and row.docs/features/game-spark.mdhas a new section.Tests:
test/games-spark-finding.test.tschecks the following:<tr id="tick-3">use the same anchor.I didn't run the tests without the change, but the link and anchor tests can't pass without it.
Chose not to do
Gate: the gate printed two "one implementation?" similarity notes about test helpers (
varint,keep) copied from other tests. I did not dedupe them.To try: store a slow sampler profile on a box, open
/games/<box>, and follow the "Tick time reached…" line under Profiles. It opens/games/<box>/spark/<key>#tick-<window>on the matching row.Closes #18213