The desktop GUI doesn't go through the proxy to reach the Mumble server,
so its login screen needs to ping directly. Rather than duplicate the
ping logic, move it into the common crate behind an optional
`networking` feature (so common stays lightweight when the feature
isn't requested).
- common: add `ping_server(address, port)` behind `networking` feature
- proxy: replace the inline UdpSocket ping + ping.rs codec with a call
to common::ping_server; drop the rand dep
- client: PlatformInterface::get_status now takes an address; desktop
and mobile call common::ping_server directly, web still uses the
proxy's /status endpoint
- gui: thread the address from the login input through get_status, so
it re-pings when the user edits the address
Assisted-by: claude-opus-4-7
Reviewed-on: #33
Reviewed-by: restitux <restitux@ohea.xyz>
Co-authored-by: Sam Sartor <me@samsartor.com>
Co-committed-by: Sam Sartor <me@samsartor.com>
Some quick QAL changes I banged out this morning. The commit messages describe the individual changes in details.
## Changes
- Min window width on desktop.
- Removes white flash on desktop startup
- Removes right click menu on release builds (still exists on debug, and might come back in the future with new features).
Reviewed-on: #27
Reviewed-by: restitux <restitux@ohea.xyz>
# Summary
Introduces a trait-based platform abstraction layer that makes the boundary
between platform-specific and shared code explicit and compile-time verified.
The TLDR version of this new trait stuff works:
1. Define a `PlatformInterface` trait.
2. Each platform defines a zero-sized struct implementing the trait (ex `WebPlatform`).
3. Create an ifdef'd type alias on those structs:
```rust
#[cfg(feature = "web")]
pub type Platform = web::WebPlatform;
#[cfg(all(feature = "desktop"))]
pub type Platform = desktop::DesktopPlatform;
#[cfg(all(feature = "mobile", not(feature = "web")))]
pub type Platform = mobile::MobilePlatform;
```
5. Add a compile time assertion that `Platform` implements `PlatformInterface`.
# Motivation
Previously, platform code used a mix of pub use re-exports and #[cfg] blocks
that made it difficult to understand what each platform must implement. The
new trait-based approach provides:
- Clear documentation of the platform contract
- Compile-time verification that all platforms implement required
functionality
- Ability to cargo check without feature flags (via stub platform)
# Changes
New traits in imp/mod.rs:
- PlatformInterface - logging, permissions, network, config, storage. Overall this the trait that platforms must satify to compile.
- AudioSystemInterface - audio system initialization and recording
- AudioPlayerInterface - opus audio playback
Type aliases:
- Platform, AudioSystem, AudioPlayer resolve to the correct types based on
feature flags
Call site updates:
- Changed from imp::function() to Platform::function() syntax
- Removed ImpRead/ImpWrite helper traits in favor of direct bounds
# Testing
Manual testing reveals that Web and Desktop still work, I (Liam) have not tested the mobile version beyond compilation.
Co-authored-by: Liam Warfield <liam.warfield@gmail.com>
Reviewed-on: #18
Co-authored-by: Sam Sartor <me@samsartor.com>
Co-committed-by: Sam Sartor <me@samsartor.com>