Commit Graph

47 Commits

Author SHA1 Message Date
fcdd0f2aaf feat(bot): add /dashboard command and MINI_APP_URL config
- Add /dashboard command to BotFather registration alongside /app
- Add new MINI_APP_URL env var for dashboard URL (separate from CORS origins)
- Pass MINI_APP_URL and BOT_API_URL in CD workflow
- Update Terraform with new variable for future infrastructure deployments
2026-03-17 02:17:11 +04:00
572c21f621 feat(bot): add error logging to topic processor
Previously, the topic processor swallowed errors silently, making debugging impossible. This commit adds error logging to the topic processor catch block.
2026-03-14 14:43:32 +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
1274cefc0f Stabilize purchase functionality: fix ID prefix, uniqueness, and split participant inclusion 2026-03-13 22:29:17 +04:00
94a5904f54 feat(miniapp): refine UI and add utility bill management
- Fix collapsible padding and button spacing
- Add subtotal to balance card
- Add utility bill management for admins
- Fix lints and type checks across the monorepo
- Implement rejectPendingHouseholdMember in repository and service
2026-03-13 05:52:34 +04:00
23faeef738 feat(bot): add topic history-aware assistant replies 2026-03-12 19:06:51 +04:00
8374d18189 feat(bot): add shared topic router 2026-03-12 17:12:26 +04:00
a78eb88fa4 fix(bot): hand off reminder dashboard opens through dm 2026-03-11 22:36:43 +04:00
6b8c2fa397 feat(bot): add reminder utility entry flow 2026-03-11 22:23:24 +04:00
0787847c19 feat(member): improve assistant roster awareness 2026-03-11 15:10:20 +04:00
98988159eb feat(member): add away billing policies 2026-03-11 14:05:52 +04:00
773abf2531 feat(member): add household lifecycle states 2026-03-11 13:44:38 +04:00
3ff4bbc246 feat(bot): add structured payment topic confirmations 2026-03-11 11:23:49 +04:00
dd243d7edd feat(bot): route purchase dms through confirmation flow 2026-03-11 06:19:14 +04:00
1b8c6e87f6 feat(bot): add guided setup topic binding flow 2026-03-11 05:20:53 +04:00
ac5f11f8da fix(bot): harden webhook processing and purchase defaults 2026-03-11 03:25:16 +04:00
714d2a985d feat(bot): add conversational DM assistant flow 2026-03-11 01:41:58 +04:00
a63c702037 feat(bot): add confirmed purchase proposals in topic ingestion 2026-03-11 01:32:47 +04:00
753286a1f6 feat(finance): add billing correction APIs and cycle rollover 2026-03-10 22:03:30 +04:00
b7658164a8 feat(miniapp): improve mobile billing and utility controls 2026-03-10 18:50:19 +04:00
1988521931 feat(payments): track household payment confirmations 2026-03-10 17:00:45 +04:00
fb85219409 feat(finance): add settlement currency and cycle fx rates 2026-03-10 16:46:59 +04:00
4b4f7d46e5 feat(miniapp): add member rent weight controls 2026-03-10 02:48:12 +04:00
29563c24eb feat(miniapp): add cycle-level billing controls 2026-03-10 01:53:11 +04:00
565ac277c1 feat(miniapp): add admin billing settings foundation 2026-03-10 01:38:03 +04:00
16f9981fee feat(bot): add multi-household reminder delivery 2026-03-09 16:50:57 +04:00
2d8e0491cc feat(bot): persist locale preferences across mini app and replies 2026-03-09 13:17:46 +04:00
d5872ede57 feat(miniapp): add pending member admin approval 2026-03-09 06:29:23 +04:00
7c602900ee feat(bot): cut over multi-household member flows 2026-03-09 06:14:57 +04:00
4e200b506a feat(bot): add guided private prompts 2026-03-09 05:15:29 +04:00
fac2dc0e9d feat(bot): add household admin approval flow 2026-03-09 04:58:14 +04:00
69c6f765a6 fix(bot): avoid invalid group join button 2026-03-09 04:31:41 +04:00
8109163067 feat(onboarding): add mini app household join flow 2026-03-09 04:16:34 +04:00
e63d81cda2 feat(bot): add multi-household setup flow 2026-03-09 03:40:20 +04:00
8645a0a096 feat(observability): add structured pino logging 2026-03-09 01:03:08 +04:00
7ffd81bda9 feat(bot): add anonymous feedback flow 2026-03-08 22:50:55 +04:00
c5c356f2b2 feat(miniapp): add finance dashboard view 2026-03-08 22:40:49 +04:00
f8478b717b feat(miniapp): add telegram-authenticated shell 2026-03-08 22:30:59 +04:00
fd0680c8ef feat(infra): add reminder scheduler jobs 2026-03-08 22:23:19 +04:00
6c0dbfc48e feat(bot): add secure reminder job runtime 2026-03-08 22:15:01 +04:00
f6d1f34acf feat(architecture): add finance repository adapters 2026-03-08 22:14:09 +04:00
Stas
fad17b690f feat(bot): add finance cycle and statement commands (#12) 2026-03-05 03:52:10 +03:00
ebb6ce4ce6 feat(WHE-23): add hybrid purchase parser with persisted parse metadata 2026-03-05 04:43:57 +04:00
67e9e2dee2 feat(WHE-22): ingest configured topic messages with idempotent persistence 2026-03-05 04:32:58 +04:00
f8c3e4ccf5 feat(WHE-21): scaffold grammy webhook bot server 2026-03-05 04:17:04 +04:00
Stas
4a26ac81d6 Codex/whe 15 bootstrap workspace (#1)
* feat(WHE-15): bootstrap bun workspace with app and package scaffolds

* chore(WHE-17): switch workspace typecheck to tsgo

* chore(WHE-16): configure oxlint and oxfmt no-semicolon style

* chore: address CodeRabbit review feedback

* chore: apply coderabbit fixes and add review script

* docs: add ADR decision metadata
2026-03-05 00:56:24 +03:00