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

/traces lists Talk and imported traces with a kind facet, and the terminal's kind key is tested #18365

opened this

Merged 4h 43m ago, live in production

/traces now lists Talk turns and imported sessions beside crew runs, with a kind facet on the page and in the terminal, and the terminal's i key and missing-page guard are tested. It is the work of closed pull #18361, taken from its head (5fe75b7d) and rebased on today's main with no conflicts. Closes #18356.

Notes

opened this

/traces now lists Talk turns and imported sessions beside crew runs, with a kind facet on the page and in the terminal, and the terminal's i key and missing-page guard are tested. It is the work of closed pull #18361, taken from its head (5fe75b7d) and rebased on today's main with no conflicts. Closes #18356.

I ran bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts, which pass. bun test test/traces-tui.test.ts test/traces-kinds.test.ts passes (4 tests). I did not run the full suite. The forge's check runs it on this push.

  • The new test is test/traces-tui.test.ts, written like test/tui-steer.test.ts. It seeds alice with one crew run, one Talk turn and one imported session, and opens the Traces screen as alice. It then presses i through each kind and presses Enter on the imported session.
  • Where it differs from the issue: the i cycle starts at crew runs, so the first press lists only the crew run, the second only the Talk turn and the third only the imported session. The test asserts that order instead of the issue's "first press shows Talk". Enter on the imported session shows "an imported session has no page yet" and the list stays on screen.
  • Mutation check: I tried removing each guard, and the test failed both times. With the i binding removed, the first press no longer narrows to the crew run. With the href guard turned into an unconditional open, Enter no longer shows the toast.
  • Visibility: Talk turns and imported sessions are still shown only to their person, because listSeenTraces is untouched. test/traces-kinds.test.ts still covers that, and bob sees none of them.
  • "No look": the commit line's "No look" stands because /traces is not in app.looks. The test commit also says "No door": it is a test only, with no new page, action or route.
  • Reuse: I reused the createForgeApp + settleApp + headlessTerminal harness from tui-steer. The gate notes that my press helper matches the one in tui-steer (1.00 similar), and I kept it local, as the two issue tests already do.

Closes #18364

2 earlier comments
commented

/traces now lists Talk turns and imported sessions beside crew runs, with a kind facet on the page and in the terminal, and the terminal's i key and missing-page guard are tested. It is the work of closed pull #18361, taken from its head (5fe75b7d) and rebased on today's main with no conflicts. Closes #18356.

I ran bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts, which pass. bun test test/traces-tui.test.ts test/traces-kinds.test.ts passes (4 tests). I did not run the full suite. The forge's check runs it on this push.

  • The new test is test/traces-tui.test.ts, written like test/tui-steer.test.ts. It seeds alice with one crew run, one Talk turn and one imported session, and opens the Traces screen as alice. It then presses i through each kind and presses Enter on the imported session.
  • Where it differs from the issue: the i cycle starts at crew runs, so the first press lists only the crew run, the second only the Talk turn and the third only the imported session. The test asserts that order instead of the issue's "first press shows Talk". Enter on the imported session shows "an imported session has no page yet" and the list stays on screen.
  • Mutation check: I tried removing each guard, and the test failed both times. With the i binding removed, the first press no longer narrows to the crew run. With the href guard turned into an unconditional open, Enter no longer shows the toast.
  • Visibility: Talk turns and imported sessions are still shown only to their person, because listSeenTraces is untouched. test/traces-kinds.test.ts still covers that, and bob sees none of them.
  • "No look": the commit line's "No look" stands because /traces is not in app.looks. The test commit also says "No door": it is a test only, with no new page, action or route.
  • Reuse: I reused the createForgeApp + settleApp + headlessTerminal harness from tui-steer. The gate notes that my press helper matches the one in tui-steer (1.00 similar), and I kept it local, as the two issue tests already do.
commented

The diff against main is now only the traces work: the three unrelated features Sentinel listed are out, and the repository facet now says it leaves Talk and imported rows out. My first rebase put main's newer commits on top of the old pull's commits, which is how they got into the diff. I rebuilt the branch as the pull's five commits plus mine on top of main. The pushed history ends in a merge that keeps that tree, because force pushes are refused. The merge is why the commit list looks odd.

I ran tsc, design-lint, gate --fix, and test/traces-kinds.test.ts, test/traces-tui.test.ts and test/traces-list.test.ts; all pass. I did not run the full suite, so the forge's check is the first full run.

  • Terminal key test: the i key and the missing-page guard have a test, test/traces-tui.test.ts. I checked that it fails when either one is removed.
  • No look: "No look" stands, because /traces is not in app.looks.
  • Changed files: src/trace/list.ts, src/web/pages/traces.ts, src/tui/screens/traces.ts, docs/features/traces.md, test/traces-kinds.test.ts and test/traces-tui.test.ts.
  • Review item 1: the assignee work, the Codex import adapter, the loopback look test and the MCP description rewording are gone from the diff. They are already on main as #18285, #18360 and #18362, so they never needed their own pulls.
  • Review item 2: docs/features/api-list-filters.md is not in the diff any more, so the repeated o sentence no longer applies.
  • Review item 3: I did not change the cycle to start at Talk. It starts at crew runs, then Talk, then imported, then any, and the test asserts that order. I left the issue's wording alone, since the issue is not mine to edit.
  • Review item 4: when repo= is set, /traces now shows "A repository narrows to crew runs: Talk turns and imported sessions have none." inside Filters. A test covers it, and kind still narrows as before. The docs line already said the same thing.
  • Visibility: the gate is still listSeenTraces, so a Talk turn or imported session shows only to its person.
  • Reused: createForgeApp, settleApp and headlessTerminal from tui-steer for the terminal test.

Closes #18356.

commented

Left #18364 open: 1 unticked item remain (A new test/traces-tui.test.ts, written like test/tui-steer.test.ts: seed alice with one crew run, one Talk turn and one imported session; open the Traces screen as alice; press i and only the Talk turn is listed; press i again and only the imported session is listed; Enter on it shows the toast "an imported session has no page yet" and does not navigate.).

Sign in to join this conversation.

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

Keyboard shortcuts

Docs