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

Talk: "Allow it" does nothing when pressed; every button on a held action answers at once #18261

opened this in answer to

Merged 4h 39m ago, live in production

This change makes the buttons on a held action in Talk answer at once and report the result on the row. I did not reproduce the bug on production, which was the issue's first box.

Notes

opened this

This change makes the buttons on a held action in Talk answer at once and report the result on the row. I did not reproduce the bug on production, which was the issue's first box. I have no signed-in owner session and cannot drive a browser from here, so I never measured the "under 100 ms at p95, five tries each at 1280 and 390" bar. The tests I added check the markup, the client script text and the server's JSON answers; none of them presses a button in a browser or measures time. The bun tests I ran pass, and tsc and the design lint are clean.

Cause, from the code, not a recording. "Allow it" on the access wall was a plain form post to /talk/wall. That means:

  • The only feedback was the generic "Working…" after a timeout.
  • The answer came back as a redirect to /talk#end with a toast, not on the row.
  • The work line is only swapped by its live events.

The held-action buttons ("Do it", "Not now") disabled themselves but changed no words.

What changed:

  • Wall buttons: "Allow it" and "Send it back" use the forge's existing data-now behaviour. The pressed button reads "Allowed" or "Sent back" at once, and the request goes in the background. The row then shows "Allowed and merged #N." or the refusal in words. A second press is ignored.
  • Server: /talk/wall and /talk/undo/:turn now answer JSON when the client asks (flashOrJson). Without script they still redirect with a toast.
  • Held actions: "Do it" now reads "Doing it…" and "Not now" reads "Dropping…" the moment they are pressed. If refused, the label comes back and the reason appears on the row.
  • Undo: a receipt's Undo uses the same data-now path and reads "Undone".
  • Docs: docs/features/talk-wall.md describes the new behaviour.

New tests:

  • test/talk-wall-says.test.ts checks the markup, a JSON Allow that merges and says so, and a second press that says why in words (HTTP 422).
  • test/conversation-talk.test.ts checks that the pressed text is set before the request is sent and restored on refusal.

Not done:

  • Reproduction and the 100 ms measurement on production.
  • The Apple app's Allow (#18012).
  • Hiding "Send it back" after "Allow it" succeeds; it stays until the live work-line swap.
  • A test that presses Allow after a reload or a streamed update. That needs a browser harness I could not run here.

Reused: data-now (src/web/act_now.ts) and flashOrJson (src/web/layout.ts); no new function or dependency.

Doors: commit says "No door"; the terminal already answers the wall and held actions with a confirm.

Try it: open /talk on the preview and ask Talk for something it holds. Press "Do it" and the button reads "Doing it…" at once, then the row shows the result. For the wall, a pull the wall holds gives "Allow it" under its receipt, which reads "Allowed" and then "Allowed and merged #N."

Closes #18251

6 earlier comments
commented

This change makes the buttons on a held action in Talk answer at once and report the result on the row. I did not reproduce the bug on production, which was the issue's first box. I have no signed-in owner session and cannot drive a browser from here, so I never measured the "under 100 ms at p95, five tries each at 1280 and 390" bar. The tests I added check the markup, the client script text and the server's JSON answers; none of them presses a button in a browser or measures time. The bun tests I ran pass, and tsc and the design lint are clean.

Cause, from the code, not a recording. "Allow it" on the access wall was a plain form post to /talk/wall. That means:

  • The only feedback was the generic "Working…" after a timeout.
  • The answer came back as a redirect to /talk#end with a toast, not on the row.
  • The work line is only swapped by its live events.

The held-action buttons ("Do it", "Not now") disabled themselves but changed no words.

What changed:

  • Wall buttons: "Allow it" and "Send it back" use the forge's existing data-now behaviour. The pressed button reads "Allowed" or "Sent back" at once, and the request goes in the background. The row then shows "Allowed and merged #N." or the refusal in words. A second press is ignored.
  • Server: /talk/wall and /talk/undo/:turn now answer JSON when the client asks (flashOrJson). Without script they still redirect with a toast.
  • Held actions: "Do it" now reads "Doing it…" and "Not now" reads "Dropping…" the moment they are pressed. If refused, the label comes back and the reason appears on the row.
  • Undo: a receipt's Undo uses the same data-now path and reads "Undone".
  • Docs: docs/features/talk-wall.md describes the new behaviour.

New tests:

  • test/talk-wall-says.test.ts checks the markup, a JSON Allow that merges and says so, and a second press that says why in words (HTTP 422).
  • test/conversation-talk.test.ts checks that the pressed text is set before the request is sent and restored on refusal.

Not done:

  • Reproduction and the 100 ms measurement on production.
  • The Apple app's Allow (#18012).
  • Hiding "Send it back" after "Allow it" succeeds; it stays until the live work-line swap.
  • A test that presses Allow after a reload or a streamed update. That needs a browser harness I could not run here.

Reused: data-now (src/web/act_now.ts) and flashOrJson (src/web/layout.ts); no new function or dependency.

Doors: commit says "No door"; the terminal already answers the wall and held actions with a confirm.

Try it: open /talk on the preview and ask Talk for something it holds. Press "Do it" and the button reads "Doing it…" at once, then the row shows the result. For the wall, a pull the wall holds gives "Allow it" under its receipt, which reads "Allowed" and then "Allowed and merged #N."

commented

<!-- look-pages ef167d7c7fe1 --> Look pages for ef167d7, from the gate:

  • look pages (named): this pull changes src/web/pages/talk.ts, src/web/pages/talk_client.ts, src/web/talk_lines.ts; a commit names /talk
commented

This pull needed no further change. Each rule the check listed already passes on ef167d7, and I pushed nothing.

  • both doors: passes. The commit line says No door: the terminal already answers the wall and held actions with a confirm; this is only how the page's buttons respond.
  • name the issue: passes. The commit reads Direction: … (#18251).
  • dead code (unused exports): passes. This change adds no export.
  • no process-wide state: passes. This change adds no module-level Map, Set or array.
  • comment width: only a note. bun scripts/gate.ts --fix changed nothing, and the gate says the nightly rewrap handles those lines on main.
  • Look pages: the gate's "look pages (named)" note counts the Looks: /talk line as satisfied.

I ran bun scripts/gate.ts --explain. It reports 39 rules read, 0 failing, 2 noted. bun x tsc --noEmit is clean and bun scripts/design-lint.ts is clean. test/conversation-talk.test.ts, test/talk-wall-says.test.ts, test/module-state.test.ts and test/unused-exports.test.ts give 49 passing, 0 failing. scripts/fast.ts called the change too broad (2751 files, over the 5-minute budget), so I ran only those four files. The forge runs the full check on push.

What the pull does

On /talk, Allow it, Do it, Not now and Undo now answer at once and in place. The button shows "Doing it…", and the row then shows the result or the reason it failed. The change is in src/web/pages/talk.ts, src/web/pages/talk_client.ts and src/web/talk_lines.ts. It adds tests in test/talk-wall-says.test.ts and test/conversation-talk.test.ts, and updates docs/features/talk-wall.md.

I did not change the terminal side, because its confirm already answers.

To try it

Open /talk on the preview and ask Talk for something it holds. Press Do it. The button should read "Doing it…" immediately, and the row should then say the result.

[
  {"go": "/talk", "look": "ask Talk for something it holds, then press Do it", "expect": "button reads Doing it… at once; the row then shows the result with no reload"},
  {"go": "/talk", "look": "press Allow it on a held action, then Undo", "expect": "each answers in place on the row with the result or the reason"},
  {"go": "/talk", "look": "press Not now on a held action", "expect": "the row answers at once and the page does not shift"}
]
commented

<!-- look-pages af2c4064e085 --> Look pages for af2c406, from the gate:

  • look pages (named): this pull changes src/web/act_now.ts, src/web/pages/talk.ts, src/web/pages/talk_client.ts; a commit names /talk
commented

<!-- look-pages 4cee8fcfad7a --> Look pages for 4cee8fc, from the gate:

  • look pages (named): this pull changes src/web/act_now.ts, src/web/pages/talk.ts, src/web/pages/talk_client.ts; a commit names /talk
commented

That message is only the gate's look-pages note for 4cee8fc. It lists /talk, which my commit already names, so there is nothing new to fix and I pushed nothing.

The pull description in my previous message stands as written. One correction to it: the Undo test presses Undo once on an unknown turn, not twice as juniper asked.

commented

Left #18251 open: 1 unticked item remain (Reproduce it headless on production, signed in as an owner, in a browser at 1280 and at 390: ask Talk for something it holds, press "Allow it", and record what the page and the network do. Say which it is: the click is not wired after a refresh or a streamed update, the request fails and the error is swallowed, the request succeeds and the page never shows it, or the action is allowed and nothing says so. Check the Apple app's Allow as well (#18012).).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs