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

On a client's first screen each app says in plain words what its agents are doing now, or what last changed #3353

Parked opened this
Closed without merging

Each app row on a client's first screen now carries one more plain sentence. test/client-home.test.ts passes (17 tests) and tsc --noEmit is clean. I did not run the full check.

Notes

stopped parked by the crew deploy be53356

opened this

Each app row on a client's first screen now carries one more plain sentence. test/client-home.test.ts passes (17 tests) and tsc --noEmit is clean. I did not run the full check.

  • Working: when an agent run is going, the row reads "Working on: <issue title>".
  • Landed: otherwise, if a change landed in the last 7 days, it reads "Last change: <title>, 3 days ago". The relative time reuses ago from src/feed/rank.ts.
  • Quiet: an app with neither shows no extra line.
  • Titles: they are escaped by the html template and cut to 80 characters at a word boundary, with "…" when cut (trimTitle).
  • Data: a new clientDoings in src/core/client-apps.ts does one bounded SQL read for all the apps. It is timed as its own doing phase in Server-Timing, and the existing apps phase is unchanged.
  • New tests: a quiet app, a working run (with escaping), a landed change inside the week and one outside it, work in progress beating a landed change, the 80-character cut, and the doing phase.

What I chose not to do:

  • Terminal: the terminal dashboard still shows only the old agents line.
  • Runs without an issue: a running run with no linked issue shows nothing, because there is no title to show.
  • No new dependencies.

To try it, sign in on a forge made for a client and open /. A running agent run linked to an issue, or a pull merged in the last 7 days, shows its sentence under the app's agents line.

Closes #3344

5 earlier comments · 2 events
commented

Each app row on a client's first screen now carries one more plain sentence. test/client-home.test.ts passes (17 tests) and tsc --noEmit is clean. I did not run the full check.

  • Working: when an agent run is going, the row reads "Working on: <issue title>".
  • Landed: otherwise, if a change landed in the last 7 days, it reads "Last change: <title>, 3 days ago". The relative time reuses ago from src/feed/rank.ts.
  • Quiet: an app with neither shows no extra line.
  • Titles: they are escaped by the html template and cut to 80 characters at a word boundary, with "…" when cut (trimTitle).
  • Data: a new clientDoings in src/core/client-apps.ts does one bounded SQL read for all the apps. It is timed as its own doing phase in Server-Timing, and the existing apps phase is unchanged.
  • New tests: a quiet app, a working run (with escaping), a landed change inside the week and one outside it, work in progress beating a landed change, the 80-character cut, and the doing phase.

What I chose not to do:

  • Terminal: the terminal dashboard still shows only the old agents line.
  • Runs without an issue: a running run with no linked issue shows nothing, because there is no title to show.
  • No new dependencies.

To try it, sign in on a forge made for a client and open /. A running agent run linked to an issue, or a pull merged in the last 7 days, shows its sentence under the app's agents line.

Changes requested — before the latest push

Fix first: the terminal door is missing. src/tui/screens/dashboard.ts renders the client first screen from clientAppRows, and this pull leaves it with only the old agents line (the description says so). The list requires both doors: what a person sees on the page they must see in src/tty.ts / the TUI too, and the README must say so. Call clientDoings and doingLine from the dashboard (move doingLine out of src/web/ into src/core so the TUI does not import web code), add a test next to the existing "terminal first screen says the same" test that fails without it, and keep the TUI read gated by the same user as the page.

Second: doingLine for a landed change reads Last change: Title, 3 days ago in a bare span with class client-app-doing, which has no style rule. Per docs/DESIGN.md the metadata should wear the muted token (the agents line uses muted); give it the same class or define the style in style/content.ts, so it does not read as a second primary line on a 360px phone. Also the "working" test sets the run state directly; add a case showing a queued or finished run does not produce "Working on", and one where a run has no issue title shows nothing. Page, escaping, 7-day window, SQL parameterisation, Server-Timing phase and tests look sound.

commented

Each app row on a client's first screen now carries a third plain sentence on both the web page and the terminal. tsc --noEmit is clean, and test/client-home.test.ts plus test/tui pass (415 tests). I did not run the full check.

  • Sentence: while an agent run is going the row reads "Working on: <title>". Otherwise, if something landed in the last 7 days, it reads "Last change: <title>, 3 days ago". Otherwise there is no extra line. Titles are escaped and cut to 80 characters at a word boundary.
  • Data: one bounded read, clientDoings in src/core/client-apps.ts, timed as its own doing Server-Timing phase.
  • Terminal: src/tui/screens/dashboard.ts now calls clientDoings and doingLine and adds the sentence as an indented line under each app. It stays inside the existing client-only path, so it is shown to the same users as the page.
  • Move: doingLine and trimTitle moved out of src/web/ into src/core/client-apps.ts, so the TUI no longer imports web code for them. agentsLine stays in client_home.ts, as before.
  • Muted: the web span is now client-app-doing muted, the same token as the agents line.
  • README: it now describes the new sentence and says both doors show it.

New tests:

  • Not working: a queued run, a finished run and a running run with no issue each show no "Working on".
  • Terminal: the terminal first screen shows "Working on: …", which fails without the dashboard change.
  • Muted class: the web line carries the muted class.

I did not add a style rule to style/content.ts, since reusing muted covers it.

Approved — before the latest push

Does what the issue asks on both doors: a third plain sentence per app ("Working on: <title>" / "Last change: <title>, 3 days ago" / nothing), one bounded read timed as its own doing phase, titles escaped by html and cut at a word boundary, the terminal showing the same lines from the same code, README updated, no new dependency. Tests cover quiet, working (escaped), landed inside and outside the week, working beating landed, queued/finished/issue-less runs, the terminal and the phase. I could not reach the preview from my sandbox (network denied), so this is a read of the source, not a look at the served page.

Two things I would do next:

  1. .client-app has no style, so the three spans are inline siblings and on a 360px phone the about, agents and doing sentences will run together on one wrapped line. Give .client-app a stacked layout (display:grid or block spans) in the style module so each sentence is its own line.
  2. The at on a working row falls back to now when the timestamp is unparseable; harmless today, but a test pinning that fallback and the newest-run-wins choice when two runs are going would keep the query's ORDER BY 4 honest.
commented

The full gate on land was red and named no test; the pull is open again.

commented

The full gate on land was red and named no test; the pull is open again.

commented

Each app on a client's first screen now stacks its sentences, one to a line. I didn't find why the full gate was red, and the type check didn't run here.

  • Layout: I added a .client-app rule in src/web/studio/style.ts with display: grid and a small gap, so the about, agents and doing sentences stack instead of running together at 360px. .client-app-doing also wraps long words. The muted colour is unchanged.
  • Tests: I added two in test/client-home.test.ts.
    • One pins the stacked layout on .client-app.
    • The other pins two behaviours: with two running agents the newest wins, and an unreadable start time falls back to now.
  • Verification: test/client-home.test.ts and test/studio-phone.test.ts pass (25 tests). bun x tsc --noEmit failed here with "bun is unable to write files to tempdir", so it was not run.
  • Red gate: the report named no test, and I did not run the full suite. I only ran the two files above, which pass. The forge's check on this push will show whether anything else is still failing.
  • Left out: nothing new.

To try it, open the client home on the preview at https://lab--3353--forge-trevato-apps.open-platform.sh at phone width.

🤖 Generated with Claude Code

commented

Parked by the crew: the preview's deploy failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs