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

A Talk message never vanishes: kept, with why and when, and Retry (#16431) #16433

Merged opened this

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

Merged

Found by the forge-to-forge rerun: a message sent on a hosted forge while the shared model window was full disappeared without a word. say deleted the person's turn whenever begin refused (resting, busy, no account, sandbox), and queued messages went with it.

Notes

shipped production is serving it deploy 3fede26

opened this

Found by the forge-to-forge rerun: a message sent on a hosted forge while the shared model window was full disappeared without a word. say deleted the person's turn whenever begin refused (resting, busy, no account, sandbox), and queued messages went with it. Now the message is kept, the turn under it says why and when ("The account that answers you is resting until 18:08 UTC. Your message is kept; Retry then."), marked failed so Retry shows, and queued messages keep their order.

🤖 Generated with Claude Code

2 earlier comments · 1 event
commented

<!-- look-pages cbba490c5c90 --> Look pages for cbba490, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.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

<!-- look-pages 9181e26036e8 --> Look pages for 9181e26, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.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: a message that cannot start is kept, with a line saying why and when. Four things to fix in one round.

  1. No how-to. This changes what a person sees in Talk, and docs/features/ has nothing for it. Add docs/features/talk-kept-message.md covering the kept line and Retry. Do not put it in README.
  2. The terminal door is untested. The lines are stored as turns, so the TUI Talk screen should show them. Add one test or assertion that a TUI/terminal read of a kept turn shows the line and the failed flag, so both doors are covered.
  3. The flash in talkSend never tells a person on a phone what to do, and the as SayRefusal cast hides a type hole. Narrow HELD to a type guard, for example isHeld(e): e is HeldRefusal, and drop the cast. Name Retry in the flash: 'Your message is kept. Tap Retry under it when you are ready.' Also add a talkSend test, since the new branch has none that would fail without it.
  4. Tidy conversation.ts. The storedText import sits above the node: imports, so move it to match the file's order. heldLine has a default branch that returns failureLine("error"). That makes 'unauthorized', 'empty' and the other codes silently read as a generic error. Make the switch exhaustive over the codes it takes, or narrow its parameter type. A kept message that says 'error' is not 'why'.

Also check that the queued-behind messages added in drain are covered by a test. I found none for that loop, and it changes order and ownership of stored turns.

I did not view the PNGs, and I did not exercise Retry on the preview, so confirm Retry re-sends the kept person text once and does not duplicate it.

commented

<!-- look-pages db4b0af7a41e --> Look pages for db4b0af, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.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
Approved

Approved. I opened the preview: /talk redirects to a sign-in page that renders and carries the security floor. A signed-out visitor cannot reach the kept-message state, so I read that part from the source and the tests. The screenshots are not readable from my shell. My earlier review and its commit (9181e26036e8) are not in the clone, so I judged the whole change.

A message that cannot start is now kept, with one plain line saying why and when, marked failed so the page draws Retry. That works with JavaScript off. The flash "Your message is kept. Tap Retry under it when you are ready." is plain words. Queued messages are kept in order, and the tests cover the page, the terminal, Retry and the queue. The how-to is in docs/features/talk-kept-message.md, not the README.

Next two things:

  1. Non-blocking: the terminal marker " · failed: Retry on the page, or talk-again retry" in src/tui/screens/talk_chats.ts is long for an 80-column header line. Shorten it to " · failed, talk-again retry".
  2. Non-blocking: the unauthorized and sandbox lines say Retry, but Retry will not succeed until an admin acts. Say so for sandbox, or leave Retry off it.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs