Repository navigation
wavemelo v0.9.0
wavemelo v0.9.0
Highlights
- Interactive Now Playing controls: pause/resume, skip, stop, and volume steps
directly from the/nowplayingmessage. - Stale-button protection: every control is stamped with a generation counter
that is invalidated on any track transition.
Added
src/ui/components.rs: strict component-ID grammar
(wavemelo:ctrl:<guild>:<generation>:<op>) with canonical decimal fields,
a 100-character cap, and rejection of malformed or foreign IDs.src/ui/controls.rs: component interaction handler routed through the
framework event handler (Poise dispatch only covers commands and
autocomplete). Controls require the same voice channel as the bot.- Generation counters on guild state; bumped on track start, skip, stop,
queue jump, and loop-mode changes so old buttons cannot double-skip. - Volume step helper clamped to the supported 0..=150 range.
Changed
/nowplayingrenders from a single shared player snapshot
(now_playing::collect_view) used by both commands and buttons.- Control interactions acknowledge before remote work, then edit the original
message in place; failures replace the embed with a safe error message.
Security and integrity
- Component IDs are validated for canonical numeric form (no leading zeros,
no signs, ASCII digits only), guild binding, and known operations. - IDs from other applications are ignored without a response.
- No mutex guard is held across network I/O; per-guild mutations are
serialized with the existing operation lock.
Testing and validation
| Gate | Command | Result |
|---|---|---|
| Format | cargo fmt --all -- --check |
passed |
| Check | cargo check --all-targets --locked |
passed |
| Clippy | cargo clippy --all-targets --locked -- -D warnings |
passed |
| Tests | cargo test --locked |
passed |
| Release build | cargo build --release --locked |
passed |
| Compose | docker compose config --quiet |
passed |
| Localization scan | Thai Unicode in src/ |
0 matches |
Upgrade instructions
Restart the bot. Existing /nowplaying messages gain buttons automatically;
no configuration changes are required.
Known limitations
- Buttons expire when the track changes; run
/nowplayingagain for fresh
controls. - Live Discord interaction delivery remains unverified without a running
deployment.