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

The Apple app can list and answer the actions Talk is holding for a person #18342

opened this

Merged 49m ago, live in production

The Apple app can now list the Talk actions held for the caller. The answer route already existed, so this change adds only the list. bun x tsc --noEmit, the gate and the new tests are clean.

Notes

opened this

The Apple app can now list the Talk actions held for the caller. The answer route already existed, so this change adds only the list. bun x tsc --noEmit, the gate and the new tests are clean. I also ran conversation-confirm and talk-door, the older tests for the answer route, and they pass. The forge's full check is still to run on this push.

What changed

  • New route: GET /api/v1/conversation-confirms returns {confirms: [...]}, oldest first, for the caller only. Each entry has id, tool, does, arguments, createdAt and expiresAt. These come from waitingConfirms, the same function the web card, Settings → Confirms and the terminal use, so the words are identical.
  • Who may ask: the route accepts the person's own session or their own token and refuses the forge's agent, runs and app tokens. That check is now one ownAuth helper shared by the list and the answer route, in src/http/api/conversation_confirms.ts. I added the GET to src/http/lazy_lists.ts and described it in docs/features/talk.md.
  • Answering: POST /api/v1/conversation-confirms/:id with {answer: "yes"|"no"} was already there. It calls sayYes and sayNo, the same functions the web uses, so the web's checks and receipt are unchanged.
    • Another person gets 404.
    • A second answer gets 409 and does nothing more.
  • Tests: test/apple-held.test.ts covers list (including that another person sees none and no login gets 401), approve, decline, another person, and repeat. A held close stands in as the effect: approving closes the issue, while declining or a repeat leaves it as it was.

What I left out

  • No src/actions/apple_held.ts: waitingConfirms, sayYes and sayNo already are the shared functions, and a wrapper would be dead code under the dead-code test.
  • No terminal change: the terminal's confirms screen already lists and answers these, so the commit says No door: for that.
  • src/web/pages/games_door.ts: not touched.

Try

  • GET /api/v1/conversation-confirms with your own rw token on the preview lists what Talk is holding for you.
  • POST to /api/v1/conversation-confirms/<id> with {"answer":"no"} declines one.

Closes #18338

commented

The Apple app can now list the Talk actions held for the caller. The answer route already existed, so this change adds only the list. bun x tsc --noEmit, the gate and the new tests are clean. I also ran conversation-confirm and talk-door, the older tests for the answer route, and they pass. The forge's full check is still to run on this push.

What changed

  • New route: GET /api/v1/conversation-confirms returns {confirms: [...]}, oldest first, for the caller only. Each entry has id, tool, does, arguments, createdAt and expiresAt. These come from waitingConfirms, the same function the web card, Settings → Confirms and the terminal use, so the words are identical.
  • Who may ask: the route accepts the person's own session or their own token and refuses the forge's agent, runs and app tokens. That check is now one ownAuth helper shared by the list and the answer route, in src/http/api/conversation_confirms.ts. I added the GET to src/http/lazy_lists.ts and described it in docs/features/talk.md.
  • Answering: POST /api/v1/conversation-confirms/:id with {answer: "yes"|"no"} was already there. It calls sayYes and sayNo, the same functions the web uses, so the web's checks and receipt are unchanged.
    • Another person gets 404.
    • A second answer gets 409 and does nothing more.
  • Tests: test/apple-held.test.ts covers list (including that another person sees none and no login gets 401), approve, decline, another person, and repeat. A held close stands in as the effect: approving closes the issue, while declining or a repeat leaves it as it was.

What I left out

  • No src/actions/apple_held.ts: waitingConfirms, sayYes and sayNo already are the shared functions, and a wrapper would be dead code under the dead-code test.
  • No terminal change: the terminal's confirms screen already lists and answers these, so the commit says No door: for that.
  • src/web/pages/games_door.ts: not touched.

Try

  • GET /api/v1/conversation-confirms with your own rw token on the preview lists what Talk is holding for you.
  • POST to /api/v1/conversation-confirms/<id> with {"answer":"no"} declines one.
commented

The two failures that came from my change are fixed, and the fix is pushed as ccae7998b. The third, the first-view budget test, I did not touch: it passed in my local run and I didn't look into why it failed in the check.

GET /api/v1/conversation-confirms was new and neither test knew about it:

  • OpenAPI contract: I added src/contract/openapi/routes/getApiV1ConversationConfirms.ts and regenerated the route index with bun scripts/openapi-routes.ts. This fixes the "every JSON route has an OpenAPI row" failure.
  • Timing allowlist: I added the route to UNTIMED in test/route-timing-coverage.test.ts with the reason (one indexed read, no page to phase). This fixes the "no GET route answers 200 without a session phase" failure.

Locally I ran test/openapi-covers-routes.test.ts, test/route-timing-coverage.test.ts, test/openapi-routes.test.ts and test/attention-stamped.test.ts: 609 pass, 0 fail. The first-view budget test is in test/attention-stamped.test.ts. tsc --noEmit and gate.ts --fix ran clean, and I did not run the full suite.

The commit message says "No door", because the route's web and terminal sides already exist. The forge's check will run again on this push.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs