Server admin 30: ui-voice-overview-channel-invites (#698) #770

Closed
charles wants to merge 0 commits from serveradmin-30-ui-voice-overview-channel-invites into serveradmin
Owner

Server administration 30: the voice section of the channel Overview and the channel Invites tab.

Stacked on: serveradmin-14-core-bans-invites, serveradmin-29-ui-channel-settings (both were already on origin/serveradmin when this branch was cut).

What was built

  • channel/voice.rs (CT/channel_overview_tab/{VoiceSettings,RtcRegionSelect,shared}.tsx, Slider.module.css): "Voice quality" goes from 8 kbps to the guild's maximum, with the markers from bitrate_markers (as getBitrateKbpsMarkers) and the value from kbps_text. "Participant limit" goes from 0 to 99, with "∞ No limit" at 0 and markers ∞/25/50/75/99. Both need MANAGE_CHANNELS. "Voice region" is a searchable select with "Automatic" first, then the regions by name; it needs UPDATE_RTC_REGION, and a user who has only that permission sees it alone. "Connection limit" with "Per member, across all devices." sits in the folded "Advanced" section, which is a Stateful widget and starts folded. Each slider has markers above the track, the factory default in green, and an inline reset button. Every change is a FieldEdit; the bitrate is sent in bit/s.
  • channel/invites.rs (CT/ChannelInvitesTab.tsx): the heading, "Create invite" and the community tab's "Pause invites" (MANAGE_GUILD), then Task 24's invite_list without the channel column. "Create invite" is disabled while the list loads or when the user may not invite. It is also the empty slate's action. It sends InviteAction::Create.
  • app.rs: the invite modal from Daily use is drawn over the channel settings. open_on resets it, and Escape closes it before it closes the settings.
  • overview.rs: draws the voice group and the Advanced section itself (it no longer takes a voice slot argument).

Strings (from the fork): "Voice quality", "{n} kbps", "Participant limit", "∞ No limit", "# participant(s)", "Connection limit", "Per member, across all devices.", "# connection(s)", "Voice region", "Automatic", "Advanced", "Reset slider to default value", "Manage invite links for this channel.", "Create invite".

Tests

  • tests/channel_settings.rs: bitrate_slider_range_by_guild, user_limit_zero_is_no_limit, region_select_automatic_and_search, region_only_view, channel_invites_rows_and_create. All 13 tests in the file pass locally.
  • Goldens: channel_settings_overview_voice, channel_settings_voice_region_only, channel_settings_invites. They were drawn on this machine's renderer, which matches the existing lavapipe goldens within tolerance, and are copied to docs/screenshots/. screenshot_suite passes. No Electron reference screenshot was available; the dimensions come from ChannelOverviewTab.module.css, Slider.module.css and ChannelInvitesTab.module.css.
  • Not done: the full FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci gate. It was cut off before it finished when the agent had to return, so it must be rerun before merge. clippy -D warnings, fmt and the fluxer-ui tests above passed. No FLUXER_DESKTOP_TESTS tests were run.

Deviations

  • The region search matches names only (it uses form::select's label filter), and no flag is drawn. The original also matches region ids and shows the flag emoji.
  • The slider's value is written to the right of the track, as Task 8's slowmode slider does. The original shows it in a tooltip while dragging.
  • Files changed outside the task's list, each change minimal: app.rs (media, the invite modal over the settings, Escape); screens/main/media.rs (the tab's avatars); invite_list.rs (slate now takes the label of its button); guild/invites.rs (pause is now pub(crate)); README.md.
  • Commit 50180b28 repairs the 27+29 merge (bug #766). The orchestrator's 817d9ce1 makes the same change and is merged in.

Closes #698

🤖 Generated with Claude Code

https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K

Server administration 30: the voice section of the channel Overview and the channel Invites tab. Stacked on: serveradmin-14-core-bans-invites, serveradmin-29-ui-channel-settings (both were already on origin/serveradmin when this branch was cut). ## What was built - `channel/voice.rs` (`CT/channel_overview_tab/{VoiceSettings,RtcRegionSelect,shared}.tsx`, `Slider.module.css`): "Voice quality" goes from 8 kbps to the guild's maximum, with the markers from `bitrate_markers` (as `getBitrateKbpsMarkers`) and the value from `kbps_text`. "Participant limit" goes from 0 to 99, with "∞ No limit" at 0 and markers ∞/25/50/75/99. Both need MANAGE_CHANNELS. "Voice region" is a searchable select with "Automatic" first, then the regions by name; it needs UPDATE_RTC_REGION, and a user who has only that permission sees it alone. "Connection limit" with "Per member, across all devices." sits in the folded "Advanced" section, which is a `Stateful` widget and starts folded. Each slider has markers above the track, the factory default in green, and an inline reset button. Every change is a `FieldEdit`; the bitrate is sent in bit/s. - `channel/invites.rs` (`CT/ChannelInvitesTab.tsx`): the heading, "Create invite" and the community tab's "Pause invites" (MANAGE_GUILD), then Task 24's `invite_list` without the channel column. "Create invite" is disabled while the list loads or when the user may not invite. It is also the empty slate's action. It sends `InviteAction::Create`. - `app.rs`: the invite modal from Daily use is drawn over the channel settings. `open_on` resets it, and Escape closes it before it closes the settings. - `overview.rs`: draws the voice group and the Advanced section itself (it no longer takes a `voice` slot argument). Strings (from the fork): "Voice quality", "{n} kbps", "Participant limit", "∞ No limit", "# participant(s)", "Connection limit", "Per member, across all devices.", "# connection(s)", "Voice region", "Automatic", "Advanced", "Reset slider to default value", "Manage invite links for this channel.", "Create invite". ## Tests - `tests/channel_settings.rs`: `bitrate_slider_range_by_guild`, `user_limit_zero_is_no_limit`, `region_select_automatic_and_search`, `region_only_view`, `channel_invites_rows_and_create`. All 13 tests in the file pass locally. - Goldens: `channel_settings_overview_voice`, `channel_settings_voice_region_only`, `channel_settings_invites`. They were drawn on this machine's renderer, which matches the existing lavapipe goldens within tolerance, and are copied to `docs/screenshots/`. `screenshot_suite` passes. No Electron reference screenshot was available; the dimensions come from `ChannelOverviewTab.module.css`, `Slider.module.css` and `ChannelInvitesTab.module.css`. - Not done: the full `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` gate. It was cut off before it finished when the agent had to return, so it must be rerun before merge. clippy -D warnings, fmt and the fluxer-ui tests above passed. No FLUXER_DESKTOP_TESTS tests were run. ## Deviations - The region search matches names only (it uses `form::select`'s label filter), and no flag is drawn. The original also matches region ids and shows the flag emoji. - The slider's value is written to the right of the track, as Task 8's slowmode slider does. The original shows it in a tooltip while dragging. - Files changed outside the task's list, each change minimal: `app.rs` (media, the invite modal over the settings, Escape); `screens/main/media.rs` (the tab's avatars); `invite_list.rs` (`slate` now takes the label of its button); `guild/invites.rs` (`pause` is now `pub(crate)`); `README.md`. - Commit 50180b28 repairs the 27+29 merge (bug #766). The orchestrator's 817d9ce1 makes the same change and is merged in. Closes #698 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
origin/serveradmin at 573324bc does not compile: Task 27 added
ConfirmModel::waiting and Modal::Moderation, Task 29 built a ConfirmModel
without the field and the modal list kept its old length.

Refs #698

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Failing tests for the voice section of the channel Overview and the channel
Invites tab: bitrate_slider_range_by_guild, user_limit_zero_is_no_limit,
region_select_automatic_and_search, region_only_view,
channel_invites_rows_and_create.

Refs #698

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
The voice settings of the channel Overview (VoiceSettings.tsx,
RtcRegionSelect.tsx): Voice quality with the guild's maximum, Participant
limit with No limit at 0, the searchable Voice region select, the folded
Advanced section with the connection limit, the region alone for a user with
only UPDATE_RTC_REGION. The channel Invites tab (ChannelInvitesTab.tsx) over
Server admin 24's invite list, with Create invite opening the invite modal
over the settings. Goldens channel_settings_overview_voice,
channel_settings_voice_region_only, channel_settings_invites.

Refs #698

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Author
Owner

Independent review: Server admin 30 (head a63ba95d)

Reviewed git diff origin/serveradmin..a63ba95d (Task 30's own changes; the Task 25 code in the 573324bc diff is already on serveradmin).

Local gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci on a63ba95d: all steps passed (fmt, clippy -D warnings, deny, core isolation, parity, tests, screenshot tests including the three new goldens channel_settings_overview_voice, channel_settings_voice_region_only, channel_settings_invites, and screenshot_suite).

Checks

  1. Plan tests: bitrate_slider_range_by_guild, user_limit_zero_is_no_limit, region_select_automatic_and_search, region_only_view and channel_invites_rows_and_create exist in tests/channel_settings.rs and assert the spec's values: 8 kbps to 96 (no feature) or 384 (AUDIO_BITRATE_384_KBPS), markers 8/64/96, the store gets bit/s, "∞ No limit" at 0, 0-99, connection limit 1-100 with default 5 under a folded "Advanced", "Automatic" = null and comes first, region-only shows no name, topic, slowmode, sliders or Advanced, and "Create invite" gives InviteAction::Create. The three goldens are present.
  2. Interfaces: channel/{voice,invites}.rs add the voice section, the region-only view, and the Invites tab, which reuses invite_list and the existing invite modal (invite::over / open_on). The Task 29 slot (overview::view(model, voice)) becomes overview::view(model), and channel::view gains &media::State. Nothing else uses either function.
  3. Invariants: no I/O added to fluxer-ui. No new fixtures (it reuses rest/rtc_regions.json and serveradmin/invites.json). Server values cannot panic it: the slider max is at least min, the marker span is at least 1, and the u16 clamp and multiplication saturate. No secrets.
  4. Parity, checked against fluxer-soundboard:
    • VoiceSettings.tsx: participant limit 0-99, markers [0,25,50,75,99], "∞" marker. Connection limit markers [1,5,25,50,75,100], the marker at 1 has no label, default 5. Plural strings match.
    • shared.ts getBitrateKbpsMarkers matches bitrate_markers exactly. The factory default is min(64, max).
    • ChannelOverviewTab.tsx: showVoiceSection = voice && (MANAGE_CHANNELS || UPDATE_RTC_REGION) and showAdvancedSection = MANAGE_CHANNELS && voice. Both match.
    • ChannelInvitesTab.tsx: Create is disabled while pending or without canInvite, Pause appears only with MANAGE_GUILD, and the empty slate's "Create invite" appears only with canInvite. All match.
  5. Review Focus: none is specific to this task. The writes go through FieldEdit, so nothing is sent before Save (#3 holds).

Findings

  • minor: The region search matches names only. RtcRegionSelect.tsx filterOption also matches region.id, and the select draws no flag emoji. The PR states this deviation. It needs a docs/parity note or a follow-up issue.
  • minor: The slider value is written to the right of the track. The original shows it only in a tooltip while dragging (SliderTooltipPortal). This is consistent with the Task 8 slowmode precedent and is stated in the PR.
  • minor: region_model (core, not this task) sorts by byte order. The original sorts with localeCompare. They give the same result for ASCII names.
  • minor: The three new goldens were drawn on the implementer's renderer, not lavapipe in Docker. They pass here within tolerance. Watch the Linux runner.
  • note (not this task): this branch conflicts with serveradmin-28-ui-members-page in app.rs (Local fields), theme/icons.rs and docs/screenshots/README.md. These are short additions that are easy to resolve, and the Local conflict comes from Task 29's line, not Task 30's. main/media.rs auto-merges. #766 (merge of 27/29) is fixed upstream by 817d9ce1.

Verdict: approved. No blocking findings and the local gate is green.

## Independent review: Server admin 30 (head a63ba95d) Reviewed `git diff origin/serveradmin..a63ba95d` (Task 30's own changes; the Task 25 code in the 573324bc diff is already on serveradmin). **Local gate:** `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` on a63ba95d: **all steps passed** (fmt, clippy -D warnings, deny, core isolation, parity, tests, screenshot tests including the three new goldens `channel_settings_overview_voice`, `channel_settings_voice_region_only`, `channel_settings_invites`, and `screenshot_suite`). **Checks** 1. Plan tests: `bitrate_slider_range_by_guild`, `user_limit_zero_is_no_limit`, `region_select_automatic_and_search`, `region_only_view` and `channel_invites_rows_and_create` exist in `tests/channel_settings.rs` and assert the spec's values: 8 kbps to 96 (no feature) or 384 (AUDIO_BITRATE_384_KBPS), markers 8/64/96, the store gets bit/s, "∞ No limit" at 0, 0-99, connection limit 1-100 with default 5 under a folded "Advanced", "Automatic" = null and comes first, region-only shows no name, topic, slowmode, sliders or Advanced, and "Create invite" gives `InviteAction::Create`. The three goldens are present. 2. Interfaces: `channel/{voice,invites}.rs` add the voice section, the region-only view, and the Invites tab, which reuses `invite_list` and the existing invite modal (`invite::over` / `open_on`). The Task 29 slot (`overview::view(model, voice)`) becomes `overview::view(model)`, and `channel::view` gains `&media::State`. Nothing else uses either function. 3. Invariants: no I/O added to fluxer-ui. No new fixtures (it reuses `rest/rtc_regions.json` and `serveradmin/invites.json`). Server values cannot panic it: the slider max is at least min, the marker span is at least 1, and the u16 clamp and multiplication saturate. No secrets. 4. Parity, checked against fluxer-soundboard: - `VoiceSettings.tsx`: participant limit 0-99, markers [0,25,50,75,99], "∞" marker. Connection limit markers [1,5,25,50,75,100], the marker at 1 has no label, default 5. Plural strings match. - `shared.ts` `getBitrateKbpsMarkers` matches `bitrate_markers` exactly. The factory default is `min(64, max)`. - `ChannelOverviewTab.tsx`: `showVoiceSection = voice && (MANAGE_CHANNELS || UPDATE_RTC_REGION)` and `showAdvancedSection = MANAGE_CHANNELS && voice`. Both match. - `ChannelInvitesTab.tsx`: Create is disabled while pending or without `canInvite`, Pause appears only with MANAGE_GUILD, and the empty slate's "Create invite" appears only with `canInvite`. All match. 5. Review Focus: none is specific to this task. The writes go through `FieldEdit`, so nothing is sent before Save (#3 holds). **Findings** - minor: The region search matches names only. `RtcRegionSelect.tsx` `filterOption` also matches `region.id`, and the select draws no flag emoji. The PR states this deviation. It needs a `docs/parity` note or a follow-up issue. - minor: The slider value is written to the right of the track. The original shows it only in a tooltip while dragging (`SliderTooltipPortal`). This is consistent with the Task 8 slowmode precedent and is stated in the PR. - minor: `region_model` (core, not this task) sorts by byte order. The original sorts with `localeCompare`. They give the same result for ASCII names. - minor: The three new goldens were drawn on the implementer's renderer, not lavapipe in Docker. They pass here within tolerance. Watch the Linux runner. - note (not this task): this branch conflicts with `serveradmin-28-ui-members-page` in `app.rs` (`Local` fields), `theme/icons.rs` and `docs/screenshots/README.md`. These are short additions that are easy to resolve, and the `Local` conflict comes from Task 29's line, not Task 30's. `main/media.rs` auto-merges. #766 (merge of 27/29) is fixed upstream by 817d9ce1. **Verdict: approved.** No blocking findings and the local gate is green.
Author
Owner

Merged into serveradmin by hand (the merge API returns 405); the commits are in the branch.

Merged into `serveradmin` by hand (the merge API returns 405); the commits are in the branch.
charles closed this pull request 2026-11-16 11:09:33 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.