Sloth-ninja gives firm admins a proper view of JessicaOS usage

Pilot firms can now see whether their team is actually using the platform, without a new tracking programme.

analyticsmulti-tenant

The new read-only dashboard turns existing activity into a useful firm-level picture, with seven- and 30-day views. It is built around organisation boundaries, so one firm's activity stays out of another's numbers.

  • Headline totals: chats, documents, workflow runs and active members at a glance.
  • Member activity: see who has been active across the selected period.
  • Workflow activity: identify which workflow templates are being used and when they last ran.
  • Daily chat trend: a simple bar chart that shows whether engagement is rising or fading.

It also handles empty firms cleanly, rather than presenting broken or misleading results.

So what Managing partners and legal-ops leads running a pilot now have a quick, credible signal of adoption before deciding where to invest next.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from Sloth-ninja/JessicaOSS, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
863f8447 WS8 PR D: admin usage dashboard sloth-ninja 2026-07-22 ↗ GitHub
commit body
Read-only firm usage overview for organisation admins. Aggregates existing
activity (chats, tabular reviews as workflow runs, documents) into period
totals, per-member activity, per-workflow-template runs and a per-day chat
trend. No migration, no new event capture, no new env vars.

Backend: lib/usageStats.ts (org-scoped aggregation, uuid->text member
resolution, 30d fetch floor, injectable now) + GET /admin/usage (requireAdmin,
asyncHandler, ?days=7|30). Frontend: (pages)/admin/dashboard with 4 stat tiles,
a restrained single-accent SVG daily bar chart (DD/MM labels, tabular figures),
member + workflow-template tables, 7d/30d switch, loading skeletons and
error+retry. mikeApi.getFirmUsage; sidebar Dashboard item (isAdmin-gated).

Tests: 10 usageStats cases incl. the watertight another-org-excluded case,
uuid->text matching, window edges/bucketing, empty/single org. Backend vitest
234 passed; backend+frontend tsc clean; evals:smoke 4/4.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22699fe5 WS8 PR D: review round 1 - UTC dates, future-event bound, comments sloth-ninja 2026-07-23 ↗ GitHub
commit body
Independent review (approve-with-fixes, all Minor):
1. Dashboard formatUkDate now renders lastActive/lastRun in UTC (timeZone:
   "UTC") so dates can't drift a day from the UTC-bucketed trend for late-night
   UK viewers.
2. usageStats: added an upper bound - a future-dated created_at (clock skew /
   bad data) is treated as no timestamp everywhere (local eventTime helper), so
   it can't count in tiles while falling outside the daily series. New test.
3. usageStats: commented the "Untitled workflow" fallback as defensive-only
   (titleById is always populated by the has() guard; workflows.title is NOT
   NULL) - kept for safety.
4. BUILD_LOG: recorded the definition-of-done deviation that the chart/tables
   were not screenshotted in a running app (geometry validated by reasoning +
   mock-up parity).

Backend tsc clean; vitest 235 passed (20 files). Frontend tsc clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-1156.md from inside the repo you want the changes in.

⬇ Download capture-thread-1156.md