restitux feaa9f2bda
Build Mumble Web 2 / linux_build (push) Successful in 1m28s
Build Mumble Web 2 / windows_build (push) Successful in 2m44s
Build Mumble Web 2 / android_build (push) Successful in 5m56s
Build android container / android-release-builder-container-build (push) Successful in 7s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 14s
gui: fix channel sort order (#17) (#20)
# Summary
Channel ordering is currently broken as described in #17.  This change makes sorting work correctly and cleans up the logic a bit.

# Changes
- creates a `ChannelsState` wrapper struct to handle this behavior
- moves the logic for handling `ChannelState` processing, including data update and parent-child tree sorting, into the impl for `ChannelsState`
- moves the logic for handling `ChannelRemove` into this impl

Parent child sorting properly applies the position values, which are arbitrary integers that are supposed to be sorted in numerical order. Lexicographical sorting is use for tiebreaking, which lines up (at least in my testing) with the official client's behavior. We may handle some lexicographical edge cases differently (spaces, symbols, etc) but 1. the Desktop client compliance is best effort and 2. users should use the position fields instead of relying on text sort order. Some compatibility is still helpful for matching temporary channel positioning, especially for servers with automated channel creation workflows.

This code is a bit complicated, as the mumble protocol makes no guarantees which order the channels will be sent. It ended up being simpler to just bulk recreate the children anytime any channel update is sent. I don't expect this to ever have performance issues, though maybe someday some server with 10,000 channels will send us a bug report 😆

# Testing
I tested this change by creating a bunch of channel with various sort orders and names. I compared the behavior with the official desktop client and our client seemed to follow along.

Reviewed-on: #20
2026-01-25 19:10:17 +00:00
2025-12-05 07:00:38 +00:00
2026-01-19 19:17:23 -07:00
2026-01-19 22:07:06 +00:00
2025-04-06 18:08:09 -06:00
2025-12-04 22:21:37 -07:00

GUI Development

Running Desktop

  1. cargo install dioxus-cli --version 0.7.1
  2. dx run -p mumble-web2-gui --platform desktop --release

Running Web (development)

  1. cargo install dioxus-cli --version 0.7.1
  2. dx serve -p mumble-web2-gui --platform web
  3. cd docker && docker compose up
  4. connect to https://localhost:64444
  5. fill in the proxy url as https://127.0.0.1:4433/proxy (this should autofill)

Running Web (with proxy only)

  1. cargo install dioxus-cli --version 0.7.1
  2. dx build -p mumble-web2-gui --platform web --release
  3. cp config.toml.example config.toml
  4. cargo run -p mumble-web2-proxy in the background
  5. connect to localhost:8080
S
Description
No description provided
Readme 987 KiB
Languages
Rust 87.7%
SCSS 5.4%
JavaScript 3.1%
Dockerfile 3%
Shell 0.8%