Repository navigation
feat(hosts): rename the cluster - #464
Conversation
The cluster is created as "Cluster" on the first join and nothing but a whole
pool-registry PUT could change its label. PATCH /api/hosts { poolId, label }
renames one pool; Settings > Hosts shows the cluster name with a Rename button.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
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. |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 🏆 Best part: The API validation actually does what the PR description claims it does — trimmed labels, unknown-pool 404, extra keys 400, unreadable registry 503. I'm almost disappointed; there's nothing to scream about. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (9 files)
Reviewed by free · Input: 60.3K · Output: 14.4K · Cached: 238.5K |
Summary
The cluster (#459) is created as
Clusterwhen the first host joins, and the only way to change its label was a whole-registryPUT /api/hosts { pools }. This adds:PATCH /api/hosts { poolId, label }: renames one pool (load, set label, save, notify). Same label rules as host names (trimmed, non-empty, at most 100 characters); unknown pool 404; extra keys 400; unreadablepools.json503.hostschannel.Not included: choosing the name before the first join (the cluster still starts as "Cluster"; rename right after).
Testing
lib/hosts/hosts-route.test.mjs: PATCH renames only that pool and keeps its configuration; blank label 400, unknown pool 404, extra keys 400. Fails on main.bun test --parallel lib/i18n.test.mjs lib/hosts/hosts-route.test.mjs components/HostsConfig*.test.mjs: 108 pass.