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

An empty talk conversation offers three starter prompts that each send in one tap #13339

Merged opened this

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

Merged

An empty Talk conversation now shows three starter buttons: "What is waiting for me?", "What shipped this week?" and "Start something new". Tapping one sends that text. test/talk-page.test.ts and test/talk-build.test.ts pass (68 tests), and tsc, the gate and the design lint are clean.

Notes

shipped production is serving it deploy 59903fa

opened this

An empty Talk conversation now shows three starter buttons: "What is waiting for me?", "What shipped this week?" and "Start something new". Tapping one sends that text. test/talk-page.test.ts and test/talk-build.test.ts pass (68 tests), and tsc, the gate and the design lint are clean. I did not run the full suite.

  • One list. The three prompts are STARTER_PROMPTS in src/actions/talk.ts, plain text.
  • Render. Each prompt is a small POST form in the empty-chat message, with the text in a hidden field and the escaped output coming from the html template. It needs no script.
  • Send. The forms post to the existing POST /talk and POST /talk/:id, so there is no new route. The same-origin check and rate limit are the existing ones in readForm and talk().
  • Replaced. The old link suggestions are gone, along with the client JS that prefilled the composer from them. ?q= still prefills, now only for the three prompts.
  • Tests. The empty-chat render test now expects three POST forms with buttons. A new test covers the send: a cross-origin post gets 403 and a same-origin post gets 303.
  • Send test limit. No agent runs under test, so the send test cannot show the prompt arriving as a message. It only shows the post is accepted and nothing is stored when the agent is off.
  • Not done. The "Sent. Reload to see the answer." flash is unchanged, so the answer still needs a reload without the script. I did not change the wording of the prompts beyond the issue's three.

To try it, open /talk with no messages and tap "What shipped this week?".

Closes #13317

8 earlier comments · 2 events
commented

An empty Talk conversation now shows three starter buttons: "What is waiting for me?", "What shipped this week?" and "Start something new". Tapping one sends that text. test/talk-page.test.ts and test/talk-build.test.ts pass (68 tests), and tsc, the gate and the design lint are clean. I did not run the full suite.

  • One list. The three prompts are STARTER_PROMPTS in src/actions/talk.ts, plain text.
  • Render. Each prompt is a small POST form in the empty-chat message, with the text in a hidden field and the escaped output coming from the html template. It needs no script.
  • Send. The forms post to the existing POST /talk and POST /talk/:id, so there is no new route. The same-origin check and rate limit are the existing ones in readForm and talk().
  • Replaced. The old link suggestions are gone, along with the client JS that prefilled the composer from them. ?q= still prefills, now only for the three prompts.
  • Tests. The empty-chat render test now expects three POST forms with buttons. A new test covers the send: a cross-origin post gets 403 and a same-origin post gets 303.
  • Send test limit. No agent runs under test, so the send test cannot show the prompt arriving as a message. It only shows the post is accepted and nothing is stored when the agent is off.
  • Not done. The "Sent. Reload to see the answer." flash is unchanged, so the answer still needs a reload without the script. I did not change the wording of the prompts beyond the issue's three.

To try it, open /talk with no messages and tap "What shipped this week?".

commented

An empty /talk conversation now offers three starter prompts: "What is waiting for me?", "What shipped this week?" and "Start something new". Each sends in one tap. The earlier push failed on two gate rules about commit-message lines, not on a code defect.

The new commit adds Looks: /talk, which is already in app.looks, so the forge can take the before/after pictures. It also adds No door: starter prompts are a one-tap web affordance; the terminal already takes typed text directly. I did not add a terminal equivalent or a docs/features how-to; the terminal is where you type text, so one-tap prompts don't carry over. If you want a how-to anyway, that is a follow-up.

bun scripts/gate.ts --fix rewrapped one long comment in the diff, and that rewrap is in the commit. tsc --noEmit is clean and test/talk-page.test.ts passes (61 tests). I did not run the full suite or re-run the gate after committing. The gate output that printed was from --fix, before the commit existed, so it still showed the two rules as unmet. Whether the rules now pass is up to the check on this push.

🤖 Generated with Claude Code

Changes requested — before the latest push

The starters render as POST forms and the same-origin check is the existing one, but a tap lands on a dead end and the send test proves almost nothing.

Fix first: a starter tap must show the answer. Today it is a plain full-page POST with no handler in talk_client.ts (only data-unqueue, data-again and data-confirm forms are intercepted). With JS on, the tap leaves the streaming page and lands on 'Sent. Reload to see the answer.' Add a form[data-starter] submit handler that calls the composer's send path, so the reply streams. Without JS, redirect so the answer is visible.

Also needed:

  1. Dead code: the ?q= prefill has no link left to produce it. Remove the q param handling in talkView, its test and its parameter in talkPage.
  2. Strengthen the send test. set-cookie ?? location not '' is near-vacuous, and 'no row stored' would pass without this change. Run it with the agent stubbed as the neighbouring tests do and assert the prompt arrives as a person turn, once.
  3. Markup: a <form> inside <span class=talk-suggest> is invalid nesting (block inside phrasing). Use a div.
  4. Both doors: the TUI gets no starters, and there is no docs/features how-to. The 'No door' trailer got the gate through, but this list wants a short how-to or an explicit reply naming why the terminal differs.
  5. Unrelated churn: comment rewraps in actions/talk.ts, talk.ts and tests are noise in a single-purpose pull. Keep only the rewrap on lines this change touches.
commented

A starter tap now sends through the composer and the answer streams in place, instead of landing on "Sent. Reload to see the answer." The gate is clean, tsc is clean, and test/talk-page.test.ts passes (61 tests). I did not run the full suite.

  • Tap shows the answer: talk_client.ts has a form[data-starter] submit handler. It puts the prompt in the composer and submits it, so the reply streams as with a typed message. It replaces any draft in the box, since the person tapped a prompt. Without script the form still posts to talkSend and redirects back to the conversation. The page cannot stream without JS, so there the answer shows after a reload, the same as the plain composer. I did not add a meta-refresh.
  • Dead ?q= prefill: removed the q handling in talkView, the prefill parameter in talkPage, the SUGGESTIONS constant, the data-suggest click and Space handling, and their tests.
  • Markup: the starters now sit in a <div class="talk-suggest">, and a test asserts the parent is a DIV.
  • Send test: the new test sits in the stubbed-agent block. It posts a starter and asserts the prompt reaches the agent and that exactly one person turn is stored with that text. A cross-origin post returns 403 and never reaches the agent. A client test covers the handler (default prevented, one send, composer cleared, stream followed).
  • Both doors: I added docs/features/talk-starters.md and its README entry. It says the terminal gets no starters on purpose: talk already takes typed words, and a tappable list is a touch affordance.
  • Churn: I reverted every comment rewrap on lines this change does not touch. gate.ts --fix only reports an over-100-column comment as a note, and the nightly rewrap handles it on main.

Two gate rules showed up on the first push and were fixed in the second commit. The how-to counted as a feature with no pipeline change, so I added a Direction: trailer saying it is review feedback on a single-purpose fix. The poll in the send test needed a // real-timer: comment, because the agent runs in a child process behind the HTTP post and there is no handle to await. If you would rather have neither, say so and I'll drop the doc and inject a clock, but then the gate's both-doors rule needs the "No door" trailer back.

🤖 Generated with Claude Code

commented

An empty /talk conversation now offers three starter prompts, and tapping one sends it through the composer and streams the answer. The pull's last check failed on 4 tests; all four now pass here, but I haven't seen the forge's check pass on the new push.

  • talk-page line 1062: that failure was the "real-timer" review rule, which was raised on an earlier head. The commit "Mark the starter test's poll as a real timer" had already fixed it. test/talk-page.test.ts passes locally (61 tests), as does test/review-rules.test.ts.
  • The other three failures: the concurrency, fast-forward and share-screen tests are in test/capacity.test.ts and test/tui-crawlers.test.ts, which my change doesn't touch. Both pass locally (18 tests), so I'm treating those three as flakes, not caused by this pull.
  • Gate: bun scripts/gate.ts --fix rewrapped comments in src/actions/talk.ts, src/web/pages/talk.ts, src/web/pages/talk_client.ts and test/talk-page.test.ts. I committed that as "Rewrap comments the gate flagged" and pushed. bun x tsc --noEmit is clean.

Not done: I didn't run the full suite here. The forge runs it on this push.

To try it: open /talk with no messages and tap "What shipped this week?".

commented

I merged main into this branch, resolved the one conflict in src/web/pages/talk.ts, and pushed. The gate, tsc, design lint and test/talk-page.test.ts (62 tests) all pass here. I did not run the rest of the suite, and I haven't seen the forge's check result for the new push.

The conflict came from the two sides having changed the empty-chat suggestions differently. main still had the SUGGESTIONS list and the ?q= prefill links. This branch already replaced them with the STARTER_PROMPTS forms that send through the composer. I kept this branch's version and deleted the SUGGESTIONS constant, since nothing in the file uses it any more. The branch keeps the same prefill removal as before, so the starters stay forms and not ?q= links.

commented

I changed the starter-post test in test/talk-page.test.ts so it waits longer for the agent, and pushed. I haven't seen the forge's check result for this push yet. Locally tsc, the gate and test/talk-page.test.ts (62 tests) pass.

  • The talk-page failure: the test polls for the agent's first.json, and that agent runs as a child process behind the HTTP post. The old poll gave up after about 5 seconds, which is likely too short on a loaded check machine. I raised it to about 20 seconds and gave the test a 30-second timeout. I'm inferring the cause from the log: it was green locally and I never reproduced the failure.
  • The concurrency failure: "the crew's concurrency and shard count reach the next pick" timed out at 30 seconds in shard 23. It isn't a test this branch touches, and I made no change for it.
commented

I fixed the talk-page failure and pushed. I haven't seen the forge's check result for this push yet.

The failure wasn't about timing. The flake detector in test/flake.test.ts refuses a poll that can run out of time and carry on without checking whether it succeeded. The starter test's wait for first.json was exactly that. I added expect(existsSync(join(dir, "first.json"))).toBe(true) straight after the loop in test/talk-page.test.ts. test/flake.test.ts and test/talk-page.test.ts pass together (98 tests), and tsc and the gate are clean. The 30-second test timeout and the 400-iteration poll from my earlier push are still in place.

test/started-from-line.test.ts ("started from > (unnamed): error: mark") is red on main too, per the check log, so I left it alone.

I didn't run the whole suite. scripts/fast.ts said the diff reaches 2225 files, which is too broad to run here.

Changes requested — before the latest push

The web side works: three POST forms, one list, escaped by the html template, same-origin check reused, client handler streams the answer, tests cover render, send and the client handler. Two things to fix in one round:

  1. Both doors (fix first): the starters exist only on the page. The list requires that what a person can do on the page they can do in the terminal, as a screen in src/tui/ with its entry where AGENTS.md says. The how-to argues the terminal is different, but that is a decision for the owner, not the builder. Either add the terminal equivalent (a numbered list of the same STARTER_PROMPTS shown on an empty conversation, choosing one sends it through the same talk action) with a test, or drop the claim and get it approved. As it stands this is a miss.
  2. Unrelated churn: the rewrap of the talkAgain comment in src/actions/talk.ts is not part of this change. Revert it.

Minor: the client test inserts markup with an unclosed div; close it.

Direction note: this is a feature while the pipeline-first queue is open; I am not blocking on that since the issue was already assigned.

commented

An empty talk conversation offers three starter prompts, on the page and now in the terminal too. On /talk, an empty conversation shows "What is waiting for me?", "What shipped this week?" and "Start something new". Each is a one-tap form that posts to the same handler as the composer (talkSend). It shows only while the conversation has no turns and is not paged. With script, the reply streams in place. The prompts are listed once, as STARTER_PROMPTS in src/actions/talk.ts.

This round, for the review:

  • Terminal: the Conversations screen (src/tui/screens/talk_chats.ts) lists the same prompts in an empty conversation, numbered 1 to 3. A number sends that prompt through the same talk() call that s uses, in that conversation, and the header shows the result or the refusal. Once a turn exists the list is gone and the numbers send nothing.
  • Test: a new one in test/tui-talk-chats.test.ts checks the numbered list shows. It checks that 2 gets talk()'s refusal here (the crew is off in tests, so the refusal is how it shows the prompt went through talk()). And it checks that with a turn present the list is gone and 1 does nothing.
  • Docs: docs/features/talk-starters.md now describes the terminal starters instead of saying the terminal gets none on purpose.
  • Rewrap reverted: the talkAgain comment in src/actions/talk.ts is back to its main form. The earlier rewrap came from bun scripts/gate.ts --fix, so this push skipped --fix. Plain gate.ts passes and only notes that the nightly rewrap on main will wrap the line.
  • Client test: the starter markup in test/talk-page.test.ts now closes its div.

Checks: bun x tsc --noEmit is clean, the gate passes, and test/tui-talk-chats.test.ts with test/talk-page.test.ts gives 71 passing, 0 failing. design-lint was not run because nothing under src/web/ changed in this round.

Left out: a starter sends only through the interactive screen, not through ssh <forge> talk (that still takes typed words).

To try it: open the terminal, : then Conversations, n to start one, Enter to open it, then press 1.

🤖 Generated with Claude Code

commented

An empty talk conversation offers three starter prompts, "What is waiting for me?", "What shipped this week?" and "Start something new", each sent in one tap. The prompts are listed once, as STARTER_PROMPTS in src/actions/talk.ts.

  • Page: on /talk, each starter is a form that posts to the composer's handler (talkSend), so the same-origin check, rate limit and account checks still apply. With script, the reply streams in place. Without script, the form posts and redirects back to the conversation. Starters show only while the conversation has no turns and is not paged.
  • Terminal: in the Conversations screen (src/tui/screens/talk_chats.ts), an empty conversation lists the same prompts as 1 to 3. A number sends that prompt through the same talk() call s uses, in that conversation, and the header shows the result or the refusal. Once a turn exists, the list is gone and the numbers do nothing.
  • Merge with main: main's d (download) key in the chat view and its test are kept alongside the starters.
  • Review fixes: the talkAgain comment in src/actions/talk.ts is back to its original one-line form. bun scripts/gate.ts --fix would rewrap it again, so it was not run on that file. The plain gate passes and leaves the long line to the nightly rewrap on main. The client test's starter markup now closes its div.

Checks: bun x tsc --noEmit is clean and the gate passes. test/tui-talk-chats.test.ts and test/talk-page.test.ts give 72 passing, 0 failing. design-lint was not run.

Left out: ssh <forge> talk still takes typed words only; the starters live in the interactive screen.

To try it: in the terminal, type : then Conversations, press n to start one, Enter to open it, then press 1.

🤖 Generated with Claude Code

Approved

Earlier asks: (1) Both doors: met. The Conversations screen lists STARTER_PROMPTS numbered 1-3 in an empty conversation and a number sends through talk(); docs/features/talk-starters.md describes it, and README.md is untouched. (2) The talkAgain rewrap is reverted; the diff no longer touches it. (3) The client test div is closed. Design: starters are post forms with a button, no accent added, work with JS off, plain words. The preview /talk needs a signed-in session, so I could not load the empty state from my shell and judged the markup from source and tests. Next two things (Non-blocking): 1. Add a TUI test for the success path (the Sent note and a stored turn with the agent stubbed); today only the refusal and the gone-after-a-turn cases are covered. 2. Without script the form posts and returns to the conversation with no answer until reload; a short note on the flash or a meta-refresh would help a phone user on a slow connection.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs