Skip to content

feat(web): storage cap frontend — sidebar indicator + admin Instance settings tab#102

Merged
ravirajsinh45 merged 8 commits into
mainfrom
feat/storage-cap-frontend
Jul 7, 2026
Merged

feat(web): storage cap frontend — sidebar indicator + admin Instance settings tab#102
ravirajsinh45 merged 8 commits into
mainfrom
feat/storage-cap-frontend

Conversation

@ravirajsinh45

Copy link
Copy Markdown
Contributor

Summary

Frontend for the instance storage cap (backend #98). Stacked on #101 (top of the storage epic stack).

  • Member indicator: the global sidebar shows instance used / limit + a meter (amber ≥80%, red ≥90%); used only when unlimited.
  • Admin: settings/admin gains client-side Users | Instance settings sub-tabs; the Instance settings tab shows current usage + a GB input to set the cap (0/blank = unlimited) → PUT /instance/settings + SWR mutate (the sidebar refreshes live via the shared SWR key).
  • Adds a shared <StorageUsage> component + pure storageMeterState helper + api.put + InstanceSettings type. Branding untouched (clubbed into the tab group post-feat: Instance branding — white-label logos, org name, favicon, Powered by FreeFrame #90).

Testing

  • tsc --noEmit clean; new vitest: storageMeterState/GB conversion (8), <StorageUsage> render limited+unlimited (2), InstanceSettingsTab save→GB→PUT (2). All pass.
  • Note: 5 pre-existing vitest failures (api.test.ts stale fetch mocks; notification-store) predate this branch — proven by reverting to the parent. CI runs the web build, not vitest, so they've been silently red. Unrelated to this change; flagged for cleanup.

Follow-ups

@ravirajsinh45 ravirajsinh45 force-pushed the feat/reap-stale-uploads branch from d9f4484 to 9916b6b Compare July 7, 2026 04:28
ravirajsinh45 added a commit that referenced this pull request Jul 7, 2026
@ravirajsinh45 ravirajsinh45 force-pushed the feat/storage-cap-frontend branch from 50761e5 to 9b9a05a Compare July 7, 2026 04:28
@ravirajsinh45 ravirajsinh45 force-pushed the feat/reap-stale-uploads branch from 9916b6b to b304e70 Compare July 7, 2026 05:26
ravirajsinh45 added a commit that referenced this pull request Jul 7, 2026
@ravirajsinh45 ravirajsinh45 force-pushed the feat/storage-cap-frontend branch from 6f7db56 to f516fe5 Compare July 7, 2026 05:26
@ravirajsinh45 ravirajsinh45 force-pushed the feat/reap-stale-uploads branch from b304e70 to 872907e Compare July 7, 2026 05:50
@ravirajsinh45 ravirajsinh45 changed the base branch from feat/reap-stale-uploads to main July 7, 2026 05:53
@ravirajsinh45 ravirajsinh45 force-pushed the feat/storage-cap-frontend branch from f516fe5 to 12b5966 Compare July 7, 2026 05:53
@ravirajsinh45 ravirajsinh45 merged commit 69de36a into main Jul 7, 2026
4 checks passed
@ravirajsinh45 ravirajsinh45 deleted the feat/storage-cap-frontend branch July 7, 2026 05:56
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