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

The search, map, flow and system pages each carry a first-view attention budget that test/attention.test.ts holds #10691

Merged opened this

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

Merged

`/search`, `/search?q=forge`, `/map`, `/flow` and `/system` now each have a first-view entry in `docs/design/attention-budget.json`, and `test/attention.test.ts` visits all five signed in as an admin. Both tests in `test/attention.test.ts` pass, and `tsc` and `design-lint` are clean. I ran only that file; the forge runs the full check on push.

shipped production is serving it deploy cca14ac

opened this

/search, /search?q=forge, /map, /flow and /system now each have a first-view entry in docs/design/attention-budget.json, and test/attention.test.ts visits all five signed in as an admin. Both tests in test/attention.test.ts pass, and tsc and design-lint are clean. I ran only that file; the forge runs the full check on push.

Measured words / blocks / colours, the same at 390 and 1280 px, with no headroom added:

PageWords / blocks / colours
/search42 / 3 / 1
/search?q=forge58 / 5 / 1
/map68 / 6 / 6
/flow102 / 9 / 1
/system820 / 277 / 0
  • Failure proved locally: lowering /flow's 390 px blocks entry by one made the test fail with flow @390: blocks 9 > budget 8. I restored the entry afterwards.
  • Sampled pages: /flow and /system are measured on the test forge's empty state, with nothing seeded or waited for. Both entries say so in a note.
  • Notes in the file: the two search entries also carry a note. The width-key check ignores note, and a FORGE_ATTENTION_WRITE=1 rewrite keeps existing notes.
  • /system is large: its 820 words and 277 blocks are today's number, not a target.
  • Docs: docs/features/attention.md lists the new pages. Its baseline row for settings said 137 words, but the budget file and the test already had 140, so I corrected it.

Closes #10687

commented

The check failed because /system draws the machine it runs on, so my first measurement was only true on my host. I've fixed that and pushed. test/attention.test.ts passes twice in a row here and tsc is clean. I haven't seen the forge's check run on the new push yet.

What differed: /system shows the host's cores, disks, processes and cgroup state. The two cell-cap sentences also change length depending on whether the kernel enforces the caps. I measured 820 words / 277 blocks locally, and the check's host counted something else.

What changed:

  • The test now gives /system a fixed empty machine reading through useLive and replaces the two cell-cap sentences with one fixed line. The budget no longer depends on the host.
  • The /system entry is now 212 words / 65 blocks / 0 colours at both widths, down from 820 / 277. A live /system is larger.
  • The entry's note and docs/features/attention.md say how it is measured. The other entries are unchanged.

I made no change to the app's pages. Only the test, the budget file and the docs changed.

Changes requested — before the latest push

The budget entries, the admin-signed visits and the fixed /system reading are sound, and the numbers match the issue (no headroom). Two things to fix in one round:

  1. docs/features/attention.md: the new /flow and /system paragraph runs straight into the ## App page, calmed heading with no blank line, so the heading will not render. Add the blank line.
  2. Box 5 asks you to prove locally that growing any entry by one text block fails the test and to say so in the pull. Nothing on the pull says it. Do it for all five entries (search, search results, map, flow, system) and state the result in the pull description. Also state the test file time for box 6.

To note, not to change: /system is measured on an injected empty machine reading, so a regression in the live page is outside the budget. The note and the docs say this plainly, which is acceptable.

commented

Both review points are addressed: the blank line is in, and each of the five budgets now has a local proof that growing it fails the test. I did not re-run tsc or the design lint for this round, because it only changed one blank line in docs/features/attention.md.

What changed since the last push

  • docs/features/attention.md now has the blank line after the /flow and /system paragraph, so ## App page, calmed renders as a heading.
  • No code changed.

Growing one entry by one text block fails the test (box 5). For each entry I temporarily added a 5-word <p> before the <h1> in test/attention.test.ts, then reverted it. each page stays inside its first-view budget failed every time, at both 390 and 1280 px. The failures read "seen > budget":

entrywordsblocks
search46 > 424 > 3
search results62 > 586 > 5
map72 > 687 > 6
flow106 > 10210 > 9
system216 > 21266 > 65

With the temporary edit removed, test/attention.test.ts passes (2 pass, 0 fail). The temporary edit is not in the commit.

Test file time (box 6). bun test test/attention.test.ts takes about 1.7 s. The budget test itself runs in roughly 30 ms.

Not changed. /system is still measured on an injected empty machine reading, so a regression in the live page is outside the budget. The test note and the docs say this plainly, as you accepted.

Approved

Both earlier asks are met. The blank line before ## App page, calmed is in, and each of the five budgets has a local proof that growing it by one text block fails the test. Only the docs changed since my last review. The entries are the measured values at both widths with no headroom. The test signs in as an admin and visits all five paths. The docs how-to is in docs/features/attention.md, and README is untouched.

Two things I would do next:

  1. Non-blocking: /system is measured on an injected empty machine reading, so a regression in the live page is outside the budget. Follow up with a separate budget for the live shape, or a test that asserts the section blocks exist.
  2. Non-blocking: /flow is measured on the empty state, so the populated page is unbudgeted. Seed a small fixed sample in a follow-up.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs