Skip to content

feat(hosts): rename the cluster - #464

Merged
andrebrait merged 1 commit into
ompweb-dev:mainfrom
andrebrait:feat/cluster-rename
Nov 12, 2026
Merged

andrebrait merged 1 commit into
ompweb-dev:mainfrom
andrebrait:feat/cluster-rename

Conversation

@andrebrait

Copy link
Copy Markdown
Collaborator

Summary

The cluster (#459) is created as Cluster when the first host joins, and the only way to change its label was a whole-registry PUT /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; unreadable pools.json 503.
  • Settings → Hosts: when a cluster exists, a line "Cluster: " with Rename cluster, reusing the host name dialog. The sidebar group label follows through the hosts channel.
  • Strings in en, ja, zh-CN, zh-TW.

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.
  • Not rendered in a browser.

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.
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 54b8e2bb-a5b8-43b2-a086-753cda86e72f
Commits

Reviewing files that changed from the base of the PR and between a53494c and 2326aa8.

Files selected for processing: 9

  • CHANGELOG.md
  • app/api/hosts/route.ts
  • components/HostsConfig.tsx
  • graphify-out/graph.json
  • lib/hosts/hosts-route.test.mjs
  • lib/i18n/locales/en.json
  • lib/i18n/locales/ja.json
  • lib/i18n/locales/zh-CN.json
  • lib/i18n/locales/zh-TW.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@andrebrait

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T18:23:16.599129Z 2326aa8 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 2326aa8615

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@kilo-code-bot

kilo-code-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

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)
  • CHANGELOG.md
  • app/api/hosts/route.ts
  • components/HostsConfig.tsx
  • graphify-out/graph.json (generated artifact — skipped)
  • lib/hosts/hosts-route.test.mjs
  • lib/i18n/locales/en.json
  • lib/i18n/locales/ja.json
  • lib/i18n/locales/zh-CN.json
  • lib/i18n/locales/zh-TW.json

Reviewed by free · Input: 60.3K · Output: 14.4K · Cached: 238.5K

@andrebrait
andrebrait merged commit de3ff53 into ompweb-dev:main Nov 12, 2026
5 checks passed
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