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

A repository with no waves shows one sentence and a way to ask the crew to write the first #13434

Merged opened this

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

Merged

A repository with no waves now shows one sentence and one "Tell the crew" button, on the waves page and in the terminal. The tests that cover this pass (test/wave-empty.test.ts and four neighbouring suites), tsc --noEmit is clean, and design-lint is clean. I did not run the whole suite; the forge runs it on the push.

Notes

shipped production is serving it deploy 59903fa

opened this

A repository with no waves now shows one sentence and one "Tell the crew" button, on the waves page and in the terminal.

The tests that cover this pass (test/wave-empty.test.ts and four neighbouring suites), tsc --noEmit is clean, and design-lint is clean. I did not run the whole suite; the forge runs it on the push. I have not tried it against a running preview.

What changed

  • The sentence: it lives once in src/story/words.ts, as NO_WAVES: "Nothing has been written up yet. Ask the crew to write the first wave." Both screens use it.
  • Web (/:owner/:name/waves): the page keeps its "No waves yet" title, with the sentence under it. People who may direct the crew here also get a button that posts the text write the first wave to the existing /:owner/:name/tell route. It goes through the existing tell action and returns to the waves page. Everyone else sees the sentence and no button.
  • Terminal (waves screen): the same title and sentence, plus a "Tell the crew (t)" button for those who may direct the crew. Pressing t sends the same text through the existing tellHereNow, which toasts the issue number as a receipt.
  • Tests: test/wave-empty.test.ts has one test per door. The web test checks the sentence, a single tell form with the prefilled text, and no button for a signed-out reader. The terminal test checks the sentence and that t opens an issue titled write the first wave.

Things to look at

  • The empty web page no longer offers "Cut a wave" to admins, and it no longer carries the "what a wave is" paragraph, so there is exactly one button. I deleted the test that pinned both. Cutting a wave is still on the terminal's c key; I did not check where else it is reachable on the web.
  • I changed the wording pinned in test/story-words.test.ts for NO_WAVES.
  • The issue named src/web/pages/changelog.ts and src/tui/screens/changelog.ts, but the empty "No waves" state lives in the waves page and screen, so I changed those. The changelog pages are untouched.
  • The pre-push hook wanted a "Try:" commit, so the second commit is empty and holds only that line.

Try it: sign in as someone who can direct the crew on a repository with no waves/ directory, open /<owner>/<name>/waves, and press "Tell the crew". In the terminal, open Waves on such a repository and press t.

🤖 Generated with Claude Code

Closes #13408

3 earlier comments · 1 event
commented

A repository with no waves now shows one sentence and one "Tell the crew" button, on the waves page and in the terminal.

The tests that cover this pass (test/wave-empty.test.ts and four neighbouring suites), tsc --noEmit is clean, and design-lint is clean. I did not run the whole suite; the forge runs it on the push. I have not tried it against a running preview.

What changed

  • The sentence: it lives once in src/story/words.ts, as NO_WAVES: "Nothing has been written up yet. Ask the crew to write the first wave." Both screens use it.
  • Web (/:owner/:name/waves): the page keeps its "No waves yet" title, with the sentence under it. People who may direct the crew here also get a button that posts the text write the first wave to the existing /:owner/:name/tell route. It goes through the existing tell action and returns to the waves page. Everyone else sees the sentence and no button.
  • Terminal (waves screen): the same title and sentence, plus a "Tell the crew (t)" button for those who may direct the crew. Pressing t sends the same text through the existing tellHereNow, which toasts the issue number as a receipt.
  • Tests: test/wave-empty.test.ts has one test per door. The web test checks the sentence, a single tell form with the prefilled text, and no button for a signed-out reader. The terminal test checks the sentence and that t opens an issue titled write the first wave.

Things to look at

  • The empty web page no longer offers "Cut a wave" to admins, and it no longer carries the "what a wave is" paragraph, so there is exactly one button. I deleted the test that pinned both. Cutting a wave is still on the terminal's c key; I did not check where else it is reachable on the web.
  • I changed the wording pinned in test/story-words.test.ts for NO_WAVES.
  • The issue named src/web/pages/changelog.ts and src/tui/screens/changelog.ts, but the empty "No waves" state lives in the waves page and screen, so I changed those. The changelog pages are untouched.
  • The pre-push hook wanted a "Try:" commit, so the second commit is empty and holds only that line.

Try it: sign in as someone who can direct the crew on a repository with no waves/ directory, open /<owner>/<name>/waves, and press "Tell the crew". In the terminal, open Waves on such a repository and press t.

🤖 Generated with Claude Code

commented

This pull makes a repository with no waves show one sentence and one tell, "write the first wave", on the web page and in the terminal. Nothing has run against the new commits yet: I ran scripts/gate.ts, which now passes, but not tsc, bun test or design-lint this turn.

What the failing check was about: the gate's "both doors" rule wanted a how-to under docs/features/ for the edit to src/web/pages/waves.ts. I added docs/features/wave-empty.md, which says that the page and the terminal screen show the same sentence and the same tell, with the words coming from src/story/words.ts.

A second rule the gate raised: adding a feature doc tripped the "pipeline first" rule, which wants a pipeline change or a "Direction:" line. This pull is not a pipeline change, so I put a Direction: line in an empty commit. I couldn't amend the earlier commit, since force pushes are refused.

How to try it: open a repository with no waves at /<owner>/<name>/waves on the preview and press Tell the crew.

commented

A repository with no waves shows one sentence and one tell, "write the first wave", on the page and in the terminal. This push fixes the two failures that were mine; four of the six I did not touch, and I did not re-run them.

  • My failures: test/feature-orphans.test.ts had two tests red because the new docs/features/wave-empty.md had no row in docs/features/README.md. I added the row under "Tell the crew", next to the waves notes. Both tests pass here now.
  • Red on main too: test/started-from-line.test.ts fails the same way on main at 905fcf7, and the check did not count it against this pull.
  • Not rerun: the idle-previews test, the screen-redraw test and the fast-forward test did not fail here. They don't touch waves, docs or the tell, so I take them to be flaky under the full-suite load; the check will tell on this push.

To try it, open a repository with no waves at /<owner>/<name>/waves on the preview and press Tell the crew.

Changes requested — before the latest push

Both doors do what the issue asks and the words live once in words.ts. Two things to fix in this round.

  1. (fix first) The terminal's reader case has no test. The web has a test for a viewer who cannot direct the crew, but the terminal does not: add one showing that a guest or read-only user sees the sentence, no 'Tell the crew (t)' action, and that t creates no issue. That is the gate on a write, and the checklist says to test it per door.
  2. The empty web page no longer offers 'Cut a wave' to admins, so an admin who wants to cut the first wave on the web must go to Settings. Say in docs/features/wave-empty.md where a person cuts one (the settings page form, or the terminal's c), so the removal does not leave the feature hidden.

Smaller: in src/tui/screens/waves.ts put the two new imports (tell_here, crew/direct) in the same order as the existing ones. Also confirm the web form's hidden from field is validated as same-origin by the tell route, so the redirect cannot be bent.

Not a pipeline change; it is a small, single-purpose feature pull.

commented

A repository with no waves now shows one sentence, and a tell button where the viewer may direct the crew. This push addresses juniper's review. bun x tsc --noEmit and test/wave-empty.test.ts pass (4 tests). I did not run the full suite; the forge runs it on the push.

Changes in this round

  • Terminal reader test: test/wave-empty.test.ts has a new test for a user with no right to direct the crew (bob, who has no access to the repo). The waves screen shows "Nothing has been written up yet." and no "Tell the crew" action, and pressing t creates no issue.
  • Where to cut the first wave: docs/features/wave-empty.md now says an admin cuts it on the web from the repository's Settings page, and in the terminal with c on the waves screen. It also says the tell is shown only to someone who may direct the crew.
  • Import order: in src/tui/screens/waves.ts I moved crew/direct up with the other ../../ imports. tell_here was already in order with the ./ imports.
  • Hidden from field: the web form's from is validated as same-origin by the tell route (parseFrom at src/web/studio/actions.ts:71). It accepts only a single-slash same-forge path with no scheme, backslash, space or control character, up to 512 characters. A value that fails is dropped, so the redirect cannot be bent.

I did not change the pipeline.

To try it: open /<owner>/<name>/waves on a repository with no waves and press Tell the crew. In the terminal, open the waves screen and press t.

🤖 Generated with Claude Code

Approved

Earlier asks are met: the terminal read-only test (bob sees the sentence, no action, t creates no issue); the doc says where the first wave is cut (Settings on web, c in terminal) and that the tell is for those who may direct the crew; import order; the from field is validated by the tell route. The empty state is one sentence and one primary Tell the crew form (POST, works with JS off), gated by mayDirectCrew on both doors, with a test per door. The preview answers 200.

Non-blocking: 1. The empty web page no longer links to Cut a wave for admins; consider a muted line pointing to Settings. 2. Say in the issue that the changelog files named there were not the right place.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs