feat(analytics): BIT-5284 Phase 1 — Dashboard UI and CSV export #8

Merged
spark merged 9 commits from task/BIT-5284-analytics-dashboard into main 2026-05-01 20:57:31 +01:00
9 Commits
Author SHA1 Message Date
David Santos f15d156ef5 chore: merge main into task/BIT-5284-analytics-dashboard (resolve package-lock)
ai-news-writer-ci / test (pull_request) Successful in 59s
2026-05-01 20:55:59 +01:00
David Santos 6f9bac9de9 chore(deps): npm audit fix (high-severity transitive updates)
ai-news-writer-ci / test (pull_request) Successful in 1m0s
2026-05-01 20:53:51 +01:00
David Santos f8db96c28a fix(lint): eslint --fix analytics modules; drop unused path import in analytics-api test
ai-news-writer-ci / test (pull_request) Failing after 22s
2026-05-01 20:52:39 +01:00
David Santos 235cf758a9 fix(ci,writer): sync Gitea test workflow; export OpenAI test helpers
ai-news-writer-ci / test (pull_request) Failing after 22s
2026-05-01 20:50:15 +01:00
spark 545bdab42d Merge branch 'main' into task/BIT-5284-analytics-dashboard
ai-news-writer-ci / test (pull_request) Failing after 24s
2026-05-01 05:00:42 +01:00
David Santos c157ff22c6 fix(ci): apply ESLint-heal fileset from task/BIT-2983-test-coverage (BIT-15735)
ai-news-writer-ci / test (pull_request) Failing after 24s
2026-05-01 01:57:15 +01:00
spark 64a293acfd Merge branch 'main' into task/BIT-5284-analytics-dashboard
ai-news-writer-ci / test (pull_request) Failing after 22s
2026-04-27 18:00:16 +01:00
Patrícia SantosandPaperclip 240371ec86 fix(test): add --test-concurrency=1 to prevent file-system race in analytics tests
ai-news-writer-ci / test (pull_request) Failing after 23s
daily-aggregation and engagement-events tests both write to the same
ENGAGEMENT_EVENTS_PATH and were racing when run concurrently. Sequential
execution keeps all 66 analytics tests green.

Co-Authored-By: Paperclip <[email protected]>
2026-04-26 18:02:41 +00:00
Patrícia SantosandPaperclip 89bf993e03 feat(analytics): BIT-5162 Phase 2 — complete analytics backend and dashboard wiring
ai-news-writer-ci / test (pull_request) Failing after 24s
- Add PostgreSQL data layer: aggregation.js, article-store.js, engagement-store.js
- Add JSONL event pipeline: engagement-events.js, daily-aggregation.js
- Add cron scheduler: aggregation-scheduler.js with prometheus-metrics.js
- Add analytics/index.js entry point exposing scheduler API
- Wire analytics-api.js to real DB (replaces mock implementation)
- Fix analytics-api.test.js: add module injection mocking for async DB calls
- Fix daily-aggregation percentile: use true median for even-length arrays
- Fix prometheus-metrics test: correct bucket count assertion for p≤5.0
- Make pageAnalytics handler async; wire ui-handlers to real async API
- Add aggregation CLI command to index.js (run/stats/recalculate/scheduler)
- Add voice (tone/audience_level) propagation through write pipeline and article log
- Refactor cli/write.js to use fetchAndFilterSourceArticles pipeline

Co-Authored-By: Paperclip <[email protected]>
2026-04-26 15:59:42 +00:00