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

Spark profile: each slowest-tick row has an id the box page can link to, and a finding carries its profile key and tick window #18281

opened this

Closed 23h 23m ago

Each slowest-tick row on /games/ /spark/ now has id="tick- ", and a finding read from a spark profile carries profileKey and tickWindow. tsc is clean, the spark view and terminal games tests pass, and bun scripts/gate.ts --fix and design-lint left nothing to fix.

Notes

opened this

Each slowest-tick row on /games/<box>/spark/<key> now has id="tick-<window>", and a finding read from a spark profile carries profileKey and tickWindow. tsc is clean, the spark view and terminal games tests pass, and bun scripts/gate.ts --fix and design-lint left nothing to fix. I did not run the full suite; the forge runs it on the push. I edited neither src/web/pages/games.ts nor src/games/chat.ts.

  • Rows: summarySections in src/games/spark_view.ts sets each row's id through a new tickId(window), and src/web/pages/games_spark_view.ts renders it.
  • Finding: Finding gets the optional profileKey and tickWindow, set only by the new src/games/spark_finding.ts. profileFinding looks the key up in the box's own profiles, so another box's key gives no finding, and a finding with no profile is unchanged. It is raised when the worst window ran past 50 ms (a tick at 20 TPS).
  • Both doors: the page shows the finding with a "See the window" link to #tick-<window>, and the terminal profile screen shows the same line. docs/features/game-spark.md has the how-to.
  • Test: the new test in test/games-spark-view.test.ts checks that every slowest-tick row has its id and that the finding's key and window match a real row. It also checks the link and that a key from another box, or no slow ticks, gives no finding. Without the change it would fail.
  • Not done: only the worst window is flagged, not every window over budget. The flame graph still doesn't zoom. I added no dependency.
  • Look gate: no page in app.looks reaches this route, because it needs a seeded box with a profile. That gap is recorded in commit ad891d436.
  • Last commit: TICK_BUDGET_MS was exported but called nowhere else, so I made it private to avoid the "dead code" check.

To try it, open a box's profile page for a profile with a tick over 50 ms and follow "See the window".

[{"go":"/games/<box>/spark/<key>","look":"The finding line above the sections, then the Slowest ticks rows","expect":"The finding names the key and window; See the window jumps to the matching row, whose id is tick-<window>"}]

🤖 Generated with Claude Code

Closes #18265

commented

Each slowest-tick row on /games/<box>/spark/<key> now has id="tick-<window>", and a finding read from a spark profile carries profileKey and tickWindow. tsc is clean, the spark view and terminal games tests pass, and bun scripts/gate.ts --fix and design-lint left nothing to fix. I did not run the full suite; the forge runs it on the push. I edited neither src/web/pages/games.ts nor src/games/chat.ts.

  • Rows: summarySections in src/games/spark_view.ts sets each row's id through a new tickId(window), and src/web/pages/games_spark_view.ts renders it.
  • Finding: Finding gets the optional profileKey and tickWindow, set only by the new src/games/spark_finding.ts. profileFinding looks the key up in the box's own profiles, so another box's key gives no finding, and a finding with no profile is unchanged. It is raised when the worst window ran past 50 ms (a tick at 20 TPS).
  • Both doors: the page shows the finding with a "See the window" link to #tick-<window>, and the terminal profile screen shows the same line. docs/features/game-spark.md has the how-to.
  • Test: the new test in test/games-spark-view.test.ts checks that every slowest-tick row has its id and that the finding's key and window match a real row. It also checks the link and that a key from another box, or no slow ticks, gives no finding. Without the change it would fail.
  • Not done: only the worst window is flagged, not every window over budget. The flame graph still doesn't zoom. I added no dependency.
  • Look gate: no page in app.looks reaches this route, because it needs a seeded box with a profile. That gap is recorded in commit ad891d436.
  • Last commit: TICK_BUDGET_MS was exported but called nowhere else, so I made it private to avoid the "dead code" check.

To try it, open a box's profile page for a profile with a tick over 50 ms and follow "See the window".

[{"go":"/games/<box>/spark/<key>","look":"The finding line above the sections, then the Slowest ticks rows","expect":"The finding names the key and window; See the window jumps to the matching row, whose id is tick-<window>"}]

🤖 Generated with Claude Code

commented

Declined: already done on main in bb053710c. That commit, "A spark finding on the games page links to the slow tick it came from (#18241)", landed the same change. The merge conflicts were not in separate lines; the two sides added the same feature in the same files. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m91cwethjnc0re3gbprnamk1

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs