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

The response record says whether the agent is getting faster: this 30 days against the 30 days before #92

Merged opened this

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

Merged

Under the response record, the desk now prints one line comparing the last 30 days with the 30 days before. Example: "2 min faster than the month before · 71% within 5 minutes, up from 54%". The full test run ends at 448 pass, 1 fail.

Notes

shipped production is serving it deploy aba151a

opened this

Under the response record, the desk now prints one line comparing the last 30 days with the 30 days before. Example: "2 min faster than the month before · 71% within 5 minutes, up from 54%".

The full test run ends at 448 pass, 1 fail. The failure is live.test.ts ("a write from another process on the same file reaches the bus"), which fails the same way without my change. I did not run bun x tsc --noEmit: the repo has no tsconfig.json, so it only prints help. scripts/design-lint.ts doesn't exist in this clone, so I didn't run it either.

  • Wording: "slower than the month before" when the median got worse, and "Same pace as the month before" when the two medians read the same (rounded the way the desk shows them). The share part reads "up from", "down from" or "same as before". With no leads in the earlier window there is no line at all.
  • Same rules as the current window: responseRecord in src/leads.ts still does one query over the last 60 days and splits the rows at the 30-day mark in memory. The earlier window uses the same rules, so a lead still waiting counts its time so far. A red clock pulls the current window down.
  • Where it shows: the line is built by trendLine in src/clock.ts. The desk renders it, escaped, in src/pages/desk.ts, and the terminal desk header prints it. The figures are served as record.earlier in GET /leads and the list_leads MCP tool, and described in the OpenAPI schema (src/routes.ts, contract/openapi.json).
  • Sample leads: I added four earlier leads (38–52 days ago, answered in 7–22 minutes), so a fresh desk reads "6 min faster than the month before · 57% within 5 minutes, up from 33%". Restarting the sample leads keeps it.
  • Existing tests changed: they asserted the old lead count of 16, which is now 20. I updated those counts in actions.test.ts, export.test.ts, search.test.ts and terminal.test.ts. The tests were wrong only about that number.
  • New tests: the sentence (faster, slower, same, no earlier data), the 30-day boundary, a waiting lead pulling the current window down, the sample desk and its restart, the desk page rendering the line, and the terminal header.
  • README: the response record paragraph explains the line in plain words.

I added no dependencies and changed no contract cell. I did not add a pre-built sentence to the JSON, only the numbers. To try it, open the desk on the preview and read the line under "Median first reply".

Closes #85

commented

Under the response record, the desk now prints one line comparing the last 30 days with the 30 days before. Example: "2 min faster than the month before · 71% within 5 minutes, up from 54%".

The full test run ends at 448 pass, 1 fail. The failure is live.test.ts ("a write from another process on the same file reaches the bus"), which fails the same way without my change. I did not run bun x tsc --noEmit: the repo has no tsconfig.json, so it only prints help. scripts/design-lint.ts doesn't exist in this clone, so I didn't run it either.

  • Wording: "slower than the month before" when the median got worse, and "Same pace as the month before" when the two medians read the same (rounded the way the desk shows them). The share part reads "up from", "down from" or "same as before". With no leads in the earlier window there is no line at all.
  • Same rules as the current window: responseRecord in src/leads.ts still does one query over the last 60 days and splits the rows at the 30-day mark in memory. The earlier window uses the same rules, so a lead still waiting counts its time so far. A red clock pulls the current window down.
  • Where it shows: the line is built by trendLine in src/clock.ts. The desk renders it, escaped, in src/pages/desk.ts, and the terminal desk header prints it. The figures are served as record.earlier in GET /leads and the list_leads MCP tool, and described in the OpenAPI schema (src/routes.ts, contract/openapi.json).
  • Sample leads: I added four earlier leads (38–52 days ago, answered in 7–22 minutes), so a fresh desk reads "6 min faster than the month before · 57% within 5 minutes, up from 33%". Restarting the sample leads keeps it.
  • Existing tests changed: they asserted the old lead count of 16, which is now 20. I updated those counts in actions.test.ts, export.test.ts, search.test.ts and terminal.test.ts. The tests were wrong only about that number.
  • New tests: the sentence (faster, slower, same, no earlier data), the 30-day boundary, a waiting lead pulling the current window down, the sample desk and its restart, the desk page rendering the line, and the terminal header.
  • README: the response record paragraph explains the line in plain words.

I added no dependencies and changed no contract cell. I did not add a pre-built sentence to the JSON, only the numbers. To try it, open the desk on the preview and read the line under "Median first reply".

Approved

Clean. The trend line is built in one place (trendLine in clock.ts) and used by the desk (escaped), the terminal header, and the numbers are in record.earlier for GET /leads and list_leads, with openapi in sync. Waiting leads count the same way in both windows, the boundary is tested, and no contract cell changed. Nit only: terminal.ts calls trendLine twice with a non-null assertion; compute it once.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs