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
- copy apps/api/.env.example into the deployment .env first
- only override deployment-specific values such as image, ports, origin, and log level
- keep new example fields like TZ and cron settings in sync automatically
- 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
- 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
- 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
- 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
- rename user-facing deployment modes to 完整部署 and 仅后端部署
- simplify README and DEPLOYMENT wording for end users
- polish generated INSTALL-README guidance and upgrade steps
- 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
- 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
- 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
- replace raw JSON output with a user-friendly field table in the AI recognition modal
- keep raw extracted text in a separate helper section
- add a reset action to the subscription form for both create and edit modes
- document budget analytics and tag budget workflow
- mention remember-me login behavior and Wallos import support
- keep local development setup aligned with .env.example flow
- 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
- 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
- clear default admin credentials from login form and update login guidance copy
- support pressing Enter to submit the login form
- fix collapsed sidebar branding overflow by syncing logo and menu collapsed state
- rewrite README for GitHub presentation and add env copy steps for local development
- expand DEPLOYMENT guide with API-only and full compose deployment paths
- add apps/api/.env.example for development bootstrap
- add docker-compose.full.yml and nginx config for full self-hosted deployment
- update release workflow to publish a deployment bundle alongside web dist assets
- 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
- allow monthly and yearly budget ratios to exceed 100% for clearer overflow visibility
- render over-budget percentage and used amount in red to emphasize overspend
- 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