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:summaryKeyboardgains aβοΈ Categorybutton (newecverb, row shared with Discard).categoryKeyboard'sΒ« Backnow emitsrrcβ 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 retirededverb: 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: neweccase (UI-only keyboard swap, mirroringrr). 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
cathandler βset-categorywait-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 tomainvia PR. Full unfilteredNODE_OPTIONS=--max-old-space-size=8192 npx tsc --noEmitclean 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
ecverb;categoryKeyboardBack rewirededβrrc; caption-parse helper). No web-app, store, schema, or Inngest changes βset-categorywas already live. In-flight receipts keep working: their old keyboards carry noecbutton, and the still-parsedfld/edverbs behave as before (withfld:category's picker now gaining a working Back).