Commit Graph

21 Commits

Author SHA1 Message Date
7665af0268 feat(bot): quiet finance topics and support purchase payers 2026-03-22 20:27:43 +04:00
f38ee499ae feat(bot): unified topic processor replacing router+interpreter stack
Replace 3-layer architecture (gpt-5-nano router + gpt-4o-mini interpreter) with
single unified topic processor (gpt-4o-mini) for simplified message handling.

New components:
- HouseholdContextCache: TTL-based caching (5 min) for household config data
- TopicProcessor: Unified classification + parsing with structured JSON output

Key changes:
- Renamed ASSISTANT_ROUTER_MODEL → TOPIC_PROCESSOR_MODEL
- Added TOPIC_PROCESSOR_TIMEOUT_MS (default 10s)
- Refactored save() → saveWithInterpretation() for pre-parsed interpretations
- Removed deprecated createOpenAiTopicMessageRouter and ~300 lines legacy code
- Fixed typing indicator to only start when needed (purchase routes)
- Fixed amount formatting: convert minor units to major for rawText

Routes: silent, chat_reply, purchase, purchase_clarification, payment,
payment_clarification, topic_helper, dismiss_workflow

All 212 bot tests pass. Typecheck, lint, format, build clean.
2026-03-14 13:33:57 +04:00
488a488137 feat: add quick payment action and improve copy button UX
Mini App Home Screen:
- Add 'Record Payment' button to utilities and rent period cards
- Pre-fill payment amount with member's share (rentShare/utilityShare)
- Modal dialog with amount input and currency display
- Toast notifications for copy and payment success/failure feedback

Copy Button Improvements:
- Increase spacing between icon and text (4px → 8px)
- Add hover background and padding for better touch target
- Green background highlight when copied (in addition to icon color change)
- Toast notification appears when copying any value

Backend:
- Add /api/miniapp/payments/add endpoint for quick payments
- Payment notifications sent to 'reminders' topic in Telegram
- Include member name, payment type, amount, and period in notification

Files:
- New: apps/miniapp/src/components/ui/toast.tsx
- Modified: apps/miniapp/src/routes/home.tsx, apps/miniapp/src/index.css,
  apps/miniapp/src/theme.css, apps/miniapp/src/i18n.ts,
  apps/bot/src/miniapp-billing.ts, apps/bot/src/server.ts

Quality Gates:  format, lint, typecheck, build, test

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-14 08:51:53 +04:00
f1670c521f Refine topic workflow followups 2026-03-13 02:21:08 +04:00
23faeef738 feat(bot): add topic history-aware assistant replies 2026-03-12 19:06:51 +04:00
5ebae7714c fix(bot): improve purchase-topic conversation flow 2026-03-12 18:23:26 +04:00
8374d18189 feat(bot): add shared topic router 2026-03-12 17:12:26 +04:00
014d791bdc fix(bot): improve calculated purchase confirmation flow 2026-03-12 15:35:02 +04:00
ca61085179 Fix purchase topic engagement gating 2026-03-12 14:44:55 +04:00
8401688032 feat(purchase): add per-purchase participant splits 2026-03-11 14:34:27 +04:00
fce2d30beb feat(bot): support tagged assistant replies in topics 2026-03-11 12:15:56 +04:00
dd243d7edd feat(bot): route purchase dms through confirmation flow 2026-03-11 06:19:14 +04:00
ac5f11f8da fix(bot): harden webhook processing and purchase defaults 2026-03-11 03:25:16 +04:00
dc09a07e21 feat(bot): show processing replies during llm work 2026-03-11 03:10:23 +04:00
a63c702037 feat(bot): add confirmed purchase proposals in topic ingestion 2026-03-11 01:32:47 +04:00
bebff07ee8 feat(bot): localize household flows and finance replies 2026-03-09 07:34:59 +04:00
29f6d788e7 refactor(time): migrate runtime time handling to Temporal 2026-03-09 07:18:09 +04:00
7c602900ee feat(bot): cut over multi-household member flows 2026-03-09 06:14:57 +04:00
e63d81cda2 feat(bot): add multi-household setup flow 2026-03-09 03:40:20 +04:00
3152858aac feat(test): add local billing smoke test 2026-03-08 20:14:36 +04:00
67e9e2dee2 feat(WHE-22): ingest configured topic messages with idempotent persistence 2026-03-05 04:32:58 +04:00