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

Talk's Send: shown at once, never doubled, a queued message is plain and editable (#16579) #16582

opened this

Check · Review · Land · Live — Its check is queued. Next: reviewer, pushed since the last review.

Ready to land

The owner: "if i hit send twice it will send then queue one. client should insta respond and not let me mess up".

Notes · 6 files · +370 −35

working queued to check deploy 989bfd4

Check queued 3m, place 2 of 3Check of 989bfd4fast tier: queued · full gate runs on land

Website spec: 25 findings (report only)
opened this

The owner: "if i hit send twice it will send then queue one. client should insta respond and not let me mess up". Send puts the message in the thread at once (Sending…), empties the box and is disabled until the server answers, so a double tap, Enter or a resubmit does nothing more; every send carries an idempotency key, so two requests for one press keep one message (with no script, the form carries its own key). A message sent while Talk answers shows "Queued: sends when this answer ends." with Edit and Drop, never a silent second turn. Proven in Chromium at 390x844 with touch.

🤖 Generated with Claude Code

2 earlier comments
commented

<!-- look-pages 982f9102e72a --> Look pages for 982f910, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.ts, src/web/pages/talk_client.ts; the forge pictures /talk (src/web/pages/talk.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

Check run 01m8g7a803026hb1hpsrdg4ahf on this pull failed in 48s, and the next run for #16582 is a deploy (01m8g80t7taj90vmqk7z6s5t9x), with no green check between them. If this landed or went live past that failure, name the failing step, fix it in one push, and show one green check; if it can't go green, revert. Nothing should deploy on a red check (#16215).

commented

<!-- look-pages cf45418d59c5 --> Look pages for cf45418, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.ts, src/web/pages/talk_client.ts; the forge pictures /talk (src/web/pages/talk.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Changes requested — before the latest push

The idea is right: shown at once, one press is one message, and a queued message is plain with Edit and Drop. The key on the form keeps no-JS to one message. There are three problems, the first two in src/web/pages/talk_client.ts send.

  1. A failed send loses the attachments. attached.length = 0 and chips.replaceChildren() run before the fetch, but back() restores only the text. Someone who attaches a file and hits a flaky connection gets their words back and the file gone. This breaks the promise that a failed send puts it all back. Fix: keep files and the chips and re-attach them in back(). Add a test for it.
  2. Screen readers are not told. The old say("Sending…") was removed. The pending line is a plain <li> outside any live region, so sending, failing and restoring are silent apart from fail(). Fix: keep say("Sending…"). Give the pending row's meta role=status or call say on the transitions.
  3. Any person turn on the stream removes the pending line. if (turn.role === "person") { ... p.remove() } also fires for a person turn from another tab or from an earlier queued message that starts. The pending line then vanishes while this tab's fetch is still out, and back() has nothing to restore. Fix: match the pending line to its own turn, for example by the key or the text, and remove it only then.

Smaller:

  • queuedForm in the client repeats the markup of queuedHtml in talk.ts. That is two places to keep in step, and the pull's own test pins only the server copy. Fix: take the row from the server's queued frame or one shared template, so there is one way to draw it.
  • Edit appends to a non-empty box. That is fine, but say it in the status text.

Looked at and fine: the same-origin and per-person scope of the idempotency key, the lookup, send and store with no await between them, the docs in docs/features/talk.md rather than README, the terminal's existing /queue and /unqueue, and the js-only Edit with a Drop form that works without the script. The design principles hold: rows, one accent, plain words.

What I saw of the preview: GET /talk with the token answers 303 and, followed, the Sign in page (titled Sign in), so the composer sits behind a login the token does not pass. The forge pictures are not mounted in my sandbox, so I report no look at them. The three points above come from the diff and its test, which drives the double tap and the queued row at 390 px.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs