Commit Graph
50 Commits
Author SHA1 Message Date
kairee 11930db2bf feat(web): default video sort to published and UP sort to avg_views 2026-11-03 03:09:53 +08:00
bot-ci 51ffa44577 fix(scheduler): do not force full snapshot on post-seed restart
Schedule snapshot_seed/snapshot/fans to the next wall-clock seed_at /
snapshot_at on process start (optionally from last task record), instead
of next_run=0. Force-seal of seed shells only after today's snapshot_at
(or CLI --force), so a daytime restart cannot scrape the whole site.
2026-11-03 01:09:50 +08:00
bot-ci 1697573d95 fix(scheduler): address !7 REQUEST_CHANGES
- seed: check completed_key before no_source so same-day last_completed
  is already_completed (not 10m retry)
- scheduler: resolve TaskControl ok/error before logging; ok=False logs
  task_fail, not task_ok
- candidate_cleanup: catch failures, record task, retry ~5m like discover
2026-11-03 01:08:34 +08:00
bot-ci bb18d232f6 feat(scheduler): add snapshot-seed CLI and 10m seed deferral
Add `python app.py snapshot-seed [--date]` (offline clone, Debian /
docker compose exec friendly). When seed fires while full-site snapshot
is running, or last_completed is missing (no_source), record skip as
non-success and retry in 10 minutes until a real seed succeeds; fans
and quiet-window rules unchanged.
2026-11-03 00:22:11 +08:00
bot-ci 9969e65202 fix(scheduler): drop cross-task mutex, quiet window + retry
Incident: evening full snapshot could be recorded as ok with
already_completed/elapsed=0 after mutual skip with hourly sync, then
next_run jumped to the next day.

- Full-site snapshot never skips because another task is running
- 23:00-01:00 Asia/Shanghai: defer discovery / snapshot_recent /
  candidate_cleanup to after 01:00; fans never defers
- Skip records ok=false + skipped=true (not success / not completed)
- Skip/fail reschedule soon (~5m); daily success still next snapshot_at
- TaskControl return value drives next_run; system UI shows skip fields
2026-11-03 00:07:19 +08:00
kairee 00572a3429 fix(growth): require a 1000-view baseline on the rate board
Keep small-base videos on the delta board only, and raise the smoothing prior to 1000 so videos that just clear the floor do not dominate the ranking.
2026-11-02 22:11:30 +08:00
kairee 39a6537f67 fix(growth): rank the rate board by a smoothed score
Show the real percentage on the card, but sort with delta / (baseline + prior) so a small baseline cannot dominate. Same-day publishes stay off the rate board.
2026-11-02 22:06:41 +08:00
bot-ci 8e7ead1669 feat: switch config to JSONC + split secrets.json
Load business config as JSONC (comments + trailing commas) via an
in-repo stripper then stdlib json — no new deps. Default path prefers
config.jsonc, falls back to legacy config.json. Auth write-back targets
only sibling secrets.json so JSONC comments are never wiped; secrets
overlay merges on load. Examples, compose, Docker, docs, favsort and
tools all share the same loader. Phase A only — no DB settings migration.
2026-11-02 12:58:20 +08:00
bot-ci 25cdea5287 fix: default seed_at to 00:00 (HH:MM)
Keep daily tasks next_run=0 startup catch-up; only move midnight
seed schedule default from 00:01 to 00:00 across config/docs/tests.
2026-11-02 12:44:40 +08:00
bot-ci 8a9cb21408 feat: EOD 23:15 seal + midnight seed shell for video/fans
Move daily snapshot/fans to 23:15 and add 00:01 seed that clones
last_completed ok=1 rows into today without advancing completed.
Evening runs force through seed markers; growth previous is per-aid
adjacent. Home shows short-update clock + 全站数据 date, and 收录视频
counts.
2026-11-02 12:38:55 +08:00
kairee ff88e91640 feat(web): restore candidate notice on home for logged-in users 2026-11-01 17:52:03 +08:00
kairee bc4655c143 feat(web): drop redundant preview pill from topbar 2026-11-01 17:45:25 +08:00
kairee 3cb9b92361 feat(web): move candidates/system nav to topbar, free mobile bottom nav 2026-11-01 17:43:42 +08:00
kairee 85b0f625a9 feat(web): clean public home header (data date, 7d fans, video count), drop status panel 2026-11-01 17:38:30 +08:00
kairee 14a4cab48b feat(web): home media grid 2-up mobile / 3-up PC, 6 items, drop folder panel 2026-11-01 17:30:52 +08:00
kairee e00331c4c6 feat(web): home media sections use 5-up PC / 1-up mobile grid, growth top5 2026-11-01 17:27:10 +08:00
kairee e40905da24 feat(web): unify home published/growth cards with heat-strip vertical layout 2026-11-01 17:18:42 +08:00
kairee 7907216c1b feat(web): add interactions-per-hour stat to up page 2026-11-01 17:09:25 +08:00
kairee ff5e05998a docs(deploy): document PV/UV stats and real client IP via nginx realip 2026-11-01 15:40:22 +08:00
kairee b0c53e8a2f fix(ingest): raise ref cap to 50 and clarify invalid bvid error 2026-11-01 15:05:17 +08:00
kairee b5bf7d9b8f feat(web): drop decoupled folder badge from video detail 2026-11-01 14:45:28 +08:00
kairee 5d7521075a feat(web): show first-RE time on up page, drop decoupled folder badges 2026-11-01 14:41:32 +08:00
kairee 2ff3e7952b feat(web): up avatars, follower count, and dedupe views/avg secondary 2026-11-01 14:34:23 +08:00
kairee 1ed3746f4b feat(web): clickable home stats, drop recent-ingest panel, rename watch link 2026-11-01 14:19:27 +08:00
kairee 0d6e62f9ee docs: decouple favorites, manual ingest, write-for-sort-only 2026-11-01 14:09:09 +08:00
kairee e903c49921 fix(up): hard timeout and progress for follower capture 2026-11-01 13:24:56 +08:00
kairee d00fcd5c38 feat(web): inline toolbar with label sort, compact time, icon search 2026-11-01 12:56:37 +08:00
kairee 9be7d1cab2 feat(web): dropdown sort and time filters with year support 2026-11-01 12:45:40 +08:00
kairee bc3bef0743 fix(analytics): shrink video efficiency and gate noisy boards by views 2026-11-01 12:25:27 +08:00
kairee e7034cfb84 feat(analytics): lower maturity window to 2 days and reword about page 2026-11-01 12:07:47 +08:00
kairee cb9e8e031b docs: document duration efficiency, up follower snapshot and nav split 2026-11-01 11:36:34 +08:00
kairee 707ed7d7d7 docs: document dashboard cache 2026-11-01 03:27:50 +08:00
kairee 91aa3e1f95 docs: describe partial page protection 2026-11-01 03:09:21 +08:00
kairee e9fbbc1650 docs: document fan range modes and delta column 2026-11-01 02:36:48 +08:00
kairee 998d0fd0c0 fix(tools): guard csv replace against newer fan records 2026-11-01 02:25:18 +08:00
kairee dd6b09807d docs: document csv fan import 2026-11-01 02:23:10 +08:00
kairee 58df38814a docs: describe fan recent window and cumulative range 2026-11-01 02:14:10 +08:00
kairee 1b08854b25 fix(web): revalidate app assets and rename compose example 2026-11-01 01:42:26 +08:00
kairee fcca14c0f9 docs: document docker deployment workflow 2026-11-01 00:52:06 +08:00
kairee 7674fc2c47 docs: update ranking labels, palette and export removal 2026-11-01 00:37:28 +08:00
kairee 6a053bdfe8 docs: document UP ranking defaults and fan history import 2026-11-01 00:06:59 +08:00
kairee 40cdfaf3e5 docs: add analytics and preview tool to structure 2026-10-31 23:51:53 +08:00
kairee d18ebbfb2f docs: document read-only dashboard and preview workflow 2026-10-31 23:47:02 +08:00
kairee 8a87ebfb7c refactor(favsort): send bilibili requests through httpx
Reuse a pooled httpx client for favsort GET and POST requests, share the raw-request-derived browser headers, and add folder-specific referers for ids, infos and sort. Add transport tests for header parity and anonymous-to-authenticated fallback.
2026-10-31 22:36:48 +08:00
kairee 5b22ed1c5d feat(http): use httpx with pooled connections and browser headers
Add httpx and route Bilibili and Telegram requests through pooled clients with keepalive and explicit timeouts. Align Bilibili headers with data/raw-request.txt: Chrome 155 UA, sec-ch-ua, space.bilibili.com origin, folder-specific referer, and priority header. Close replaced clients when credentials change. Add transport contract tests and live read-only validation for nav, folder sync, WBI search, and Telegram getUpdates.
2026-10-31 22:28:32 +08:00
kairee d971e718e9 feat(p3): add discovery, telegram notifications, and one-click favorites
Implement WBI video search with legacy fallback, classification scoring, candidate pool, permanent seen-aid dedupe, blacklist filtering, and batched Telegram notifications. Add write client for fav deal/sort, target-folder selection, insertion position calculation, read-back verification, fav_action locking, retry on failure, ignore and blacklist actions. Wire discovery, candidate cleanup, Telegram long polling, and new discover/candidates CLI commands into the scheduler. Add migration v3 for candidate duration and index stats.
2026-10-31 21:23:12 +08:00
kairee 6a21b5d905 fix: close data integrity and hot-reload review findings
Backfill same-day snapshots for newly added or restored videos, preserve successful fan snapshots on resume, persist incomplete state before forced re-runs, and split collection completion from backup completion so failed backups can retry without API calls. Reject missing data payloads instead of treating them as empty folders, guard against mass-unfav on suspicious empty remote folders, rebuild Bilibili clients when credentials change, recompute primary folder ownership from active relations with per-folder fav_time, preserve original titles for dropped invalid videos, poll config every 60 seconds, and fix favsort verify interval and mixed resource types.
2026-10-31 20:58:36 +08:00
kairee 178ab64b18 feat(auth): separate read and write bilibili accounts 2026-10-31 20:01:21 +08:00
kairee 5c2ab7b187 feat(p1): add daily snapshots and fan tracking
Implement P1: seven-metric view snapshots, relation/stat fan snapshots, failure placeholders, resume by daily completion markers, Cookie login warnings, daily SQLite backups, Shanghai daily scheduling, and CLI snapshot/auth-check commands. Real read-only run captured 795/795 videos successfully over 1124s with a verified daily backup.
2026-10-31 19:19:24 +08:00
kairee e2cdf997af feat(p0): add favorite folder sync and sqlite data foundation
Implement P0 of the reaction dashboard: config loading with hot reload, SQLite migrations with backups, single-writer queue, read-only Bilibili fav client, folder import/diff sync, invalid-resource handling, blacklist seed, scheduler, and JSON redacted logging. Includes offline unit and transport-level contract tests; all existing and new tests pass.
2026-10-31 18:08:33 +08:00