Workshop Activity Heatmap (24h Job Volume) #9
Reference in New Issue
Block a user
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?
What & Why
A compact 24-hour activity heatmap shows visitors when the Workshop is busiest — giving newcomers a sense of the community's rhythm and making the Workshop feel like it has a life of its own. A compelling 'proof of activity' visual no static landing page can replicate.
Done looks like
/api/stats/activityon load and refreshed every 5 minutesOut of scope
Tasks
/api/stats/activityreturning job counts bucketed by hour for the past 24h; GROUP BY query on jobs table./api/stats/activityevery 5 minutes and re-render; no WebSocket needed.Relevant files
artifacts/api-server/src/routes/jobs.tsthe-matrix/js/ui.jsthe-matrix/js/main.jsPR created: #91
Backend: Added
GET /api/stats/activityinartifacts/api-server/src/routes/stats.ts— queries jobs grouped bydate_trunc(hour, created_at)for the last 24h, returns{ hours: number[24] }zero-padded for empty hours.Frontend: 24-segment heatmap bar centered at the bottom of the Workshop (
#activity-heatmap). Color intensity scales dim→bright based on relative volume; current-hour segment pulses via CSS animation. Hover tooltip shows e.g.3pm: 12 jobs submitted. On mobile (≤600px), collapses to icon that opens a full-screen overlay. Auto-refreshes every 5 minutes.All changes in
the-matrix/index.htmlandthe-matrix/js/ui.js. Typecheck and lint pass (0 errors).