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

A new account's home offers three things it can do, each one click away, and an empty page says what goes there and how #18496

opened this

Merged 3h 29m ago, live in production

A new account that isn't the admin now sees the "To start:" line on home too. Before this, only the forge's admin saw it. I ran the new and nearby tests, tsc and the gate, and all are green.

Notes

opened this

A new account that isn't the admin now sees the "To start:" line on home too. Before this, only the forge's admin saw it. I ran the new and nearby tests, tsc and the gate, and all are green. I haven't run the full bun test, and I haven't checked a preview.

What changed

  • Three actions for everyone: the line is Name an app (/new), Tell the crew something (#tell-box, the box on home) and, for a non-admin, See what others made (/explore). The admin still gets Invite someone as the third. A non-admin's seven days count from their own account, and the admin's from the forge's first account. Code is in src/core/first_week.ts.
  • Explore is never struck: looking leaves no record to read, so that step can't be marked done. The line goes once the app and the telling are done, or after seven days.
  • Terminal: the terminal home reads the same function, so it shows the same line. There is no new screen.
  • Empty states: the existing tests already hold a fresh admin's list pages to one link or form each (test/empty-states.test.ts). I added test/empty-bare.test.ts, which walks the list pages a fresh non-admin opens and names any empty state that says nothing or has no control. /apps and /boards are exempt because their own header is the one control.
  • Docs and tests: docs/features/first-week.md is updated. In test/first-week.test.ts I replaced the "nothing for a non-admin" case, which contradicted the new behaviour, with one for the three links and for when they go.

Left out

  • I didn't add empty-state wording for pages that already pass.
  • I didn't add a "done" signal for exploring, since that would need new stored state.

Try it: open / as a new non-admin account and read the "To start:" line.

Commits carry Try:, No look: and No door: lines. No new dependencies or egress hosts, and no function was written that needed a similar.ts check.

Closes #18492

2 earlier comments
commented

A new account that isn't the admin now sees the "To start:" line on home too. Before this, only the forge's admin saw it. I ran the new and nearby tests, tsc and the gate, and all are green. I haven't run the full bun test, and I haven't checked a preview.

What changed

  • Three actions for everyone: the line is Name an app (/new), Tell the crew something (#tell-box, the box on home) and, for a non-admin, See what others made (/explore). The admin still gets Invite someone as the third. A non-admin's seven days count from their own account, and the admin's from the forge's first account. Code is in src/core/first_week.ts.
  • Explore is never struck: looking leaves no record to read, so that step can't be marked done. The line goes once the app and the telling are done, or after seven days.
  • Terminal: the terminal home reads the same function, so it shows the same line. There is no new screen.
  • Empty states: the existing tests already hold a fresh admin's list pages to one link or form each (test/empty-states.test.ts). I added test/empty-bare.test.ts, which walks the list pages a fresh non-admin opens and names any empty state that says nothing or has no control. /apps and /boards are exempt because their own header is the one control.
  • Docs and tests: docs/features/first-week.md is updated. In test/first-week.test.ts I replaced the "nothing for a non-admin" case, which contradicted the new behaviour, with one for the three links and for when they go.

Left out

  • I didn't add empty-state wording for pages that already pass.
  • I didn't add a "done" signal for exploring, since that would need new stored state.

Try it: open / as a new non-admin account and read the "To start:" line.

Commits carry Try:, No look: and No door: lines. No new dependencies or egress hosts, and no function was written that needed a similar.ts check.

commented

The pull now changes empty states, and the test that guards them would fail without those changes. The empty-state, dead-code, duplicate-import, module-state and page-budget tests pass, and tsc and the gate are clean. I did not run the whole suite or the terminal door (src/tui/, docs/features/) check; the forge's check does both.

What changed

  • The walk: test/empty-bare.test.ts no longer hard-codes six paths. It takes its pages from goPagesFor in go_pages.ts, the table behind the nav, for a new non-admin and for a guest. It adds the repository lists the nav doesn't name: issues, pulls, runs, branches, labels, releases and forks.
  • No exemption: /apps and /boards are in the walk. Every empty block must name what goes there and carry a link, form or button. The test also checks that guests see "Sign in to make one" on /apps.
  • Block parsing: the regex is gone. A new test/helpers/empty-blocks.ts matches each .empty block by <div> depth, and test/empty-states.test.ts now uses it too. A unit test builds a block with empty() and checks that a nested control is found.
  • Wording and controls fixed:
    • /apps (a "New app" link, or "Sign in to make one" for a guest) and /boards ("Start from a question").
    • /feed ("See what others made" and "New app") and /front (Explore).
    • /displays ("Pick an app").
    • A repository's branches and its releases ("Tell the crew"), and its forks ("Fork it").
  • ALLOWED list: I removed its /apps, /boards, /displays, /branches, /releases and /forks lines in test/empty-states.test.ts. Those lines held the "the header is the control" reasoning. Only /settings/subscriptions and /commits stay, since a form sits right beside the first and history comes from a push for the second.

What I left alone

  • The explore step in the terminal strip is unchanged. It is still never struck, and the docs already say so.
  • Some controls are plain links to the nearest sensible page, such as "Fork it" going to the repository. I chose a link over a new in-place form.
  • I did not check the non-admin home line on the preview. The tests cover it with a session.

Review

[
 {"go":"/apps","look":"Empty list as a signed-in non-admin","expect":"'Nothing runs here yet' with a 'New app' link"},
 {"go":"/apps","look":"Empty list signed out","expect":"Same sentence with 'Sign in to make one'"},
 {"go":"/feed","look":"A feed with no posts","expect":"The tell-the-crew line plus a 'See what others made' link"},
 {"go":"/displays","look":"No displays","expect":"The sentence and a 'Pick an app' link"}
]

🤖 Generated with Claude Code

commented

This push fixes the two first-view budget failures, and I didn't change anything for the third, the slow tui-apps assign test. The attention, empty-state and tsc checks pass locally. I haven't seen the forge's result for this push.

  • Budget failures: my earlier empty-state commit gave the /boards empty list its one link, "New board". That put /boards over its first-view budget at both widths, by 4 words, 1 block and 1 colour. docs/design/attention-budget.json now allows 349 words, 100 blocks and 3 colours for /boards. The budget's note for /boards records why.
  • Why I raised the budget: I first removed the link to stay under budget. test/empty-states.test.ts fails when an empty list page has no link, so I put the link back and raised the budget.
  • tui-apps assign test: it timed out in the check at about 20 s but passes when I run test/tui-apps.test.ts on its own. The check's log says it is green on main, so I'm treating this one as load-related. If it fails again, I'll look at it properly.

Not done: the nightly rewrap will wrap one over-long comment line in src/web/pages/branches.ts. I left it.

To try it: open /boards on an account with no boards. The empty block shows a single "New board" link.

[{"go":"/boards","look":"the empty 'Your boards' block","expect":"one sentence and one link, no second control"}]
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs