20 Commits

Author SHA1 Message Date
SmileQWQ
2e03db1c02 perf: trim lite import hot paths and generalize perf report
## 中文
- 为 SubTracker 备份追加导入增加 append-noop 快路径,命中时直接返回并跳过 followups。
- 复用追加导入的预查结果,减少重复查库,并把 trace 补到 noop 判定步骤。
- 泛化 lite before/after perf 报告脚本与根脚本入口,支持任意 baseline/current snapshot root 与标签。

## English
- Add an append-noop fast path for SubTracker backup append imports so no-op restores return early and skip followups.
- Reuse append preflight lookup results to reduce duplicate queries and expose noop detection in the import trace.
- Generalize the lite before/after perf report script and root entry so it can compare arbitrary baseline/current snapshot roots and labels.
2026-05-30 15:31:34 +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
ee759a2d42 perf: optimize lite import commit worker path
- trace import commit route and service phases and skip append no-op cache side effects
- batch payment record writes and use D1-backed append lookups to reduce worker import latency
- refresh perf fixtures, harnesses, and regression tests for clean before-after measurements
2026-05-16 03:29:52 +08:00
SmileQWQ
5e3822f34e perf: add lite before-after measurement harness
- extend the lite runner and HTTP harness to cover detail and payment targets
- support explicit result paths, profile directories, and shared D1 persist state
- add a baseline/current report driver for whole-worker profiles and CSV output
2026-05-15 20:51:08 +08:00
SmileQWQ
23291ecf9d perf: rewrite lite import preview flow
- switch SubTracker backup and Wallos import from token-backed preview persistence to stateless inspect plus direct commit payloads

- align shared schemas, api routes, and import modals while keeping the SubTracker backup zip format unchanged

- move Wallos zip logo upload work out of inspect, add direct-payload coverage tests, and extend lite perf harnesses with import before-after baselines
2026-05-14 12:39:22 +08:00
SmileQWQ
20e559da60 perf: tighten lite cron scan and local perf harness
- short-circuit no-channel scheduled scans, narrow reminder candidates with dedicated lite helpers, and keep scan-debug behavior unchanged
- cache reminder rule parsing and replace heavy timezone-based rule matching with lightweight day-index comparisons for high-hit cron scans
- add local lite perf seed, measure, profile, and worker-http scripts to capture overview and cron before-after baselines
- cover the cron scan changes with reminder repository, notification route, makeup, merge, and chunking tests
2026-05-13 18:01:54 +08:00
SmileQWQ
dba4be9986 refactor: remove worker KV state and D1 transaction-heavy paths
Move worker state from KV to D1 or memory.
Clear affected page queries after Wallos import and avoid D1 transaction-heavy Prisma paths.
2026-04-23 21:33:34 +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
dd99701ffb feat: make kv binding configurable for worker deploy 2026-04-22 17:12:08 +08:00
SmileQWQ
9cf8906584 fix: align ai route test and clean wrangler r2 binding
- update the ai integration test assertion to match the current vision-disabled error message

- remove the stale r2_buckets block from wrangler.jsonc so base config no longer carries the wrong binding name

- keep R2 binding injection owned by bootstrap-cloudflare.mjs when --with-r2 is used
2026-04-22 15:45:11 +08:00
SmileQWQ
36d6f6faa5 chore: default local worker deploy version to git sha
- make bootstrap-cloudflare prefer the current short git commit hash when no explicit app version is provided

- keep explicit app_version and environment overrides higher priority

- extend bootstrap script tests to cover git sha fallback
2026-04-22 12:47:06 +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
419770b112 fix: generate install env from example template
- 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
2026-04-21 11:22:27 +08:00
SmileQWQ
338ead1dd2 docs: update readme and installer login hints 2026-04-20 21:08:04 +08:00
SmileQWQ
6085de664a docs: polish deployment docs and installer wording
- rename user-facing deployment modes to 完整部署 and 仅后端部署
- simplify README and DEPLOYMENT wording for end users
- polish generated INSTALL-README guidance and upgrade steps
2026-04-19 22:18:26 +08:00
SmileQWQ
05427e3022 docs: refine deployment guidance 2026-04-19 20:03:57 +08:00
SmileQWQ
e4b92e1d98 fix: stabilize full deployment assets 2026-04-19 19:16:54 +08:00
SmileQWQ
3fdd6f89d2 fix: harden production deployment flow 2026-04-19 18:53:10 +08:00
SmileQWQ
3f3e68d0c6 fix: improve deployment flow and shared package exports 2026-04-19 18:23:08 +08:00
SmileQWQ
81418ea57d feat: initialize SubTracker repository 2026-04-11 13:36:43 +08:00