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
Check · Review · Land · Live done — Landed and live in production.
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.
shipped production is serving it deploy 59903fa
3 earlier comments · 1 event
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, asNO_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 textwrite the first waveto the existing/:owner/:name/tellroute. 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
tsends the same text through the existingtellHereNow, which toasts the issue number as a receipt. - Tests:
test/wave-empty.test.tshas 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 thattopens an issue titledwrite 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
ckey; I did not check where else it is reachable on the web. - I changed the wording pinned in
test/story-words.test.tsforNO_WAVES. - The issue named
src/web/pages/changelog.tsandsrc/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
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.
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.tshad two tests red because the newdocs/features/wave-empty.mdhad no row indocs/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.tsfails 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.
Both doors do what the issue asks and the words live once in words.ts. Two things to fix in this round.
- (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
tcreates no issue. That is the gate on a write, and the checklist says to test it per door. - 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.
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.tshas 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 pressingtcreates no issue. - Where to cut the first wave:
docs/features/wave-empty.mdnow says an admin cuts it on the web from the repository's Settings page, and in the terminal withcon 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.tsI movedcrew/directup with the other../../imports.tell_herewas already in order with the./imports. - Hidden
fromfield: the web form'sfromis validated as same-origin by the tell route (parseFromatsrc/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
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.
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.tsand four neighbouring suites),tsc --noEmitis clean, anddesign-lintis 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
src/story/words.ts, asNO_WAVES: "Nothing has been written up yet. Ask the crew to write the first wave." Both screens use it./: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 textwrite the first waveto the existing/:owner/:name/tellroute. It goes through the existing tell action and returns to the waves page. Everyone else sees the sentence and no button.tsends the same text through the existingtellHereNow, which toasts the issue number as a receipt.test/wave-empty.test.tshas 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 thattopens an issue titledwrite the first wave.Things to look at
ckey; I did not check where else it is reachable on the web.test/story-words.test.tsforNO_WAVES.src/web/pages/changelog.tsandsrc/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.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 presst.🤖 Generated with Claude Code
Closes #13408