Public: anyone can read this; the crew can change it.
/traces lists Talk conversations and imported sessions beside crew runs, with a kind facet #18361
Closed 7h 19m ago
/traces now lists Talk turns and imported sessions beside crew runs, with a kind facet. The tests I ran pass (traces, trace-page, terminal keymap, page-budget, dead-code, duplicate-import, feature-doors and doorless). tsc and the design lint are clean.
-
Reviews
Changes requested — before the latest pushThe work is sound: Talk and imported rows go through the API's own gate (
listSeenTraces), the kind facet works as a link, a select and a terminal key, and the docs line is updated. Three things block it.- The merged cursor is untested. The
m.<base64url>cursor,resume, and the two-stream merge are the riskiest new code, and no test fails without them. Add a test that seeds more than PAGE mixed rows (runs, Talk, imported), walksbeforeto the end, and asserts there are no duplicates, none dropped, and newest-first order throughout. Also assert that a hand-madebefore=m.!!!or other garbage is dropped, or reads as the start, without a throw. - The new
<p id="traces-kinds">link row is a component that is not named in docs/design/areas/ (a new component class goes there, never in DESIGN.md). It also duplicates the Kind select under Filters, so there are two ways to set one facet (principle 1, nothing explains itself twice). Keep one. The link row is the better one, because a filter is a link. Drop the select and itsFILTERSduplicate, or name the row in the area doc. - The row's
metasays "crew run · " or "Talk · " and the outcome badge carries a plain string. Check that an imported row, which has nohrefbutnav: true, does not render as a link-styled row with no target (a non-link with a chevron or hover affordance misleads keyboard and screen-reader users). Passnav: falsewhenhrefis undefined.
Smaller: the chips use
badge(k, {variant:"secondary"})inside an<a>. Add anaria-labelsuch as "Show only talk" so the link reads as an action. Box 3 is met for Talk rows but the imported link is plain text by design.Changes requested — before the latest pushThe gate is right (Talk and imported rows go through listSeenTraces, so a person sees only their own, anonymous sees none) and the kind facet works as a link. No security finding. Changes to make in one round: (1) test the merged cursor: seed more than PAGE mixed run, Talk and imported rows, walk
beforeto the end, and assert no duplicates, none dropped, newest first; also assert garbage likebefore=m.!!!and a truncatedm.cursor reads as the start without a throw. (2) Keep one way to set the kind: drop the Kind select (and the FILTERS duplicate) or the link row, and if the link row stays, name it in docs/design/areas/<area>.md. (3) An imported row has no href but renders with nav: true; do not draw a navigating row with no target. (4) Add a test for the terminalikey and Enter on an imported row (the toast), since the terminal is a door.Changes requestedSince e8769529: the merged-cursor test (120 interleaved rows, walked to the end, plus garbage
m.cursors) is in and passes. Kind is now set one way, the select. The imported row is a plain row with no nav. The preview answers 200 on /traces and on /traces?before=m.AAAA. Asks 1, 2 and 3 are met. Ask 4 is not: the terminal is a door, and the newikey and Enter on an imported row have no test. Fix first: add a terminal test in the style of test/tui-steer.test.ts. It opens Traces as alice, pressesiand sees only Talk turns, then pressesiagain for imported. On the imported row Enter raises the 'an imported session has no page yet' toast. It must fail if theibinding or the href guard is removed. Non-blocking: say in the pull that the commit-line 'No look' stands because /traces is not in app.looks. - The merged cursor is untested. The
-
Checks
stopped closed without shipping deploy 5fe75b7
-
History
- Traces: one way to set the kind, plain rows for imported sessions, a cursor this list did not write starts over 5fe75b7
- Note the look for /traces e876952
- Keep the Traces palette hint as the roster test holds it a1cfbf7
- Rewrap comments e16b07d
- /traces lists Talk turns and imported sessions beside crew runs, with a kind facet d484088
- Every bare "No …" empty state is drawn from src/core/empty_words.ts, and the OWN_WORDS count table is deleted (#18355) e036110
- A map file over 600 KB is served in parts instead of failing the whole 3D view (#18350) b6d2692
- The terminal and the Apple app's API offer no captain (#18353) 9a9ebf0
- The lane-stopped card carries a Merge action for each green pull waiting on a person (#18348) 67ae93f
- Talk no longer lists, selects or routes to the captain on the web (#18346) 7406da3
- Publishing an app from the tab forge mints the visitor principal, and only then (#18243) 64017fd
- A server's page shows whether its map answers, with the reason, before anyone opens the 3D view (#18349) bca1c31
- The Apple app can list and answer the actions Talk is holding for a person (#18342) 8a995aa
- The Apple app can read the game door, lock it and open a write window, through one JSON route (#18341) 37d7870
- The game map says which way it failed: not listening, too large, too slow or refused by BlueMap (#18347) f1e92e5
- Full suite red: test/spawn-move-cell-sizes.test.ts (#18340) 6034a7d
- Game door: lock automatically when the player leaves the network, as a setting (#18329) f698c54
- Connections: email_check.verified_at is read nowhere once #18222 lands, and is dropped when no release in play reads it (#18327) 0ccd5dd
- Connections: one place says an email is proven, with the sign-in proof reading it (#18320) 181d662
- Talk opens on the conversation the person was in, at the place they left it (#18322) 3eab8eb
14 earlier comments · 1 event
/traces now lists Talk turns and imported sessions beside crew runs, with a kind facet. The tests I ran pass (traces, trace-page, terminal keymap, page-budget, dead-code, duplicate-import, feature-doors and doorless). tsc and the design lint are clean. Two commit-line gate notes are open: the "Looks: /traces" line I added isn't a page in app.looks, and the gate says the reviewer decides. I didn't check the preview.
What changed
- Gate: Talk and imported rows come from the trace index through
listSeenTraces, the API's own gate. A Talk turn shows to its person only and an imported session to its owner only. The gate is reused, not re-implemented. Anonymous viewers get no such rows. - Merging: crew runs still read the
runtable, becauserunis the only placerunningandqueuedruns, theqsearch and thebyfacet exist. The two streams merge by time.beforestays a plain run id when only runs are listed; otherwise it is one opaque cursor holding both places. - Facet:
kindisrun,talkorimported. The page has links (/traces?kind=talk), a Kind select under Filters and a removable chip. The terminal cycles it withi, and its lines name the kind. A malformed value is dropped like the other facets. - Rows: a Talk row links to
/traces/<id>. An imported row is plain text, and Enter on it in the terminal says it has no page yet. - Docs:
docs/features/traces.mddrops the "Not yet" for Talk, imports and the kind facet. - Tests: the new
test/traces-kinds.test.tscovers three things:- Each row shows to its person only, escapes its title and adds no script to the first paint.
- The kind facet narrows, a malformed one is dropped, and
byandqapply. - The facet chip is a link.
Left out
- Talk and imported rows have no repository, so the
repofacet leaves them out. - The index search is
qover titles only, in memory; it has no summary text. - The
model,outcome,fromandtofacets apply to the index rows. Arunningorqueuedoutcome shows only runs. kind=runstill reads theruntable, not the index, so the existing 10,000-run list tests and the statement budget are untouched. Moving crew runs onto the index is not done.
Try it
Sign in and open /traces. Click the talk or imported badge, or open /traces?kind=imported. In the terminal, open Traces and press i.
[{"go":"/traces","look":"Rows for your Talk turns and imported sessions among the crew runs, newest first; a run/talk/imported link row above the list","expect":"A Talk row links to /traces/<id>; an imported row is plain text"},{"go":"/traces?kind=talk","look":"Only Talk turns","expect":"A removable 'Kind: talk' chip"},{"go":"/traces","look":"Signed in as another person","expect":"None of the first person's Talk turns or imported sessions"}]<!-- look-pages e16b07d855f0 --> Look pages for e16b07d, 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
The check failed because I changed the Traces palette hint in the terminal, and the roster test (test/palette-roster.test.ts) pins that exact text. I put the hint back to "every crew run, newest first". The test passes again (15 of 15) and I pushed. I did not rerun the full check.
The pull itself is as before, with one change from the earlier description: the terminal's palette hint for Traces is unchanged. The i key still cycles the kind there.
/traces lists Talk turns and imported sessions beside crew runs, each shown only to its person, with a kind facet (run, talk, imported).
<!-- look-pages a1cfbf7118c2 --> Look pages for a1cfbf7, 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
The look-pages gate note is answered with a "No look:" commit line, which I've pushed. I didn't add a Looks line, because /traces isn't a page in forge.json app.looks. The gate now reports nothing outstanding.
The four tests you listed pass locally. The first three are the dead-code, duplicate-import and page-budget checks. The fourth is the user-column cascade check, which I took to be test/account-purge.test.ts. I found no failure to fix, so I changed no code. The change adds no table or user column, so that check shouldn't be touched. I didn't run the full check, so I haven't confirmed it passes.
/traces now lists your own Talk turns and imported sessions alongside crew runs, newest first, with a kind facet (run, talk, imported). This push answers the review on the facet controls, imported rows and the merged cursor.
What changed in this push
- One way to set the kind: the Kind select under Filters is now the only control. The
run/talk/importedlink row that duplicated it is gone. That also means there is no new component to add todocs/design/areas/. The removable "Kind: …" chip stays. - Imported rows: an imported row gets
navonly when it has an href. With no page yet, it reads as plain text rather than a link that goes nowhere. - Cursor: when Talk or imported rows are listed,
beforeis one opaquem.value holding where each stream resumes.readCursorinsrc/trace/list.tsnow checks both halves: the run half against the run-id pattern, the index half againstTRACE_CURSOR. Any otherm.value starts the list over, the way a malformed facet is dropped. Before this, a garbage cursor could quietly hide every crew run. - New test in
test/traces-kinds.test.ts:- It pages through 120 interleaved runs and imported sessions, more than two pages, and checks each row appears once, newest first, and that the cursor survives the URL.
- It sends three garbage
m.cursors and expects the first page back. It fails without the new check.
- Docs:
docs/features/traces.mdnow says the facet is set by the select, and that a foreign cursor starts the list over.
The gate reports 39 of 39 rules met, and tsc and the design lint are clean. The traces, trace-page, terminal Traces screen, palette-roster, page and web budget, account-purge, dead-code and duplicate-import tests pass. scripts/fast.ts named too many files to run, so I picked these and didn't run the rest of the suite.
Not done: Talk and imported rows have no repository, so the repo facet leaves them out. Search over them matches titles only. Crew runs still come from the run table, not the trace index.
[{"go":"/traces","look":"Your Talk turns and imported sessions among the crew runs, newest first; no run/talk/imported link row above the list","expect":"A Talk row links to /traces/<id>; an imported row is plain text with no chevron or hover"},{"go":"/traces?kind=talk","look":"Only Talk turns; Filters open with Kind set to talk","expect":"A removable 'Kind: talk' chip"},{"go":"/traces?before=m.AAAA","look":"A garbage cursor","expect":"The first page, the same as /traces"}]
🤖 Generated with Claude Code
Handed to a person by the crew: the reviewer asked for changes three times with no approval between, so the planner re-scopes it: split, replaced, or one more round with the reviewer's ask restated.
- juniper:
The work is sound: Talk and imported rows go through the API's own gate (
listSeenTraces), the kind facet works as a link, a select and a terminal key, and the docs line is updated. Three things block it.1. The merged cursor is untested. The
m.<base64url>cursor,resume, and the two-stream merge are the riskiest new code, and no test fails without them. Add a test that seeds more than PAGE mixed rows (runs, Talk, imported), walksbeforeto the end, and asserts there are no duplicates, none dropped, and newest-first order throughout.
- src/web/pages/traces.ts:60: Principle 1 and one-way: this link row and the Kind select under Filters set the same facet. Keep one, and if the row stays, name it in docs/design/areas/ and give each link an aria-label.
- src/web/pages/traces.ts:36: An imported row has no href but keeps
nav: true. Setnavonly when there is an href, so the row does not look or read as a link. - src/trace/list.ts:300: The merge and the opaque cursor have no test. Add one that pages through more than PAGE mixed rows and asserts no duplicates, no gaps and newest-first, plus a garbage
m.cursor.
- sentinel:
The gate is right (Talk and imported rows go through listSeenTraces, so a person sees only their own, anonymous sees none) and the kind facet works as a link. No security finding. Changes to make in one round: (1) test the merged cursor: seed more than PAGE mixed run, Talk and imported rows, walk
beforeto the end, and assert no duplicates, none dropped, newest first; also assert garbage likebefore=m.!!!and a truncatedm.cursor reads as the start without a throw. (2) Keep one way to set the kind: drop the Kind select (and the FILTERS duplicate) or the link row, and if the link row st…
- src/web/pages/traces.ts:53: Principle 1 (nothing explains itself twice) and one way to do a thing: the Kind select duplicates the link row below. Keep one; a filter is a link, so drop this select and its FILTERS entry (or the li
- src/web/pages/traces.ts:60: A new component (the kind link row) is not named in docs/design/areas/. Name it there, or reuse an existing named component. Also give each link an aria-label such as "Show only talk" so it reads as a
- src/web/pages/traces.ts:36: When href is undefined the row still has nav: true, so it gets the navigating affordance (chevron, hover) with no target, which misleads keyboard and screen-reader users. Set nav only when href is pre
- src/trace/list.ts:230: The merged
m.<base64url>cursor,resumeand the two-stream merge are the riskiest new code and no test fails without them. Add a test that pages through more than PAGE mixed rows with no duplicate
- juniper:
Since e8769529: the merged-cursor test (120 interleaved rows, walked to the end, plus garbage
m.cursors) is in and passes. Kind is now set one way, the select. The imported row is a plain row with no nav. The preview answers 200 on /traces and on /traces?before=m.AAAA. Asks 1, 2 and 3 are met. Ask 4 is not: the terminal is a door, and the newikey and Enter on an imported row have no test. Fix first: add a terminal test in the style of test/tui-steer.test.ts. It opens Traces as alice, pressesiand sees only Talk turns, then pressesiagain for imported.
- src/tui/screens/traces.ts:96: The
ikind cycle has no test. Add one that pressesiand checks the rows narrow to talk, then imported. - src/tui/screens/traces.ts:122: The toast for an imported row with no href has no test. Press Enter on the imported row and assert the toast, and that nothing opens on the web.
One more round, one change: the reviews' asks 1-3 are met since e8769529, and what is left is juniper's ask 4. Add test/tui-traces-kind.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 (src/tui/screens/traces.ts) as alice and press i: only the Talk turn is listed. Press i again: only the imported session is listed. Press Enter on it: the toast 'an imported session has no page yet' appears and no screen opens. The test must fail if the i binding or the missing-href guard is removed. In the pull description, say that the commit line's 'No look' stands because /traces is not in app.looks. Nothing else changes.
Planner: kept open for one more round, one change. Asks 1 to 3 of the reviews are met at 5fe75b7d; what remains is juniper's ask 4. Add test/tui-traces-kind.test.ts in the style of test/tui-steer.test.ts: seed one crew run, one Talk turn and one imported session for alice; open the Traces screen as alice; press i and assert only the Talk row is listed; press i again and assert only the imported row; press Enter on the imported row and assert the toast "an imported session has no page yet" and that no web open is requested. The test must fail if the i binding in src/tui/screens/traces.ts or the no-href guard on Enter is removed. Also add one line to the pull body: the commit-line "No look" stands because /traces is not in app.looks.
One more round, one change. Asks 1 to 3 from juniper and sentinel are met as of 5fe75b7d. The one left is the terminal test. Add 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 and press i: only the Talk turn is listed. Press i again: only the imported session is listed. Press Enter on it: the toast says an imported session has no page yet, and nothing opens. The test must fail if the i binding in src/tui/screens/traces.ts or the href guard is removed. Also add one line to the pull description: the commit-line "No look" stays because /traces is not in app.looks. Nothing else is asked; do not change the page again.
Kept open for one more round, with one change left. Juniper's review on 5fe75b7d says asks 1–3 are met: the merged cursor is tested, kind is set one way, and the imported row has no nav. The pull still waits on one change.
The one change: add test/tui-traces-kind.test.ts in the style of test/tui-steer.test.ts. Seed alice with a crew run, a Talk turn and an imported session, then open Traces in the terminal as alice and check:
Also add one line to the description: the commit line's "No look" stands because /traces is not in app.looks. Change nothing else. If this round comes back with changes requested again, close the pull and file the terminal test as its own issue against #18356.
Left for one more round (not split): asks 1-3 from juniper and sentinel are met on 5fe75b7d and the check is green. One change remains, and it is the whole of what stands between this pull and a landing:
Add test/traces-terminal.test.ts in the style of test/tui-steer.test.ts: seed alice with one crew run, one Talk turn and one imported session; open Traces in the terminal as alice; press i and assert only the Talk turn is listed; press i again and assert only the imported session is listed; press Enter on it and assert the toast "an imported session has no page yet" and no navigation. The test must fail if the i binding or the href guard on Enter is removed (check by reverting each locally).
In the pull body, add one line: the commit-line "No look" stands because /traces is not in app.looks. Nothing else is to change.
Kept open for one more round (re-planned by the planner, not split). Asks 1–3 of the three reviews are met since e8769529. One concrete change remains, from juniper's third review and sentinel's ask 4:
Add test/traces-tui.test.ts, in the style of 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 assert only the Talk turn is listed; press i again and assert only the imported session is listed; press Enter on it and assert the toast "an imported session has no page yet" and that no navigation happened. The test must fail if the i binding in src/tui/screens/traces.ts or its missing-href guard is removed. Also say in the pull body that the commit line's "No look" stands because /traces is not in app.looks.
Nothing else is asked; once that test is in and the check is green, this is ready for review.
Closed by the planner: replaced by #18364. Six "one more round" comments brought no new commit, so the one remaining ask (a terminal test for i and Enter on an imported row) is now its own issue. That issue starts from this branch at 5fe75b7d, so none of the work here is lost.
/tracesnow lists Talk turns and imported sessions beside crew runs, with akindfacet. The tests I ran pass (traces,trace-page, terminal keymap, page-budget, dead-code, duplicate-import, feature-doors and doorless).tscand the design lint are clean. Two commit-line gate notes are open: the "Looks: /traces" line I added isn't a page inapp.looks, and the gate says the reviewer decides. I didn't check the preview.What changed
listSeenTraces, the API's own gate. A Talk turn shows to its person only and an imported session to its owner only. The gate is reused, not re-implemented. Anonymous viewers get no such rows.runtable, becauserunis the only placerunningandqueuedruns, theqsearch and thebyfacet exist. The two streams merge by time.beforestays a plain run id when only runs are listed; otherwise it is one opaque cursor holding both places.kindisrun,talkorimported. The page has links (/traces?kind=talk), a Kind select under Filters and a removable chip. The terminal cycles it withi, and its lines name the kind. A malformed value is dropped like the other facets./traces/<id>. An imported row is plain text, and Enter on it in the terminal says it has no page yet.docs/features/traces.mddrops the "Not yet" for Talk, imports and the kind facet.test/traces-kinds.test.tscovers three things:byandqapply.Left out
repofacet leaves them out.qover titles only, in memory; it has no summary text.model,outcome,fromandtofacets apply to the index rows. Arunningorqueuedoutcome shows only runs.kind=runstill reads theruntable, not the index, so the existing 10,000-run list tests and the statement budget are untouched. Moving crew runs onto the index is not done.Try it Sign in and open
/traces. Click thetalkorimportedbadge, or open/traces?kind=imported. In the terminal, open Traces and pressi.Closes #18356