Skip to content

T 174


uid: T-174 title: Receipt bot β€” ✏️ Category button on the summary opens the category picker status: done area: telegram-receipts created: 2026-07-22 updated: 2026-07-22 owner: girafeev1 assignee: Records (Infrastructure) related: T-067, T-173


Goal (owner, 2026-07-22)

"Also, add an edit button > show list of categories for user to manually change categories after the image is processed"

The parsed-receipt summary card had no way to change the category from Telegram: when the old field-edit sub-menu was retired (its Β« Back was mis-wired to Confirm β€” PR #401 moved editing to the web app), the category picker went down with it, even though the whole downstream path β€” the cat callback handler and the Inngest wait-loop's set-category action β€” stayed alive and working.

What shipped

  • lib/telegram/botMenu.ts: summaryKeyboard gains a ✏️ Category button (new ec verb, row shared with Discard). categoryKeyboard's Β« Back now emits rrc β€” the generic "close sub-menu, restore summary keyboard" verb the Re-run AI menu already uses, with the detail state (dt1/dt0) threaded so the Detail label survives the round trip. Previously Back emitted the retired ed verb: a dead-end "Edit on the web app" toast with the picker left stuck on screen β€” the same navigation-bug family that got Telegram edits retired.
  • pages/api/telegram/receipt-webhook.ts: new ec case (UI-only keyboard swap, mirroring rr). The picker β€’-marks the current category by reverse-mapping the tapped message's own caption ("🏷️ Category:
  • Nothing downstream changed: picking a category goes through the pre-existing cat handler β†’ set-category wait-loop action, which re-renders the caption and restores the summary keyboard β€” so the picker closes itself after a pick. Full 18-category set per T-067.

Log

  • 2026-07-22 β€” created + done (Records Infrastructure; owner instruction quoted above, proposed and approved in the same message). βœ… Read AGENTS.md Β· checked the board by scope (T-067 owns the category set, T-173 the note-confirmation UX; no task covers re-exposing category edit in Telegram β€” no dup). Source: Records (Infrastructure) Β· https://claude.ai/code/session_018RDB37kCqfouHdygVXTAtD
  • SHAs: 1e761648 (code) + the docs commit carrying this record; merged to main via PR. Full unfiltered NODE_OPTIONS=--max-old-space-size=8192 npx tsc --noEmit clean pre-merge.
  • Deploy pending β€” merged, not deployed (deploys are owner-ordered). Owner runtime-verify (after the next deploy): on a processed receipt's summary card tap ✏️ Category β†’ the two-column category list appears with a β€’ on the current one β†’ tap another β†’ toast "Set:
  • Blast-radius: Telegram summary-card keyboard only (new ec verb; categoryKeyboard Back rewired edβ†’rrc; caption-parse helper). No web-app, store, schema, or Inngest changes β€” set-category was already live. In-flight receipts keep working: their old keyboards carry no ec button, and the still-parsed fld/ed verbs behave as before (with fld:category's picker now gaining a working Back).