Skip to content

feat(admin): wider workspaces view with plan + BYOB columns and a detail drawer - #961

Merged
Zach Dunn (zachdunn) merged 2 commits into
mainfrom
claude/admin-workspaces-table-layout-1c0ba4
Sep 12, 2026
Merged

feat(admin): wider workspaces view with plan + BYOB columns and a detail drawer#961
Zach Dunn (zachdunn) merged 2 commits into
mainfrom
claude/admin-workspaces-table-layout-1c0ba4

Conversation

@zachdunn

Copy link
Copy Markdown
Member

What

Reworks the operator /admin → Workspaces view so plan and storage mode are visible at a glance and the page has room for a proper table.

  • Wider surface. The admin shell now sits at 1440px (matching the account/workspace surfaces) instead of the 960px signed-in default — the width token is set on the #dashboard root, the same seam account-shell.css uses.
  • New columns. The list shows Plan (Free / Pro) and Storage (Shared / BYO) per workspace, so an operator no longer has to expand a row to see whether a workspace is paid or on its own bucket.
  • shadcn table + side drawer. The page was an imperative-DOM Astro script; it's now an SSR-first React island using the shared @uploads/ui Table, with a Sheet drawer on the right for the full per-workspace detail (people, plan, limits, storage, GitHub links, invites, invite links). Every editing flow is carried over unchanged, including the plan-default override-skip and byte/unit logic.

API

GET /admin-ui/workspaces now returns plan and byob per row. Both derive from the workspace record (via the shared getPlan and isByoRecord) in one parallel KV read — the list previously enumerated keys only. plan answers free-vs-paid tier only; the Stripe-vs-comped distinction stays in the drawer's plan endpoint (which does the per-workspace subscription lookup).

Notes

  • Sibling admin pages (users / oauth / email / metrics) are untouched imperative Astro; only Workspaces moved to React. The now-dead admin-workspaces.css was removed.
  • @uploads/web and @uploads/api are changeset-ignored, so no changeset.
  • A follow-up worth doing separately: the manual island-mount lifecycle in the page is now the 5th near-verbatim copy (AccountLayout / AdminLayout / files.astro / screenshots.astro) — extracting a shared mountIsland helper is out of scope here.

Verification

  • pnpm --filter @uploads/api typecheck and @uploads/web typecheck: 0 errors
  • Tests: 110 API (incl. new plan/byob coverage) + 959 web pass
  • oxlint clean; oxfmt + prettier applied

Not verified with a live screenshot: a local admin-authed render needs the demo user elevated to role: admin and the dev ports, which the main checkout was holding. The change is covered by types + tests; happy to capture a screenshot once a stack is free.

…lumns

Rewrite the operator /admin Workspaces page from imperative DOM into an
SSR-first React island using the shared shadcn Table, with a Sheet drawer
for per-workspace detail. Add Plan and Storage (BYOB) columns to the list so
an operator no longer has to expand a row to see them, and widen the admin
shell to 1440px to match the account/workspace surfaces.

GET /admin-ui/workspaces now returns plan + byob per row, both derived from
the workspace record in one parallel KV read.
- Shared useAdminResource hook replaces the per-editor fetch/cancel/error effect
- errMessage helper replaces the repeated error-message idiom
- InviteForm -> members refetch via a parent nonce, dropping the window CustomEvent
- Reuse ADMIN_DETAIL_HEADING and exported trimOrigin; use SELECT_SM; drop dead
  limit-value class
- Width token on the #dashboard root (matching account-shell), not .shell
- Honest comment on the per-workspace KV fan-out in the list handler
@changeset-bot

changeset-bot Bot commented Sep 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0f4ed33

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
uploads-api 0f4ed33 Commit Preview URL

Branch Preview URL
Sep 12 2026, 12:23 AM

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (2)
  • coderabbit:review
  • review
🚫 Excluded labels (none allowed) (1)
  • wip

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4df7c674-2871-45f7-ae70-2ca41457f424

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
uploads-web 0f4ed33 Commit Preview URL

Branch Preview URL
Sep 12 2026, 12:23 AM

@zachdunn
Zach Dunn (zachdunn) merged commit 9510ee0 into main Sep 12, 2026
5 checks passed
@zachdunn
Zach Dunn (zachdunn) deleted the claude/admin-workspaces-table-layout-1c0ba4 branch September 12, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant