26 Commits

Author SHA1 Message Date
SmileQWQ
dba8fb4cd0 test: stabilize lite locale-aware coverage
## 中文

- 为 web 单测补上统一的测试语言初始化,避免每个用例重复手动设置 locale。
- 修复 lite Worker 中匿名读取 /api/v1/app/locale 会被鉴权拦截的问题,使新会话也能读取已持久化的语言设置。
- 同步补齐相关 API / Web 测试断言,并将换汇缺失汇率时的错误提示接入 i18n。

## English

- Add shared locale initialization for web tests so each case no longer has to set the locale manually.
- Fix the lite Worker auth guard so anonymous GET /api/v1/app/locale can read the persisted locale in fresh sessions.
- Update the related API and web assertions and localize the missing-rate currency conversion error.
2026-06-01 01:59:49 +08:00
SmileQWQ
cdf43b3390 feat: sync lite subscription form and logo reuse
## 中文
- 对齐订阅表单文案与校验,支持自定义正整数频率输入,并补齐日期未填写时的保护提示。
- 恢复本地 Logo 库搜索与复用流程,统一远程导入/本地上传的提示与结果反馈。
- 调整标签弹窗颜色输入行为,避免文本输入与颜色选择器不同步。

## English
- Align subscription form copy and validation, support custom positive-integer frequency input, and guard missing date selections before submit.
- Restore local logo library search and reuse flows with consistent feedback for remote import and local upload.
- Adjust the tag modal color input flow so text input and the color picker stay in sync.
2026-05-30 15:31:05 +08:00
SmileQWQ
dc5bade56a feat: sync lite locale and notification surfaces
## 中文
- 接入 shared locale-core、i18n 导出与 /api/v1/app/locale,让 lite 支持中英文切换与请求级语言透传。
- 为 App 壳子、登录页、设置页和离散消息接入本地化文案,并恢复 lite 的品牌与 Worker 提示语境。
- 同步通知模板、Apprise/Bark/NotifyX、Telegram MarkdownV2 与通知渠道设置面,保留 Worker 下仅支持 Resend、Webhook/Gotify 禁用忽略 SSL 的边界。

## English
- Add shared locale-core exports, i18n helpers, and /api/v1/app/locale so lite can switch locales and send request-scoped locale headers.
- Localize the app shell, login page, settings page, and discrete messages while restoring lite branding and Worker-specific wording.
- Sync notification templates, Apprise/Bark/NotifyX, Telegram MarkdownV2, and notification settings surfaces while keeping the Worker-only Resend and ignore-SSL restrictions.
2026-05-30 15:30:16 +08:00
SmileQWQ
1f94c7761c perf: trim lite dashboard and statistics hot paths
- drop lite tag-budget contracts, budget routes, renewal-mode distribution, and empty dashboard chart payloads while keeping only data-backed statistics views

- version worker-lite auth credentials, migrate legacy scrypt logins, and cap auto-renew batches to reduce login and cron worker overhead

- extend the before-after perf harness for login, overview, and auto-renew with dirty-current support and .tmp report output
2026-05-16 18:52:35 +08:00
SmileQWQ
be70f8d2d9 feat: align lite brand and settings surfaces
- sync the main-branch brand logo, login header, and sidebar update entry while keeping lite labels
- wire the frontend version update query and commit-based update modal on the lite surface
- move forgot-password controls back into credentials, restore About or Credits, and keep worker-specific hints intact
- refresh README navigation and add frontend regression coverage for branding, settings, and version entry points
2026-05-12 22:11:03 +08:00
SmileQWQ
d1cb3668f3 feat: sync lite subscription detail and safe delete
- add subscription value calculation for current cycle, remaining days, ratio, and base-currency display
- block direct deletion of active subscriptions and improve batch delete skip feedback
- align subscription list tag overflow and detail reminder rendering with the main branch behavior
- cover route, value service, tag helper, reminder helper, and detail drawer changes with tests
2026-05-12 22:09:35 +08:00
SmileQWQ
b8877e4370 feat: add reminder rule preview to lite
- add the reminder rule preview component to settings and subscription forms

- support validation, sorting, de-duplication, active toggle state and transition animation

- reuse default reminder rules when subscription-level rules are empty

- cover reminder rule formatting, preview fallback and de-duplication with unit tests
2026-05-05 20:43:47 +08:00
SmileQWQ
7c096f6726 feat: add dashboard summary statistics ui
- add statistics page AI summary card with auto-generate and markdown rendering
- introduce dashboard summary query/composable and markdown sanitization utility
- add marked and dompurify dependencies for summary rendering
- raise dashboard summary generate request timeout to 65000ms and cover it with tests
2026-05-04 04:14:21 +08:00
SmileQWQ
2e5603bb8b feat: add dashboard summary settings capability
- extend shared AI config with dashboard summary fields and DTOs
- update settings validation and AI config helpers for summary-specific toggles
- align settings page copy and form state with AI capability wording
- cover schema, settings route, and form cloning changes with tests
2026-05-04 04:05:40 +08:00
SmileQWQ
85f5927aa5 feat: sync zip backup flow into lite
- add Worker Lite backup export and restore routes, service, and shared schemas
- move lite ZIP restore parsing to the frontend so Worker only receives prepared manifest and logo assets
- add backup modal and settings page backup or migration entry on lite
2026-05-02 21:08:59 +08:00
SmileQWQ
21d659ed8f feat: add currency converter swap action
Improve the settings-page currency converter for worker-lite deployments.

- add a dedicated swap control between source and target currencies
- extract the swap behavior into a focused utility for testing
- keep the mobile layout responsive around the new action

Tests:
- npm test -- currency-converter
- npm run lint
2026-05-02 00:44:19 +08:00
SmileQWQ
b45ca8cfe6 feat: sync lite subscription batch and tag management
Bring the missing main-side subscription management UX into lite.

- support batch status updates for active, paused and cancelled
- add select-current-page behavior for batch mode
- make paused subscriptions resumable from list actions
- simplify tag management by removing icon selection and preview
- keep tag filtering aligned with all-selected-tag matching

Tests:
- apps/api/tests/integration/subscriptions-routes.test.ts
- npm test -- currency-converter subscription-batch tag-management
- npm run lint
2026-05-02 00:44:19 +08:00
SmileQWQ
814464bc58 perf: optimize lite caching and worker endpoints
- add tiered D1 caching and cache version invalidation for worker-heavy reads

- reduce CPU cost in statistics, calendar, settings, exchange-rate, and import paths

- align worker-facing settings and shared types with the no-KV lite runtime
2026-04-26 20:42:08 +08:00
SmileQWQ
4ab8dbd73e fix: select today when jumping to current month 2026-04-25 21:53:00 +08:00
SmileQWQ
9bb82e0b3b feat: align worker timezone handling with app settings
- add a Wallos source timezone option so browser-side import preview can evaluate business dates with the same semantics as the source instance instead of assuming UTC day boundaries

- gate reconcile-expired and refresh-rates scheduled tasks by local app timezone while switching their cron triggers to hourly, so Worker deployments still execute them once per local business day

- refactor calendar month navigation helpers to use business-date month keys instead of local dayjs month math, reducing browser local-time leakage into timezone-aware views

- extend timezone utilities and unit tests to cover source-timezone business-date calculations and the new worker cron gate
2026-04-25 17:37:31 +08:00
SmileQWQ
b9535f76d8 fix: sync subscription validation updates to worker 2026-04-25 16:35:51 +08:00
SmileQWQ
2e1b1ad85e feat: add configurable application timezone
- add timezone to shared settings schema and worker settings loading with Asia/Shanghai default

- introduce frontend and backend timezone helpers for business-date parsing, display formatting, and day boundary calculations

- apply configured timezone to notification scanning, auto renew, expired reconciliation, statistics, calendar queries, and subscription create/update flows

- update settings UI and form/date handling so users can switch timezone from basic settings

- refresh tests to cover timezone validation, formatting, notification behavior, and subscription route/service flows
2026-04-25 04:48:23 +08:00
SmileQWQ
ac991ba65e feat: move wallos db zip parsing to browser 2026-04-25 03:50:27 +08:00
SmileQWQ
05e67c4bdd feat: add wallos db and zip import for worker 2026-04-25 03:07:13 +08:00
SmileQWQ
3645f20eda fix: port wallos import alignment to worker 2026-04-25 02:07:30 +08:00
SmileQWQ
622287a2cb 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 11:44:02 +08:00
SmileQWQ
ace3ca992a perf: streamline worker page data loading
Sync the settings-form deep-clone fix and AI loading copy improvements from main, then continue reducing page-entry latency on the worker branch.

Included fixes:
- restore editability for nested notification and AI settings fields by cloning settings query data before binding forms
- refine AI recognition loading copy layout to avoid awkward line wraps
- align calendar summary wording with the updated main-branch labels

Data-loading optimizations:
- add shared Vue Query composables for exchange-rate snapshot, tags, notification webhook, statistics overview, budget statistics, and calendar events
- move SettingsPage snapshot and webhook loading onto shared query caches instead of always issuing separate onMounted requests
- move Dashboard, Statistics, and Budget pages onto shared overview and budget query composables
- query-ize the subscriptions main list so list refreshes reuse cache/invalidation instead of repeated page-local fetches
- reuse cached exchange-rate snapshot and tag data on the subscriptions page
- remove over-aggressive query behavior that could cause stale or inconsistent UI states by:
  - updating settings query cache immediately after save operations
  - avoiding duplicate subscriptions refetches when filters already change the query key
  - keeping calendar month switches query-driven without showing mismatched stale month labels

Validation:
- npm run test -w apps/web passed
- npm run lint -w apps/web passed
- npm run build -w packages/shared passed
- npm run build -w apps/web passed
2026-04-23 09:56:16 +08:00
SmileQWQ
ab924fed91 perf: consolidate worker lite optimizations
- combine the worker-lite performance and reliability work into one coherent commit for the cf-worker branch
- reduce duplicate submissions and repeated settings fetches on the frontend, add clearer saving/recognition states, and keep Worker-limit error messaging focused on real failures
- refactor worker hot paths around D1/KV usage with short-lived caching, lighter settings/auth access, lazy Prisma creation, slimmer statistics/calendar queries, and safer exchange-rate reads
- simplify logo search and remote-logo handling for Lite constraints, keep cron and notification flows aligned with Worker Free limits, and preserve current Lite-specific UX decisions
- remove unsupported Prisma interactive transactions for D1, batch Wallos import writes, chunk D1 tag joins, and fix Cloudflare-specific issues such as KV minimum TTL handling and remote reset execution on Windows
- include the latest Lite-side cleanup: route-level tags caching, skipping unnecessary tag reads in statistics when tag budgets are disabled, removing calendar adjacent-month prefetching, and executing remote reset SQL through a temp file
2026-04-22 23:47:44 +08:00
SmileQWQ
64515f4662 fix: use direct remote logo references without r2 2026-04-22 17:24:31 +08:00
SmileQWQ
6b45518593 feat: add Cloudflare Worker lite branch implementation
- migrate the lite branch runtime to Cloudflare Worker with D1, KV and optional R2 support

- add worker runtime context, request routing, D1 init guards, bootstrap/reset scripts and wrangler config

- keep the product aligned with the lite plan: MailChannels email, JSON-only Wallos import, no local OCR, remote logo fallback without local disk storage

- restore logo search behavior toward main parity while adapting storage and cache to Worker bindings

- update branding and UI copy for SubTracker Lite, including runtime naming and lite-specific settings/help text

- replace Docker-oriented docs/workflow assets with cf-worker specific CI/deploy workflows and deployment docs

- add regression tests for worker runtime paths, database init, logo search, worker capability helpers and bootstrap script behavior
2026-04-22 01:49:17 +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