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

small: an imported session's row in /traces opens its page #18379

opened this

Merged 3h 38m ago, live in production

An imported session's row in /traces now links to /traces/ , the same as a Talk row. I ran test/traces-kinds.test.ts and test/traces-tui.test.ts, which pass, plus tsc --noEmit and bun scripts/gate.ts --fix, which were clean. I did not run the full suite.

Notes

opened this

An imported session's row in /traces now links to /traces/<id>, the same as a Talk row. I ran test/traces-kinds.test.ts and test/traces-tui.test.ts, which pass, plus tsc --noEmit and bun scripts/gate.ts --fix, which were clean. I did not run the full suite.

  • List: src/trace/list.ts gives every index row href: traceHref(t.id), and the href field comment no longer says "none for an imported session".
  • Page and docs: I removed the "no page yet" comment in src/web/pages/traces.ts. In docs/features/traces.md the sentence now says a Talk row and an imported row both open /traces/<id>.
  • Terminal, which the issue didn't list: Enter on an imported row toasted "an imported session has no page yet", which was now false. I removed that branch in src/tui/screens/traces.ts, so Enter does what it does on a Talk row.
  • Tests:
    • test/traces-kinds.test.ts now expects the importer's imp1 row to carry href="/traces/imp1", and expects that href in the page and in the list's row data. It also expects that the other user's page has no such row or link.
    • test/traces-tui.test.ts now expects Enter on the imported row to say the trace is on the web at /traces/imp1.

I didn't touch the list's gate: an imported row still shows only to its owner. I added no function, so there was nothing to reuse. The push hook asked for a "Try:" commit line, so the last commit is an empty one that says how to try it.

Review

[{"go":"/traces","look":"the row of an imported session you own","expect":"it is a link that opens /traces/<id>, as a Talk row does"},{"go":"/traces","look":"signed in as another user","expect":"no row and no link for that session"}]

🤖 Generated with Claude Code

Closes #18375

5 earlier comments
commented

<!-- look-pages e238996de5e0 --> Look pages for e238996, from the gate:

  • look pages (none): this pull changes src/web/pages/traces.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 28 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
commented

An imported session's row in /traces now links to /traces/<id>, the same as a Talk row. The gate's look-pages note couldn't work out which page this change touches. I added a Looks: /traces line in a new commit message to name it, and pushed. I haven't seen the gate's verdict on it.

  • List: src/trace/list.ts gives every row, imported ones included, href: traceHref(t.id). The list's gate is unchanged, so only the importer sees the row.
  • Terminal: the Traces screen no longer says "an imported session has no page yet". Enter on an imported row now says the trace is on the web at /traces/<id>, like a Talk row.
  • Docs: docs/features/traces.md no longer says an imported row is plain text.
  • Tests: test/traces-kinds.test.ts and test/traces-tui.test.ts cover the link, the other user's list having no such row, and the terminal message. Both files pass, and tsc --noEmit and bun scripts/gate.ts --fix were clean. I did not run the full suite.

I added no function, so nothing from bun scripts/similar.ts applied.

Review

[{"go":"/traces","look":"the row of an imported session you own","expect":"it is a link that opens /traces/<id>, as a Talk row does"},{"go":"/traces","look":"signed in as another user","expect":"no row and no link for that session"}]

🤖 Generated with Claude Code

commented

<!-- look-pages 913413f5b57f --> Look pages for 913413f, from the gate:

  • look pages (none): "Looks: /traces" is not a page of app.looks in forge.json; this pull changes src/web/pages/traces.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 28 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
commented

The check's one failure looks unrelated to this pull, so I changed no code. I pushed an empty commit to run the check again.

The failing test is "N+1: a pull's crew activity does not cost more as its agent runs grow" in test/surfaces-adversarial.test.ts. It counts database statements on a pull page (107 expected, 105 received). This pull only changes /traces rows, the Traces terminal screen and the docs, and none of that is on the pull page's path.

  • Local runs: the test passed in three runs in a row.
  • Check log: the log itself says the test is green on main at fc3efe0 in 3 runs, so the check treated it as red for this pull.
  • Cause: I couldn't find one. The two-statement difference between the small and large runs looks like a timing-dependent cache effect, but I haven't confirmed that.

If it fails again, the flaky count in that test needs its own issue. This pull's description is unchanged: an imported session's row in /traces opens /traces/<id>, on the page and in the terminal, with tests for the link, the other user's list and the terminal message.

🤖 Generated with Claude Code

commented

<!-- look-pages 9e989e37a9ed --> Look pages for 9e989e3, from the gate:

  • look pages (none): "Looks: /traces" is not a page of app.looks in forge.json; this pull changes src/web/pages/traces.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 28 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
commented

An imported session's row in /traces now opens its page at /traces/<id>, the same as a Talk row. The gate rejected my earlier Looks: /traces line because /traces isn't in app.looks in forge.json. I pushed a commit with a No look: line instead, and I haven't seen the gate's verdict on it.

I didn't add /traces to app.looks, because that list is the reviewer's call and this change only adds a link to a row. The page isn't covered by a look, so someone needs to open it by hand.

  • List: src/trace/list.ts gives every row, imported ones included, href: traceHref(t.id). The list's gate is unchanged, so only the importer sees the row.
  • Terminal: the Traces screen no longer says "an imported session has no page yet". Enter on an imported row now says the trace is on the web at /traces/<id>, like a Talk row.
  • Docs: docs/features/traces.md and the comment in src/web/pages/traces.ts no longer say an imported row is plain text.
  • Tests: test/traces-kinds.test.ts and test/traces-tui.test.ts cover the link, another user's list having no such row, and the terminal message. Both files pass.

Check failure: the earlier failure in surfaces adversarial: web > N+1: a pull's crew activity does not cost more as its agent runs grow is on the pull page, which this pull doesn't touch. It passed three times here, and the check log says it is green on main. I changed no code for it and re-ran the check with an empty commit.

Review

[{"go":"/traces","look":"the row of an imported session you own","expect":"it is a link that opens /traces/<id>, as a Talk row does"},{"go":"/traces","look":"signed in as another user","expect":"no row and no link for that session"}]

🤖 Generated with Claude Code

Sign in to join this conversation.

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

Keyboard shortcuts

Docs