Admin
89f0dfb113
Add async audio generation: job tracking in PocketBase + UI polling
...
Deploy / Deploy Production (push) Has been skipped
Deploy / Cleanup Preview (push) Has been skipped
Deploy / Deploy Preview (push) Failing after 1s
CI / UI / Build (pull_request) Failing after 7s
CI / Scraper / Lint (pull_request) Failing after 8s
CI / Scraper / Test (pull_request) Failing after 9s
CI / Scraper / Build (pull_request) Has been skipped
iOS CI / Build (pull_request) Failing after 2s
iOS CI / Test (pull_request) Has been skipped
Replace blocking POST /api/audio with a non-blocking 202 flow: the Go
handler immediately enqueues a job in a new `audio_jobs` PocketBase
collection and returns {job_id, status}. A background goroutine runs
the actual Kokoro TTS work and updates job status (pending → generating
→ done/failed). A new GET /api/audio/status/{slug}/{n} endpoint lets
clients poll progress. The SvelteKit proxy and AudioPlayer.svelte are
updated to POST, then poll the status route every 2s until done.
2026-03-07 20:12:08 +05:00
Admin
fb6b364382
refactor: audit, split server.go, add unit tests, and fix latent bugs
...
- Remove dead code: browser cdp/content_scrape strategies, writer package,
printUsage, downloadAndStoreCoverCLI in main.go
- Fix bugs: defer-in-loop in pocketbase deleteWhere, listAll() pagination
hard cap removed, splitChapterTitle off-by-one in date extraction
- Split server.go (~1700 lines) into focused handler files:
handlers_audio, handlers_browse, handlers_progress, handlers_ranking,
handlers_scrape
- Export htmlutil.AttrVal/TextContent/ResolveURL; add storage/coverutil.go
to consolidate duplicate helpers
- Flatten deeply nested conditionals: voices() early-return guards,
ScrapeCatalogue next-link double attr scan, chapterNumberFromKey dead
strings.Cut line, splitChapterTitle double-nested unit/suffix loop
- Add unit tests: htmlutil (9 funcs), novelfire ScrapeMetadata (3 cases),
orchestrator Run (5 cases), storage chapterNumberFromKey/splitChapterTitle
(22 cases); all pass with go build/vet/test clean
2026-03-04 22:14:23 +05:00