46 Commits

Author SHA1 Message Date
SmileQWQ
3edff87727 perf: trim main statistics and ai summary inputs
- keep the existing overview DTO surface while reducing duplicated projected statistics work under the hood

- shrink dashboard AI summary inputs to top and non-empty slices so generated copy stays lighter without changing the response contract

- add regression coverage for overview field compatibility and the reduced AI summary payload shape
2026-05-16 21:13:58 +08:00
SmileQWQ
080e8c81c6 perf: steady main cron renewal and debug paths
- reuse timezone and exchange-rate context across auto-renew batches while adding VPS-friendly renewal guard rails

- expose auto-renew batch tuning through env and keep notification scan debug candidates off the default cron path

- cover the new renewal limits and scan-debug routing with targeted regression tests
2026-05-16 21:13:58 +08:00
SmileQWQ
86d1c83a5f perf: batch main backup import writes
- batch SubTracker backup payment record restores and narrow append duplicate checks to reduce SQLite write churn

- skip append order rewrites when the import is a no-op while keeping replace and restore behavior unchanged

- add route and service regression coverage for stable backup commit responses and batched restore semantics
2026-05-16 20:45:49 +08:00
SmileQWQ
59b5ed7042 fix: dedupe merged notification deliveries by reminder entry
- carry merged reminder dispatch through per-entry dedup metadata so count changes do not resend the same cycle

- route direct channels through shared presentation and dispatch helpers so pending-entry filtering and single-entry fallback stay consistent

- add regression coverage for merged reminder count changes, direct-channel fallback and webhook retry behavior
2026-05-12 15:35:49 +08:00
SmileQWQ
c4d6853916 refactor: unify direct notification message dispatch
- introduce a shared direct-notification message model for title and body rendering across channels

- route forgot-password verification delivery through the same channel senders instead of faking subscription reminder payloads

- keep test notifications on the unified message path so direct channels stay consistent
2026-05-11 22:24:41 +08:00
SmileQWQ
1ed1e01f8d feat: add in-app release update notices
- add a public version updates endpoint that reads GitHub releases and filters tags above the current app version

- show a brand-area update dot and release modal in the web app with shared DTOs and query helpers

- cover the endpoint and sidebar indicator flow with regression tests
2026-05-10 18:40:06 +08:00
SmileQWQ
c36cfec236 feat: improve subscription deletion and detail metrics
- prevent direct deletion of active subscriptions and allow batch delete to skip active items with clearer feedback

- add current cycle and remaining value metrics to subscription detail and convert remaining value into the base currency

- render compact reminder rule entries and cover the new batch delete and detail behavior with regression tests
2026-05-10 17:36:27 +08:00
SmileQWQ
262f7e738e feat: add notification-based password recovery
- add shared schemas, auth routes and channel delivery for password reset verification codes

- gate forgot-password availability on the settings switch plus direct notification channels

- surface login and settings controls in the web app with regression coverage
2026-05-10 17:35:35 +08:00
SmileQWQ
8c3a61b17e feat: add ai summary backend flow
- add shared ai summary prompt and dto fields for the latest-only summary state
- implement in-memory summary generation, preview caching, and dashboard summary routes
- cover the backend summary flow with route and service tests
2026-05-03 04:47:45 +08:00
SmileQWQ
7254f21ad1 fix: align main backup copy and timezone naming
- sync the backup modal and restore success wording on main with the confirmed lite copy
- generate exported backup filenames in the configured app timezone instead of UTC
- extend web and api regression tests for the updated backup wording and filename behavior
2026-05-03 00:43:23 +08:00
SmileQWQ
3f6717ce23 feat: add zip backup import and restore flow
- add shared and api contracts for SubTracker backup inspect, commit and export

- add ZIP backup modal and settings entry for backup and migration flows

- remove legacy CSV and JSON subscription export path in favor of backup flow
2026-05-02 16:46:11 +08:00
SmileQWQ
7a7cc54f1b fix: clean old notification dedup records
- keep notification idempotency records for 90 days
- clean only Setting rows with the notification: prefix
- run cleanup through a once-per-day local-time gate instead of every scan
- add unit coverage for the retention cutoff and daily gate
2026-05-01 19:53:37 +08:00
SmileQWQ
f950c011c8 fix: resolve shared package in api tests
- point API and Web Vitest directly at the shared package source
- avoid relying on packages/shared/dist existing before tests run in a clean CI checkout
- avoid reading app settings from Prisma when Wallos preview test options provide defaults
- restore latest Docker tags for release images
2026-05-01 19:47:31 +08:00
SmileQWQ
6009ea1938 fix: make reminder scans diagnosable
- allow same-day makeup scans after the configured reminder time without crossing into the next day
- include subscription-specific and legacy reminder windows when selecting scan candidates
- keep reminder delivery idempotent through period keys, including merged notifications
- add a dry-run scan-debug endpoint for manual diagnosis
- replace noisy cron output with concise user-readable scan and channel summaries
- add regression tests for reminder makeup windows and scan-debug routing
2026-05-01 18:32:43 +08:00
SmileQWQ
85f6430907 feat: improve batch and tag management UX
- add batch status override for active, paused, and cancelled subscriptions
- support selecting and clearing the current rendered/page subscriptions in batch mode
- switch multi-tag subscription filtering to AND semantics
- add paused resume behavior while keeping paused subscriptions out of budgets
- clear the create subscription form after successful save
- remove tag icon selection and display while preserving backend compatibility
- add regression tests for batch status, tag filtering, budget, and tag UI
2026-05-01 18:32:15 +08:00
SmileQWQ
3407962079 fix: add explicit dayjs esm plugin extensions 2026-04-25 22:41:18 +08:00
SmileQWQ
4952e9b99c fix: tighten timezone defaults across calendar and imports 2026-04-25 22:15:40 +08:00
SmileQWQ
9b8d33fffb feat: align app timezone behavior on main
- add configurable business timezone handling across settings, calendar, notifications, statistics, renewals, and subscription forms

- preserve TZ as the default runtime fallback while letting saved settings override business date calculations

- port Wallos source-timezone preview handling from worker and store imported business dates using the active app timezone

- gate daily refresh cron execution against settings.timezone so low-frequency tasks follow the configured business day
2026-04-25 21:16:51 +08:00
SmileQWQ
0afb58bee6 fix: tighten exchange rate config defaults 2026-04-25 18:22:22 +08:00
SmileQWQ
1aa5a95a61 fix: harden subscription form validation 2026-04-25 16:00:35 +08:00
SmileQWQ
4003e24e47 feat: align wallos import semantics and refresh highlights 2026-04-25 01:50:17 +08:00
SmileQWQ
6c7470d020 feat: add notification providers and theme support
- add SMTP/Resend provider switching plus Server 酱 and Gotify settings, validation, and test endpoints
- keep email config backward compatible while reworking the notification settings grid into a compact 3-column layout
- add local-only light/dark theme preference with a floating sidebar toggle and dark theme styling across cards, pages, charts, logo pickers, and drawers
- tighten notification target URL validation, update exchange rate provider naming, and refresh API/web tests for the new settings and theme behavior
2026-04-24 10:49:31 +08:00
SmileQWQ
0dea036799 fix: refresh main imports and test notifications
Clear affected page queries after Wallos import.
Make saved-config notification tests bypass the normal dedupe path.
2026-04-23 21:45:20 +08:00
SmileQWQ
5004c3b3c8 perf: port reusable worker improvements to main
Port cross-runtime improvements from the cf-worker branch back to main without bringing Worker-free specific tradeoffs.

Frontend:
- add single-flight request coalescing for save, settings, tag, and AI actions
- add explicit saving/loading states for subscription save and AI recognition
- unify settings data access behind useSettingsQuery with a shared query key
- stop AI autofill from overwriting advance/overdue reminder rules
- deep-clone settings query data before binding form state so nested notification and AI inputs remain editable
- refine AI loading copy layout and adjust calendar card wording for clearer UX

Backend:
- split getAppSettings hot-path reads into narrow getters for login options, AI config, reminder defaults, and notification channel/scan settings
- cache auth session secret, stored credentials, and mustChangePassword in memory to avoid repeated password verification work on every request
- slim statistics and calendar reads to only fetch fields required by each view
- reduce exchange-rate read duplication by reusing resolved base currency instead of re-reading settings unnecessarily
- batch Wallos import writes via createMany for tags, subscriptions, and subscription-tag joins, then append subscription order once

Tests:
- add auth service cache coverage
- add Wallos commit batching coverage
- add single-flight, settings-form clone, and AI recognition status unit tests
- update auth, AI, and statistics tests for the new main-branch implementation strategy

Validation:
- targeted API tests passed
- targeted web tests passed
- npm run lint passed
- npm run build passed
2026-04-23 09:10:06 +08:00
SmileQWQ
47b485b709 fix: support configurable container timezone
- add TZ to API compose defaults and example env config
- keep tzdata in the image without hardcoding a single timezone
- apply the runtime TZ value from entrypoint so users can switch timezones cleanly

# Conflicts:
#	apps/api/.env.example
2026-04-21 11:07:09 +08:00
SmileQWQ
bc4ee24276 fix: sync cron scan env example 2026-04-20 20:59:50 +08:00
SmileQWQ
eeaf5dab55 feat: add flexible reminder rule configuration
- replace fixed reminder day controls with configurable reminder rule strings for advance and overdue notifications
- add shared parsing and normalization helpers, subscription-level override fields, and default seeded rules
- switch reminder scanning to minute-level rule matching while preserving merged notification behavior
- update settings, subscription forms, detail views, and types to use tooltip-guided rule inputs and normalized save flow
- refresh API and tests to cover the new reminder rule settings, storage, and notification matching behavior
2026-04-20 18:47:08 +08:00
SmileQWQ
59196858b0 feat: harden login and notification formatting 2026-04-20 16:51:51 +08:00
SmileQWQ
c41fd0f6f6 fix: clean notification scan for main 2026-04-20 11:29:45 +08:00
SmileQWQ
364c758add feat: add merged reminder notifications
- add a basic settings toggle for merged reminder delivery

- default merged notifications to enabled and send one scan summary per run
2026-04-20 11:10:34 +08:00
SmileQWQ
2c537aca2c feat: add admin hardening and subscription management improvements
- enforce default admin password change with a blocking post-login flow
- add Telegram bot notification settings and test endpoint
- move Wallos import into Settings and add subscription CSV/JSON export
- enable batch subscription actions for renew, pause, cancel, and guarded delete
- expand frontend and API typing/tests for the new auth, settings, and subscription flows
2026-04-20 10:07:37 +08:00
SmileQWQ
d6913fef1a feat: add configurable reminder settings and app version display
- add notifyOnDueDay and overdueReminderDays to shared settings schema and defaults

- wire reminder settings through API settings service, notification scan logic, seed data, and tests

- update settings page with 默认提前提醒天数 label, 到期当天提醒 switch, and 过期提醒 multi-select

- show current app version under SubTracker branding and inject VITE_APP_VERSION during web builds

- add GPLv3 LICENSE and update README with license and acknowledgements
2026-04-19 22:55:36 +08:00
SmileQWQ
34b59ebe4b feat: refine statistics, subscriptions, and deployment docs
- add monthly subscription spend TOP10 to statistics overview and UI

- improve subscriptions pagination with per-page persistence and note-row handling

- make login validation messages friendlier on both client and server

- clarify API-only upgrade flow for static web assets

- move web unit tests into apps/web/tests/unit
2026-04-19 21:52:20 +08:00
SmileQWQ
3fdd6f89d2 fix: harden production deployment flow 2026-04-19 18:53:10 +08:00
SmileQWQ
5d9cd12cc3 fix: validate required settings for notifications and AI 2026-04-19 16:34:36 +08:00
SmileQWQ
b374992156 feat: upgrade AI multimodal compatibility
- add provider presets for Aliyun Bailian, Tencent Hunyuan, and Volcengine Ark
- switch to explicit vision and structured-output capability flags
- add separate connection and vision test flows
2026-04-19 16:27:18 +08:00
SmileQWQ
6f95114558 refactor: simplify webhook persistence model 2026-04-17 16:06:16 +08:00
SmileQWQ
33b3185511 feat: refine renewal notifications and webhook settings 2026-04-17 15:52:12 +08:00
SmileQWQ
2a7bac6aaf feat: unify built-in AI prompt handling
- share the built-in subscription prompt between frontend and backend

- show the built-in prompt directly inside the editable custom prompt field

- keep empty or unchanged prompt values falling back to the built-in default
2026-04-17 12:00:09 +08:00
SmileQWQ
e19d855944 feat: add dedicated budget analytics workspace
- add /statistics/budgets endpoint with total and tag budget summaries

- introduce dedicated 预算统计 page and hide its sidebar entry when tag budgets are disabled

- move tag monthly budget editing into a dedicated modal on the budget page

- add dashboard tag budget overview cards when tag budgets are enabled

- remove duplicate upcoming renewals table from 费用统计 and keep that info on the dashboard

- invalidate menu and statistics queries after settings changes so budget navigation updates immediately
2026-04-17 11:05:24 +08:00
SmileQWQ
3832cebeec feat: add remember-me login controls
- default login sessions to non-persistent browser storage unless remember-me is enabled
- add remember-me checkbox to login page and load configurable remember duration from the server
- add rememberSessionDays to settings and persist it through the shared settings schema
- expose login options endpoint for unauthenticated clients
- move sidebar collapse trigger higher for long single-page layouts
2026-04-17 10:16:21 +08:00
SmileQWQ
cc1c90c167 feat: align calendar renewals with projected statistics
- unify calendar events with projected renewal generation across a date range
- add shared projected renewal service and unit coverage for monthly, weekly, expired, and filtered states
- update statistics trend and upcoming-by-day aggregation to reuse projected events
- keep calendar summary, list view, and day detail on the same predicted event source
- refresh shared/web statistics types for projected trend metadata and distribution charts
2026-04-15 15:43:20 +08:00
SmileQWQ
2cfa439e82 feat: randomize imported tag colors
- assign stable hashed colors to newly imported Wallos tags

- keep existing tags unchanged when matching by name during import
2026-04-15 11:55:51 +08:00
SmileQWQ
264db1a0a6 feat: refactor subscriptions to tags and add Wallos import pipeline
- replace legacy category-based subscription flow with tag-based models, routes, types and UI management

- rebuild Prisma schema around Tag and SubscriptionTag, remove legacy category relation fields, and reseed defaults

- add unified Wallos import inspect/commit flow for JSON, SQLite and ZIP packages with ZIP logo ingestion and DB-version compatibility

- add auto-renew execution in scheduler plus payment record drawer entry in subscription actions

- rename user-facing renewal wording to 续订 in key views and align subscription form with tag selection and auto-renew

- improve logo handling with local library support, remote import persistence, and ZIP asset matching fallback
2026-04-15 11:42:11 +08:00
SmileQWQ
0c8cfdd49c chore: unify release workflow 2026-04-11 14:45:08 +08:00
SmileQWQ
81418ea57d feat: initialize SubTracker repository 2026-04-11 13:36:43 +08:00