Skip to content

feat(kiloclaw): show volume usage on user instance tab#2391

Open
evanjacobson wants to merge 7 commits intomainfrom
feat/kiloclaw-users-view-volume-usage
Open

feat(kiloclaw): show volume usage on user instance tab#2391
evanjacobson wants to merge 7 commits intomainfrom
feat/kiloclaw-users-view-volume-usage

Conversation

@evanjacobson
Copy link
Copy Markdown
Contributor

@evanjacobson evanjacobson commented Apr 14, 2026

Summary

Users had no way to see how much disk space their KiloClaw instance was using. This surfaces it directly in the user-facing Instance tab so users can monitor their own disk consumption without needing support. It also modifies the UI to support the extra field.

Details

- Extracts the Analytics Engine disk-usage query into a shared `@/lib/kiloclaw/disk-usage` module, reused by both the admin endpoint and a new user-scoped `/api/kiloclaw/disk-usage` route. - Redesigns the Instance tab from a flat five-column grid into card-based panels (State/Uptime, Volume Usage with progress bar, Lifecycle stats). - The progress bar uses color thresholds (green → amber at 75% → red at 90%). - The new API route follows the same auth + instance-registry lookup pattern as other user-scoped KiloClaw endpoints. The admin telemetry route is simplified to delegate to the shared module.

Visual Changes

Adding a 6th column would make the UI too condensed. A small refactor was done to enable a cleaner UI.
image
image
image
image

- migrate disk usage logic to shared module and API for reuse by UI/admin
- replace kiloclaw-controller-telemetry hooks with queryDiskUsage
- update InstanceTab to display Volume Usage with a HardDrive icon
- remove deprecated hooks.ts and add API route for disk usage
- update types to AnalyticsEngineResponse<ControllerTelemetryRow> where needed
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Apr 14, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • apps/web/src/app/(app)/claw/components/InstanceTab.test.ts

Reviewed by gpt-5.4-20260305 · 1,011,271 tokens

evanjacobson and others added 2 commits April 13, 2026 23:51
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>
The disk usage query key was shared across all org/personal contexts,
causing React Query to briefly show stale volume usage data when
switching between personal and org claws. Include organizationId in the
query key so each context gets its own cache entry.

Also exports and tests the pure utility functions in InstanceTab.
evanjacobson and others added 2 commits April 14, 2026 00:09
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>
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