Commit Graph

88 Commits

Author SHA1 Message Date
7b50fb26fb fix(db): add checksum for notification migration 2026-03-24 01:51:47 +04:00
cd4cebf2d9 fix(application): preserve exact payment guidance amounts 2026-03-24 01:49:04 +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
7665af0268 feat(bot): quiet finance topics and support purchase payers 2026-03-22 20:27:43 +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
fcafdefa76 fix(db): properly set search_path via URL options for PgBouncer compatibility 2026-03-16 03:21:27 +04:00
6b38e0898c chore(db): update migration checksums for 0020 migration 2026-03-15 21:08:43 +04:00
0747973c8f feat(db): add rent_payment_destinations column and multi-schema support
- Add migration 0020 for rent_payment_destinations jsonb column
- Add DB_SCHEMA env var support for multi-schema deployments
- Create custom migrate.ts script with proper search_path handling
- Update drizzle.config.ts and client.ts to use DB_SCHEMA
- Add db_schema variable to Terraform with dev=test/prod=public defaults
- Update CD workflow to set DB_SCHEMA based on branch
2026-03-15 20:26:26 +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
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
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
e77bae9426 test(adapters-db): increase integration test timeouts to 10s 2026-03-14 14:58:08 +04:00
b3bef4a5c9 chore: update migration checksums for 0020_silver_payments
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-14 08:58:32 +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
588174fa52 Support rebalance and validate purchase splits
Add ParticipantShare type and client-side rebalance/validation helpers for purchase splits (rebalancePurchaseSplit, recalculatePercentages, calculateRemainingToAllocate, validatePurchaseDraft). Integrate rebalancing and validation into the miniapp ledger UI (auto-adjust shares, percentage<>amount syncing, remaining/error display, prefill participants on new purchase, disable save when invalid). On the backend, tighten input validation in finance-command-service for custom_amounts (require explicit shares and sum match) and make settlement-engine more lenient when reading legacy/malformed custom splits (ignore missing shares, accept explicit subset). Also add a test ensuring dashboard generation doesn't 500 on legacy malformed purchases.
2026-03-13 07:54:30 +04:00
ba99460a34 fix(feedback): normalize anonymous rate limit timestamps 2026-03-13 06:16:21 +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
b7fa489d24 Fix topic message history persistence 2026-03-12 19:21:37 +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
0d2065fd5e feat(miniapp): redesign balance and due-state flows 2026-03-12 14:08:55 +04:00
6053379f31 fix(miniapp): clarify cycle summary and balance sections 2026-03-12 13:12:39 +04:00
a50b826b40 feat(miniapp): improve billing settings controls 2026-03-12 11:37:57 +04:00
4c19ee798d feat(miniapp): add household general settings 2026-03-12 11:30:11 +04:00
4e7400e908 feat(bot): add configurable household assistant behavior 2026-03-12 03:22:43 +04:00
135a2301ca feat(miniapp): redesign member balance surfaces 2026-03-12 02:10:22 +04:00
6b8c2fa397 feat(bot): add reminder utility entry flow 2026-03-11 22:23:24 +04:00
e211ab9391 chore(db): update migration checksums 2026-03-11 16:02:06 +04:00
086e521ce7 feat(setup): add reply-based household invites 2026-03-11 15:21:18 +04:00
0787847c19 feat(member): improve assistant roster awareness 2026-03-11 15:10:20 +04:00
79f96ba45b feat(payments): add transparent balance guidance 2026-03-11 14:52:09 +04:00
8401688032 feat(purchase): add per-purchase participant splits 2026-03-11 14:34:27 +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
b6b6f9e1b8 feat(bot): add safe group unsetup flow 2026-03-11 06:08:34 +04:00
1b8c6e87f6 feat(bot): add guided setup topic binding flow 2026-03-11 05:20:53 +04:00
60a5cd332e chore(config): align default ai model settings 2026-03-11 04:51:51 +04:00
4dd469a0fe chore(bot): log assistant stage timings 2026-03-11 03:41:03 +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
4dde04ca06 fix(finance): prefer open cycle in dashboard 2026-03-11 00:36:42 +04:00
753286a1f6 feat(finance): add billing correction APIs and cycle rollover 2026-03-10 22:03:30 +04:00
54895c0bd2 refactor(db): replace legacy fixture seed 2026-03-10 18:50:50 +04:00
be4d388e2f refactor(config): remove single-household deploy legacy 2026-03-10 18:50:44 +04:00
b7658164a8 feat(miniapp): improve mobile billing and utility controls 2026-03-10 18:50:19 +04:00