Dashboard analytics improvements #83
Labels
No labels
bug
devops
duplicate
enhancement
good first issue
layout
next major release
next minor release
question
research
testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lvl0/fedi-feed-router#83
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Improve the dashboard beyond basic counts to show meaningful trends and breakdowns.
Context
DashboardStatsServicecurrently provides period-based totals (articles_fetched, articles_published, percentage). There are no per-feed or per-channel breakdowns, no trend data, and no visual charts.Ideas
Delivered across 16 commits (
ef5346e..a8d9655).Foundation
App\Support\DateRange— arbitrary from/to range replaces named periods; the five presets survive only as UI buttons populating the two date fieldsapp/Dashboard/Stats/, withStat(identity),BreakdownStat,SeriesStat, and aDailySeriesStattemplate-method base carrying the too-wide-range guardPanels
Charting: Chart.js 4.5.1 bundled through Vite, driven by an Alpine
trendChart()component. Livewire is now bundled through Vite too rather than injected.Notes on two items
Most active feeds ranking — resolved without new code.
ArticlesPerFeedalready ranks feeds by article count descending, which is a most-active-feeds ranking; a separate published-based panel would have shown near-identical numbers beside it.Publish success rate — buckets on
route_articles.updated_atrather than a dedicated stamp, chosen deliberately to keep it a single commit. A retry re-dates its article into the retry day's bucket, so a past day's rate can shift. Pinned as intended byPublishSuccessRateTest::test_a_retry_moves_the_article_to_the_retry_day.Breaking change (approved):
/api/v1/dashboard/statsnow takes?from=&to=and returnsrange: {from, to};available_periodsandcurrent_periodare gone. Both params are required together — a lone?from=now returns 422 instead of silently defaulting to today.Verification: 1143 tests / 2808 assertions green, Pint clean (338 files), PHPStan clean.
pr-reviewerran over the combined diff and found no must-fix issues; its should-fix findings were addressed ina8d9655(API partial-range validation, a sharedActivityLog::scopeWithSubjectDetails()eager-load, dead-code removal, and a query-count regression test). Charts confirmed rendering in a browser.Also added
2024_01_01_000021_add_decided_at_to_route_articles— approval decisions are now timestamped, which the approval-rate chart buckets on.myrmidex referenced this issue2026-08-13 21:12:55 +02:00