Skip to content

[ARCH-09] ServerState name collision between willow-state and willow-web #261

@intendednull

Description

@intendednull

Commit: 2f26d91 · Finding: ARCH-09

Problem

Two entirely different ServerState types live in the same dependency graph:

  • willow_state::ServerState at crates/state/src/server.rs:33 — authoritative event-sourced projection (server_id, channels, roles, members, permissions, messages, profiles, …).
  • willow_web::state::ServerState at crates/web/src/state.rs:140 — Leptos-signal sidecar for UI (servers, active_server_id, …).

Both are reachable from willow_web. Any use willow_state::ServerState; use willow_web::state::ServerState; pair is a compile error or a subtle shadowing bug; IDE go-to-definition behaves unpredictably. The spec explicitly names willow_state::ServerState as the single source of truth, so the UI-side reuse of that name undermines the mental model.

Same issue applies to web::state::ChatState and VoiceState, which also collide with client::state::ChatState and client::state_actors::VoiceState.

Fix

Rename the web-side types:

  • ServerStateServerSignals (or ServerViewSignals)
  • ChatStateChatSignals
  • VoiceStateVoiceSignals

Obvious? Moderate — mechanical find-and-replace at the boundary; will be auto-PR'd.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions