Skip to content

feat(panel): create a hub channel, rename it on save, broken hub, last spawn failure - #309

Merged
SyniRon merged 3 commits into
developfrom
feat/295-hub-create-rename-broken
Sep 18, 2026
Merged

SyniRon merged 3 commits into
developfrom
feat/295-hub-create-rename-broken

Conversation

@SyniRon

@SyniRon SyniRon commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Closes #295. Spec #285.

What changed

The hub page gains a create form: a category, a hub channel name and a base string. The service creates the voice channel under the category with overwrites omitted, so it takes the category's permissions from birth, then writes the hub row with the defaults. A row write that fails deletes the channel it just made. The create and register forms post to one route and are told apart by their fields: the create form carries category, the register form hub_channel.

The edit form's hub channel name is writable. A changed name renames the channel before the row saves, with an audit log reason naming the panel user. A rename Discord refuses saves nothing and the form names channel_name with a body-free phrase. The rename joins the change log entry as channel_name.

The bitrate ceiling is the guild's boost tier, read at save through the manager seam: 96000, 128000, 256000 or 384000. Over it is refused with bitrate named.

A broken hub, one whose channel is gone or has no category, is derived from the guild's channel list at page load. The list marks it and offers Remove alone. Its own page shows the note, the remove form and the change log, no edit form. An update of a broken hub is refused before any rename.

The list shows each hub's last spawn failure, cause and time, from the runtime, beside the live spawned count.

commands.DiscordErrorDetail exports the body-free phrase the warden classifier already produces, for the panel's refusals. The panel coverage floor rises from 75 to 78.

Review notes

  • Two commits. The second applies the two-axis review: shared newHub and applyNew for create and register, one hubChannelState value the list, the form and the update read, one refusal template block behind RefusalFor, and the Discord create refusal filed under category (the cap and the bot's view of the category are what Discord refuses on).
  • The seam ledger for the tests went through a seam-sniffer review before any code was written. Every test reads the page through data-hub, data-field and data-error; none pins wording, labels or order.
  • A rename that succeeds and a row write that then fails leaves Discord renamed with no row change. The error names both names so Sentry shows the mismatch. Rolling the rename back would spend the channel's second rename slot in the ten-minute window, so it is left as a traceable fault.

Gates

  • CI gate green locally: lint, tidy, race tests with coverage floors, build. Panel coverage 78.8% to 81.0%.
  • Smoke test on the test guild passed: created a hub from the panel, joined it and spawned "Smoke Voice - 1", renamed the hub channel from the form (Discord's audit log shows "Panel: hub channel renamed by Sypolt.R (forum user 740)"), deleted the hub channel in Discord and saw the hub marked broken with Remove alone, then removed it.

…t spawn failure

Closes #295. Spec #285.

The hub page gains a create form: a category, a hub channel name and a
base string. The service creates the voice channel under the category
with overwrites omitted, so Discord syncs it from birth, then writes the
hub row with the defaults. A row write that fails deletes the channel it
just made. The create and register forms post to one route and are told
apart by their fields.

The edit form's hub channel name is writable. A changed name renames the
channel before the row saves, with an audit log reason naming the panel
user; a rename Discord refuses saves nothing and the form names the
field with a body-free phrase. The bitrate ceiling is the guild's boost
tier, read at save through the manager seam.

A broken hub, one whose channel is gone or has no category, is derived
from the guild's channel list at page load. The list marks it and offers
Remove alone; its section shows the remove form and the change log and
no edit form. An update of a broken hub is refused before any rename.

The list shows each hub's last spawn failure, time and cause, from the
runtime, beside the live spawned count.

commands.DiscordErrorDetail exports the body-free phrase the warden
classifier already produces, for the panel's refusals. The panel
coverage floor rises to 78.
A Discord create refusal names the category field, not the channel name:
the category cap and a category the bot cannot see are what Discord
refuses on. A create's change log entry carries the channel name typed,
as a rename's does. A row write that fails after a rename names both
names in the error, so the mismatch is traceable.

Create and register share newHub and applyNew. hubChannel returns one
state value the list, the form and the update read. The refusal note is
one template block behind RefusalFor. hubPage.Form is Register, and
guild() is readGuild(), beside snapshot.guild.

Tests: the edit route refuses an empty and a 101-character channel name;
the Discord create refusal and the broken hub update assert their field;
"syncs" leaves the test name and the assertion, per CONTEXT.md.
panel/hubs.go:123: delete, the broken hub refusal note and its render
panel/hubs.go:791: replace, the bitrate refusal drops its boost tier sentence
panel/templates/home.html:24: replace, the empty state names the register form alone
panel/templates/home.html:50: delete, the category hint
panel/templates/home.html:57: delete, the hub channel name hint
panel/templates/home.html:103: revise, the broken hub body
panel/templates/home.html:113: delete, the rename hint
panel/templates/home.html:155: replace, the bitrate hint
@SyniRon
SyniRon merged commit d7268d7 into develop Sep 18, 2026
3 checks passed
@SyniRon
SyniRon deleted the feat/295-hub-create-rename-broken branch September 18, 2026 22:08
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.

Hub page: create a hub channel, rename it on save, broken hub, last spawn failure

1 participant