Repository navigation
feat(admin): sortable workspace list with creation dates, upload drill-down by workspace, BYO counts - #1090
Conversation
…ce upload drill-down, BYO bucket counts Workspaces: merge the organization into the workspace column as a byline (shown only when it differs from the slug), add a Created column (org created_at, falling back to the record's self-serve stamp, then its earliest token), and make every column header sortable. Metrics: the overview now returns sparse per-workspace daily upload rows. The uploads chart tooltip lists a day's top workspaces, clicking a bar opens a per-day breakdown (uploads, share, bytes), and a workspace filter charts one workspace alone. Adds a BYO bucket workspaces tile and a BYO badge beside the GitHub App badge.
|
|
2 files · View all on uploads.sh → Maintained by uploads.sh · add media: |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
uploads-auth | 5c7f0ca | Oct 06 2026, 09:05 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
uploads-web | 23ce9c9 | Commit Preview URL Branch Preview URL |
Oct 06 2026, 10:23 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
uploads-api | 23ce9c9 | Commit Preview URL Branch Preview URL |
Oct 06 2026, 10:23 PM |
- Build the drill-down once per overview (single-pass buildUploadDrilldown) instead of regrouping rows on every bar click; its row type now derives from MetricsOverview. - Selecting a day toggles the highlight in place rather than redrawing the chart, which drops the focus-restore workaround. - Share bar-selection attrs and click/keyboard wiring between the plain and stacked charts; tooltip extra is a template string like the rest of the page. - Workspaces table: header columns from one array, org byline helper, shared formatAdminDate (also used by the users page). - /admin/orgs/backfill uses listWorkspaceNames; earliestTokenAt is a single-pass min.


Summary
Operator observability improvements for
/adminand/admin/metrics.Workspaces list
created_at(now returned by the auth worker's/internal/orgs/summaries). Workspaces without an org fall back to the record's self-servecreatedAt, then to the record's earliest token timestamp.aria-sort. The default sort is newest first. Ties fall back to name A→Z. The sort logic is inlib/admin-workspace-sort.ts, so it is unit-tested without rendering the island. No table library added.Metrics drill-down
series.uploadsByWorkspace: sparse(day, workspace, count, bytes)rows fromdaily_metrics, served by the existing coveringdaily_metrics_window_idx.daily_metricsrecords the workspace for each upload, not the user.BYO bucket visibility
BYObadge besideGH Appin a shared "Setup" column. Counted from KV records viaisByoRecord. The read is best-effort, and a KV failure reports zero instead of failing the page. The overview stays cached for 10 minutes (cache key bumped tov4).listWorkspaceNames(env)added toworkspace.tsand used by both the admin workspace list and the overview.Screenshots (local fixtures)
Test plan
pnpm test(all packages) passes; new tests cover the auth summariescreatedAt, admin list date fallbacks, overview drill-down rows + BYO count, sort, and drill-down helpersstack-rawwith seeded fixtures: sorting, bar selection, tooltip, workspace filter, BYO tile/badges, no console errors