test(client): cover actions.rs translation logic#483
Merged
intendednull merged 1 commit intoApr 28, 2026
Merged
Conversation
Adds 7 client-tier tests for the methods in `actions.rs` that do real translation work before delegating: `share_file_inline` (size cap + body shape), `create_voice_channel` (UUID + Voice kind), `set_permission` (grant + revoke branches), `assign_role`, and the `pinned_message_ids` / `pinned_messages` / `is_pinned` derived-view chain (including unknown-channel fallback). Pure pass-throughs (`send_message`, `create_channel`, `propose_revoke_admin`, etc.) are documented as such in a new module-level doc comment on `actions.rs` and intentionally not re-tested here — their behaviour is covered through the mutation handle in `tests/multi_peer_sync.rs`, `tests/trust_flow.rs`, and the state-machine tests. Refs #420
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.
Adds client-tier tests for the methods in
crates/client/src/actions.rsthat do real translation work before delegating to the mutation handle. Pure pass-throughs are documented at the module level rather than re-tested.Tests added (7)
share_file_inline_rejects_oversized_payload— 256 KiB cap branch.share_file_inline_emits_base64_encoded_body—[file:NAME:BASE64]body shape + round-trip.create_voice_channel_records_voice_kind— UUID minting +ChannelKind::Voicematerializes.set_permission_grants_then_revokes_on_role— bothgranted=trueandgranted=falsebranches.assign_role_adds_role_to_member— role id lands on the member's role set.pinned_message_ids_empty_for_unknown_channel— name-lookup fallback returns empty rather than panicking.pin_message_flows_through_pinned_views— pin lifecycle composition throughpinned_message_ids,pinned_messages,is_pinned, then unpin.Pass-throughs documented (not re-tested)
send_message,send_reply,edit_message,delete_message,react,pin_message,unpin_message,create_channel,create_ephemeral_channel,revive_channel,delete_channel,propose_grant_admin,propose_revoke_admin,propose_kick_member,create_role,delete_role,switch_channel,mutate_channel_mute,mutate_grove_mute— covered through the mutation handle intests/multi_peer_sync.rs,tests/trust_flow.rs, the inlinetestsblock inlib.rs, and the state-machine tests.Test plan
cargo fmt --all -- --checkcargo clippy -p willow-client --all-targets -- -D warningscargo test -p willow-client— 294 passed (was 287, +7 new)cargo check -p willow-client --target wasm32-unknown-unknownRefs #420
Generated by Claude Code