Skip to content

feat(admin): add machine size update endpoint and admin UI#1357

Draft
evanjacobson wants to merge 1 commit intomainfrom
improvement/patch-claw-machine
Draft

feat(admin): add machine size update endpoint and admin UI#1357
evanjacobson wants to merge 1 commit intomainfrom
improvement/patch-claw-machine

Conversation

@evanjacobson
Copy link
Contributor

Summary

  • Adds a targeted PATCH /api/platform/machine-size endpoint to update a kiloclaw instance's machineSize without re-provisioning (which would wipe envVars, secrets, etc.)
  • Adds updateMachineSize DO method, internal client method, and tRPC admin mutation through the full stack
  • Adds Machine Size editor in the admin panel's Live Worker Status card with valid Fly.io machine configurations (shared-cpu-2x minimum, 3 GB RAM minimum)
  • Memory options are dynamically computed based on cpu_kind and CPU count, respecting Fly's step size and per-preset min/max rules

Test plan

  • Verify pnpm tsc --noEmit passes in both kiloclaw/ and root
  • Test the admin UI: open an instance detail, verify Machine Size displays correctly
  • Test editing: changing CPU Kind auto-adjusts CPU and memory options
  • Test Save: confirm mutation succeeds and toast shows "Takes effect on next restart"
  • Test Reset to Default: confirm sends null and displays "Default (shared-cpu-2x / 3 GB)"
  • Verify new size is applied after a machine restart (via guestFromSize)

Add a targeted PATCH endpoint to update a kiloclaw instance's machineSize
without re-provisioning (which would wipe envVars, secrets, etc.).
New size takes effect on the next machine restart.

The admin UI presents valid Fly.io machine configurations with dynamic
memory options based on cpu_kind and CPU count, enforcing shared-cpu-2x
as the minimum preset and 3 GB as the minimum RAM.
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