Skip to content

refactor(web): rename ServerState/ChatState/VoiceState -> *Signals (#261)#471

Merged
intendednull merged 1 commit into
claude/friendly-maxwell-Oggvwfrom
auto-fix/issue-261-server-state-rename
Apr 28, 2026
Merged

refactor(web): rename ServerState/ChatState/VoiceState -> *Signals (#261)#471
intendednull merged 1 commit into
claude/friendly-maxwell-Oggvwfrom
auto-fix/issue-261-server-state-rename

Conversation

@intendednull
Copy link
Copy Markdown
Owner

what

three web sidecar types had same name as authoritative state 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 and confuse mental model.

fix

rename web-side types to *Signals suffix. they hold ReadSignal<...> fields, so Signals describes what they are. mechanical find-replace, no surrounding refactor.

  • ServerState -> ServerSignals
  • ChatState -> ChatSignals
  • VoiceState -> VoiceSignals

callsites

10 rename touches across 2 files:

  • crates/web/src/state.rs (def + use sites in AppState + 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.

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), the authoritative type.

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 pass

why *Signals

runner-up was ServerViewSignals etc — rejected, unnecessarily verbose. *Signals already disambiguates from authoritative *State, and it describes the load-bearing trait of the type (Leptos signals).

Refs #261


Generated by Claude Code

)

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
@intendednull intendednull merged commit 1cda5b8 into claude/friendly-maxwell-Oggvw Apr 28, 2026
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.

2 participants