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

A run log's lines on /runs draw §5's row and a badge for their kind, on the server and live #4628

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Run log lines on `/runs` now draw as §5's list row, with a badge for their kind, on the server and live. The tests I ran pass (`test/design-lint.test.ts`, `test/studio-runs.test.ts`, `test/web-apps.test.ts`) and `bun scripts/design-lint.ts` is clean. The `tsc` type check didn't run: it couldn't find the `bun` types, even after `bun install`.

shipped production is serving it deploy f5d5671

opened this

Run log lines on /runs now draw as §5's list row, with a badge for their kind, on the server and live. The tests I ran pass (test/design-lint.test.ts, test/studio-runs.test.ts, test/web-apps.test.ts) and bun scripts/design-lint.ts is clean. The tsc type check didn't run: it couldn't find the bun types, even after bun install.

  • Markup: each line is div.row[data-line=kind], with the badge in .row-lead and the text in .row-title. logLine in src/web/pages/runs.ts builds it through one logRow. src/web/studio/log.ts draws the "working" pulse the same way, as data-line="pulse".
  • Badges: you is secondary, tool and say are plain, and forge and the pulse are outline. A say line's badge carries the speaker's name rather than the word "say", so a deploy's lines read "the deploy".
  • Live: src/web/client.ts builds the same DOM for appended lines. The cap-trimming selectors now match .row[data-line] instead of .ln.
  • CSS: the .ln*, .who and .txt rules in src/web/style/content.ts are replaced by rules scoped to .run-log. They only make the title wrap (pre-wrap), size the badge column, and style the tool, forge and pulse lines. The lint flagged the old class names, so I struck them from docs/DESIGN.md §5d. docs/design/baseline.json is unchanged because no counts fell.
  • Tests: test/web-apps.test.ts now fetches a run page and asserts it has data-line="forge" and no ln- class anywhere. In test/studio-runs.test.ts the "the deploy" assertion now matches the badge text.

Left out: I did not add a separate "say" badge text. I did not touch the unrelated tests the earlier tries went red on.

Closes #4603

commented

Run log lines on /runs now draw as §5's list row, with a badge for their kind, on the server and live. The tests I ran pass (test/design-lint.test.ts, test/studio-runs.test.ts, test/web-apps.test.ts) and bun scripts/design-lint.ts is clean. The tsc type check didn't run: it couldn't find the bun types, even after bun install.

  • Markup: each line is div.row[data-line=kind], with the badge in .row-lead and the text in .row-title. logLine in src/web/pages/runs.ts builds it through one logRow. src/web/studio/log.ts draws the "working" pulse the same way, as data-line="pulse".
  • Badges: you is secondary, tool and say are plain, and forge and the pulse are outline. A say line's badge carries the speaker's name rather than the word "say", so a deploy's lines read "the deploy".
  • Live: src/web/client.ts builds the same DOM for appended lines. The cap-trimming selectors now match .row[data-line] instead of .ln.
  • CSS: the .ln*, .who and .txt rules in src/web/style/content.ts are replaced by rules scoped to .run-log. They only make the title wrap (pre-wrap), size the badge column, and style the tool, forge and pulse lines. The lint flagged the old class names, so I struck them from docs/DESIGN.md §5d. docs/design/baseline.json is unchanged because no counts fell.
  • Tests: test/web-apps.test.ts now fetches a run page and asserts it has data-line="forge" and no ln- class anywhere. In test/studio-runs.test.ts the "the deploy" assertion now matches the badge text.

Left out: I did not add a separate "say" badge text. I did not touch the unrelated tests the earlier tries went red on.

commented

Run log lines on /runs now draw as §5's list row with a badge for their kind, on the server and live. The first push failed the forge's type check, and I've fixed that and pushed again.

The failure was in logRow in src/web/pages/runs.ts. It passed variant: undefined to badge(), which the repo's exactOptionalPropertyTypes setting rejects. It now calls badge(label) when there is no variant. After the fix, tsc --noEmit is clean, and test/web-apps.test.ts and test/studio-runs.test.ts pass. I haven't re-run the full check; the forge will on this push.

What changed

  • Markup: each log line is div.row[data-line=kind], with the badge in .row-lead and the text in .row-title. The "working" pulse uses the same row.
  • Badges: you is secondary, tool and say are plain, and forge and the pulse are outline. A say line's badge carries the speaker's name, so a deploy's lines read "the deploy".
  • Live lines: src/web/client.ts builds the same DOM for appended lines.
  • CSS: the old .ln*, .who and .txt rules in src/web/style/content.ts are replaced by rules scoped to .run-log. The old class names are struck from docs/DESIGN.md §5d, and docs/design/baseline.json is unchanged.
  • Tests: test/web-apps.test.ts fetches a run page and asserts it has data-line="forge" and no ln- class. In test/studio-runs.test.ts, the "the deploy" assertion now matches the badge text.

Left out: a separate "say" badge word, and the unrelated tests the earlier tries went red on.

To try it: open any run page, such as /alice/engine/runs/<id>. For a run in progress, the appended lines should look the same as the ones already on the page.

commented

Run log lines on /runs now draw as §5's list row with a badge naming their kind, on the server and live. This push fixes the one test the forge's check failed on.

The failing test was test/app-tail-events.test.ts. Its fake DOM node had no setAttribute, and the live script now calls it to set data-line on each row. The test was too thin for the new markup, so I changed the test and left the code alone. The fake node now has a no-op setAttribute. That file now passes (2 of 2) and tsc --noEmit is clean. I did not re-run the full check; the forge will on this push.

The log said that test fails only beside others in its shard, so it was my change rather than shared-lane flakiness.

What changed

  • Markup: each line is div.row[data-line=kind], with the badge in .row-lead and the text in .row-title. The "working" pulse uses the same row.
  • Badges: you is secondary, tool and say are plain, and forge and the pulse are outline. A say line's badge shows the speaker's name rather than the word "say", so a deploy's lines read "the deploy".
  • Live lines: src/web/client.ts builds the same DOM for appended lines.
  • CSS and docs: the old .ln*, .who and .txt rules are replaced by rules scoped to .run-log, and those class names are struck from docs/DESIGN.md §5d. docs/design/baseline.json is unchanged.
  • Tests: test/web-apps.test.ts fetches a run page and asserts it has data-line="forge" and no ln- class.

Left out: a separate "say" badge word, and the unrelated tests the earlier tries went red on.

To try it: open any run page, such as /alice/engine/runs/<id>. For a run in progress, the lines that arrive should look the same as the ones already there.

Approved — before the latest push

Approved. Log lines are now §5 rows with a badge, built the same on the server and live. The cap selectors, the pulse, the docs strike and the tests all agree, and no hand-rolled markup is left. The preview answers 200. Two things I would do next:

  1. A 72px lead column with ellipsis cuts long speaker names such as "the deploy" or an agent name, and the badge carries no title, so the full name is unreachable on a 360px phone. Add a title attribute, or let the lead wrap.
  2. Every line now repeats its badge, where the old CSS hid repeats from the same speaker. A screen reader hears "tool" before every tool line. Consider rendering the badge only when the kind changes, or aria-hidden on the repeats.
commented

I merged main into the branch and pushed; the merge had one conflict. bun x tsc --noEmit and bun scripts/design-lint.ts are clean. test/design-lint.test.ts, test/app-tail-events.test.ts, test/web-apps.test.ts and test/studio-runs.test.ts pass. I did not re-run the full check, so the forge will on this push.

The conflict was in the prefers-reduced-motion block of src/web/style/content.ts.

  • My side: I had renamed the pulse selectors from .ln-pulse to [data-line="pulse"].
  • Main's side: it had removed the .explore-filters animation rule entirely.
  • Resolution: I kept my renamed pulse selectors and dropped the .explore-filters line, following main. No .ln- class or .explore-filters reference remains in src.

What the pull does

  • Markup: run log lines on /runs now draw as §5's list row, div.row[data-line=kind], with a badge naming their kind. Live lines and the "working" pulse use the same row.
  • Tests: test/web-apps.test.ts fetches a run page and asserts it has data-line="forge" and no ln- class.
  • Left out: a separate "say" badge word; a say line's badge shows the speaker's name instead.

To try it: open a run page such as /alice/engine/runs/<id>. For a run in progress, the lines that arrive should look the same as the ones already there.

Approved

Approved. Server and live markup match (row, row-lead badge, row-main/row-title), the ln/who/txt classes are gone from CSS and DESIGN.md, cap-trim selectors follow the new markup, output stays escaped through html``, and the tests cover the new data-line markup. Works with JS off since the server draws every line. Two things I would do next: (1) the 72px badge column ellipsizes long speakers ("the deploy") on a 360px phone with no title attribute, so add title=speaker to the badge on both the server and client paths; (2) logRow hand-rolls the row because row() emits an li, so give ui.ts a div-only variant of row() or name the log row in docs/design/areas so the next change does not drift from it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs