My Hub module
The staff-facing home surface — what a cashier or mechanic sees on sign-in before they pick a tab. Home dashboard tiles + working boards for the day's small operational stuff: what needs doing, what's been announced, what the shop's talking about, what came in yesterday.
| Tab label | My Hub |
| Folder | src/modules/myhub/ |
| Schemas | shop-announcements.schema.sql, staff-duties.schema.sql |
| Shipped | v0.6.979 → v0.6.982 (home + tasks + board + messages), then v0.7.1 series (owner reporting surface, tab-return refresh, greeting fix, panels rebuild) |
What it does
Home dashboard (v0.6.979). Tiles on the sign-in landing:
- Live weather chip — current conditions for the shop's timezone (from
shop_config), refreshed via thecore/live.tsheartbeat. Not a widget the shop configures — a small anchor tile so the operator knows the app has data flowing. - End-of-Day report — yesterday's shop summary: sales collected, transactions rung, service tickets opened/closed, notable events. Reads from the audit spine + Sales/
/summary.
Shop Tasks (v0.6.980, staff-duties.schema.sql). Ad-hoc + recurring task templates the shop assigns to whoever's on shift:
- Ad-hoc — a one-off task ("call Ryan back about the Roubaix"), assigned or open.
- Recurring templates — the standing shop chores (open till, count drawer, close bay, wash the demo bikes). Templates instantiate on their cadence; completions land in the audit chain.
- Every add / assign / complete / delete lands on
audit_events.
Shop Board (v0.6.981, shop-announcements.schema.sql). Rich-text shop announcements:
- Rich text + inline images.
- Pin to keep at the top; expiry to auto-hide after a date.
- Every post / edit / delete audited.
- Owner-writable by default; roles configurable through the Settings permissions grid.
Messages (v0.6.982). A staff-to-staff messages board on the home surface — quick text posts with emoji + accent-color polish for legibility. Same audit + permission shape as the Shop Board.
Owner's reporting surface (651c714). A pane below the Shop Board — visible only to owner/sys_admin — carrying the day's shop numbers (sales collected, tickets closed, drawer variance). Same shape as the End-of-Day tile but live, current-day, so an owner walking in mid-shift sees what's happened so far.
Greet the person actually there (ecf552d). The dashboard used to greet whoever was logged in on the terminal at session start; a staffer switching PINs (or an owner picking up a till a cashier had signed into) still saw the earlier name. Now the greeting reads the current PIN's staffer. The greeting also stopped stacking yesterday's tasks — a task tile that had been "today" yesterday isn't still "today" next morning.
Coming back to the browser tab refreshes the Hub at once (33a3818). Alongside the core/live.ts heartbeat cadence, a visibilitychange handler kicks a full refresh the instant the tab regains focus — so an operator who was on another tab for ten minutes doesn't wait for the next beat.
Panels rebuild (cf066b2, later reverted 6e81454). A rebuild of the My Hub panels landed and was rolled back after an issue surfaced; the surface today is the pre-rebuild shape.
Composition
- Live-refresh heartbeat (
core/live.ts, BIKE.L1-0021) — Home / Tasks / Board / Messages each register their owntickon the sharedkbLivetimer, so every open browser stays current with what any other terminal just posted, without polling collisions. Each section registers separately so an open Messages composer doesn't pause the Tasks refresh. - Audit narrator — Shop Board + Shop Tasks + Messages mutations run through
recordMutation→narrate(event), so activity surfaces on the audit-trail ticker footer like every other module. - Weather chip — reads timezone + coords from
shop_config; not a mockable widget, real HTTP.
What it does NOT do
- Not a chat app. The Messages board is post + read + delete, not conversational threads.
- Not a scheduling / rota app. Shop Tasks assigns to the shift, not to a calendar.
- Not customer-facing. Everything on My Hub is internal — the shop's own operations surface.
- No inbox / notifications — a post appears when the next
kbLivebeat fires (a few seconds), which is enough for a shop-floor context.
See also
- Live-refresh heartbeat (
core/live.ts) — the shared cadence that keeps My Hub current - Audit narrator + ticker — where Shop Tasks + Board + Messages events narrate
- Settings module — where the Shop Tasks / Board write permissions are granted