refactor(web): rename ServerState/ChatState/VoiceState -> *Signals (#261)#471
Merged
intendednull merged 1 commit intoApr 28, 2026
Conversation
) web crate had three types that name-clash with authoritative willow_state and willow_client types: - web::state::ServerState vs willow_state::ServerState - web::state::ChatState vs willow_client::state::ChatState - web::state::VoiceState vs willow_client::state_actors::VoiceState spec say willow_state::ServerState is THE single source of truth. web sidecar holding Leptos signals shouldnt steal the name. rename web sidecar types to *Signals suffix. signals is what they hold (ReadSignal<...> fields), so name now describe content not fight upstream. mechanical find-replace, no surrounding refactor. callsites: 10 rename touches in 2 files (state.rs + call_page.rs comment). browser tests had no references. authoritative ServerState comments in settings.rs/holder_pill.rs/channel_sidebar.rs left alone — they correctly point at willow_state::ServerState fields (mute_state, channel_keys). verification: - cargo check -p willow-web --target wasm32-unknown-unknown: green - cargo check -p willow-web --tests --target wasm32-unknown-unknown: green - cargo fmt --check: clean - cargo clippy --workspace --all-targets -- -D warnings: zero warnings - cargo test --workspace: all green runner-up: ServerViewSignals/etc — rejected, unnecessarily verbose when *Signals already disambiguates from authoritative *State. Refs #261
This was referenced Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
three web sidecar types had same name as authoritative state types:
web::state::ServerStatevswillow_state::ServerStateweb::state::ChatStatevswillow_client::state::ChatStateweb::state::VoiceStatevswillow_client::state_actors::VoiceStatespec say
willow_state::ServerStateis THE single source of truth. web sidecar holding Leptos signals shouldnt steal the name and confuse mental model.fix
rename web-side types to
*Signalssuffix. they holdReadSignal<...>fields, soSignalsdescribes what they are. mechanical find-replace, no surrounding refactor.ServerState->ServerSignalsChatState->ChatSignalsVoiceState->VoiceSignalscallsites
10 rename touches across 2 files:
crates/web/src/state.rs(def + use sites inAppState+create_signals)crates/web/src/components/call_page.rs(1 doc comment)browser tests in
crates/web/tests/had zero references. no foreign imports of these types existed.ServerStatecomments insettings.rs,holder_pill.rs,channel_sidebar.rsleft alone — they correctly point atwillow_state::ServerStatefields (mute_state,channel_keys), the authoritative type.verification
cargo check -p willow-web --target wasm32-unknown-unknowngreencargo check -p willow-web --tests --target wasm32-unknown-unknowngreencargo fmt --checkcleancargo clippy --workspace --all-targets -- -D warningszero warningscargo test --workspaceall passwhy *Signals
runner-up was
ServerViewSignalsetc — rejected, unnecessarily verbose.*Signalsalready disambiguates from authoritative*State, and it describes the load-bearing trait of the type (Leptos signals).Refs #261
Generated by Claude Code