Commit Graph

191 Commits

Author SHA1 Message Date
a1acec5e60 fix(bot): refine reminder scheduling and topic routing 2026-03-24 15:04:42 +04:00
63e299134d fix(bot): preserve miniapp payloads after auth 2026-03-24 14:42:08 +04:00
7574cad0cc fix(miniapp): roll back vite 8 miniapp update 2026-03-24 05:33:11 +04:00
25f93a6d1f fix(miniapp): read telegram webapp dynamically 2026-03-24 05:25:01 +04:00
3d52038be5 fix(miniapp): wait for telegram init data before blocking 2026-03-24 05:09:29 +04:00
322e1bfd33 fix(bot): clear stale reminder draft buttons 2026-03-24 04:32:15 +04:00
2888438260 fix(bot): localize reminder cancellation replies 2026-03-24 04:23:22 +04:00
efc2e91bf6 fix(bot): support text cancellation of reminder drafts 2026-03-24 04:20:51 +04:00
782a8325ba fix(bot): correct sleep-aware reminder wording 2026-03-24 04:16:07 +04:00
83ffd7df72 feat(bot): add observable notification management 2026-03-24 03:58:00 +04:00
7e9ae75a41 feat(bot): simplify reminder confirmation flow 2026-03-24 03:18:50 +04:00
3112fd6b0d test(bot): clean up notification delivery fixtures 2026-03-24 02:41:47 +04:00
fedc4a4325 feat(bot): move ad hoc notifications to llm parsing 2026-03-24 02:39:22 +04:00
3507bc0522 chore(deps): align workspace with typescript 6 2026-03-24 02:04:18 +04:00
7218b55b1f feat(bot): add ad hoc reminder notifications 2026-03-24 01:28:26 +04:00
621bd75148 feat(miniapp): redesign admin payment management 2026-03-23 22:17:51 +04:00
5af14e101e feat(miniapp): carry overdue billing and admin role flows 2026-03-23 15:44:55 +04:00
ee8c53d89b feat(infra): add aws lambda pulumi deployment target 2026-03-23 13:56:15 +04:00
2688d66f33 fix(miniapp): hide paid rent reminders on home 2026-03-23 01:04:33 +04:00
7665af0268 feat(bot): quiet finance topics and support purchase payers 2026-03-22 20:27:43 +04:00
7d706eba07 fix(bot): use HTTPS for OIDC audience to match Cloud Scheduler 2026-03-17 13:51:10 +04:00
5196d8484a fix(miniapp): remove duplicate Your balance card from home screen 2026-03-17 02:37:49 +04:00
2c36802d6d fix(miniapp): translate Split By and Admin Access fields 2026-03-17 02:25:05 +04:00
a91bb00041 fix(miniapp): translate Exact amounts and Percentages split options 2026-03-17 02:21:30 +04:00
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
58cf69b9b6 fix(miniapp): update balance summary titles to reflect actual values 2026-03-17 00:47:35 +04:00
b981c7cf80 fix(miniapp): use correct totals in balance summary (totalDue, purchase ledger, utility ledger) 2026-03-17 00:39:22 +04:00
748878e789 feat(miniapp): add purchase-only and utilities balance sections to balances view 2026-03-17 00:28:35 +04:00
02c79ae629 feat: add payer control for purchases
- Add explicit payerMemberId field to purchase ledger entries
- Add 'Paid by' selector in mini app purchase add/edit forms
- Default payer to current user when creating new purchases
- Allow admins to change who made existing purchases
- Update backend handlers to accept and persist payerMemberId
- Add i18n translations for 'Paid by' label (EN/RU)

All quality gates pass: build, typecheck, lint, format, test

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-16 17:44:20 +04:00
b71480e9f1 fix(miniapp): prevent focus loss in destinations form 2026-03-16 04:46:09 +04:00
594c370677 refactor(miniapp): unify settings design with editable-list pattern 2026-03-15 03:48:40 +04:00
f8ab08a7cb fix(miniapp): use type import for JSX from solid-js 2026-03-15 03:22:07 +04:00
87f0ad0e8d feat(miniapp): restore utility categories CRUD in settings 2026-03-15 03:16:02 +04:00
25018a3c33 fix(miniapp): translate chat topic role in settings 2026-03-15 03:08:59 +04:00
07c5ffb82d Fix Bind Topic Error by making callback handling more robust
- Wrap answerCallbackQuery and editMessageText in try-catch to handle expired queries
- Answer callback queries as early as possible
- Add setup_tracking to allowed pending action types for better type safety
- Ignore 'query is too old' and 'message is not modified' errors gracefully
2026-03-15 02:50:32 +04:00
5e39cdf455 Fix setup command and refine payment clarification logic
- Fix BUTTON_TYPE_INVALID in non-private chats by using URL buttons for mini app links
- Localize clarification questions and processing messages
- Add language instructions to AI prompt
- Allow default payment amounts when not explicitly specified
2026-03-15 02:34:34 +04:00
afbda43c0e fix(bot): localize topic processor responses and allow optional payment amounts 2026-03-15 02:27:44 +04:00
3c53ab9e1a feat(bot): implement /app and /keyboard commands, add dashboard links 2026-03-15 02:13:32 +04:00
531e52b238 feat(bot): improve /setup UX and update checklist on /bind
- Enhance /setup message with a warmer greeting and binding instructions\n- Rename 'Setup' buttons to 'Create' for clarity\n- Track /setup message ID to enable automatic checklist updates when /bind is used\n- Refresh /setup checklist after successful topic binding\n- Update English and Russian translations
2026-03-15 01:44:13 +04:00
d0475743f8 fix(finance): gracefully handle initial state without rent rules
Allow building the finance dashboard even if no rent rule is configured for the cycle.
Defaults to 0 rent in the cycle's currency. Added regression tests in application
service and miniapp dashboard handler.
2026-03-15 01:38:54 +04:00
f4e5a49621 feat(bot): restore /bind command and improve /setup welcoming experience 2026-03-15 01:17:22 +04:00
b2e1e0f213 feat(bot): refactor /setup and add /bind command
- Simplify /setup message: remove chat ID, use emojis, compact layout
- Remove 'Bind' buttons from /setup
- Add /bind command for binding existing topics
- Remove old binding mode with 10-min timeout
- Update i18n translations for en and ru
2026-03-15 00:14:40 +04:00
e24c53dce2 feat(bot): replace /invite with /join_link command
- Remove /invite command and targeted invite flow
- Add /join_link command to generate shareable household join link
- Update i18n translations for en and ru
- Update command registration to include join_link in admin commands
2026-03-14 23:46:32 +04:00
0af8ea6f48 feat: add chat topic binding for casual conversation
Add ability to bind a dedicated chat topic where normal conversation
happens, separate from functional topics (purchases, payments, etc.)

- Add 'chat' to HOUSEHOLD_TOPIC_ROLES
- Add /bind_chat_topic command for admins
- Update i18n strings for en/ru
- Add command to admin scope in telegram-commands
2026-03-14 23:32:14 +04:00
290b18545e chore(bot): clean up topic processor log levels and add start log 2026-03-14 15:23:12 +04:00
b01a129466 fix(bot): include all schema properties in required array for OpenAI Structured Outputs 2026-03-14 15:04:13 +04:00
8de8419028 feat(bot): enhance topic processor logging for diagnosis
Added comprehensive logging to topic-processor.ts to capture API errors, parsing failures, and silent decisions. Also added result logging to purchase and payment ingestion handlers to trace the processor's output.
2026-03-14 14:54:49 +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
b44b3bde93 fix(bot): silence topic processor failure messages unless explicitly mentioned
Previously, the bot would reply with a 'Zzz...' message to every message in a topic if the topic processor failed or was missing. This change ensures the bot remains silent unless it is explicitly mentioned by the user.
2026-03-14 14:33:29 +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