Skip to content

chore: remove some unused structs and cleanup todos - #270

Merged
jlucaso1 merged 1 commit into
mainfrom
chore-cleanup
Feb 6, 2026
Merged

chore: remove some unused structs and cleanup todos#270
jlucaso1 merged 1 commit into
mainfrom
chore-cleanup

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Feb 6, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • Removed Features

    • Removed newsletter module and related event types
    • Removed deprecated network transport and processing result APIs
  • Updates

    • Privacy settings endpoint now returns structured response data instead of void
  • Refactor

    • Simplified public API surface and internal type exports
    • Improved node parsing with stricter error handling

@coderabbitai

coderabbitai Bot commented Feb 6, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR removes deprecated public APIs, eliminates unused event types, and updates a privacy settings endpoint to return response data. Changes include removing process-result stubs, lenient parsing helpers, type aliases, and event-related exports while refining the public API surface across the crate and wacore.

Changes

Cohort / File(s) Summary
Privacy Settings API Update
src/client.rs, src/lib.rs
Updated fetch_privacy_settings to return PrivacySettingsResponse instead of unit type; added re-export of privacy_settings module alias.
Handler & LID-PN Updates
src/handlers/unimplemented.rs, src/client/lid_pn.rs
Removed public for_chatstate() constructor; updated comment in resolve_lid_mappings documenting organic mapping learning.
Type Alias Removals
src/lid_pn_cache.rs, src/session.rs
Removed public type aliases SharedLidPnCache and SharedSessionManager with their Arc imports.
Core Trait & Struct Removals
wacore/src/runtime.rs, wacore/src/client.rs
Removed public NetworkTransport trait, ProcessResult struct with constructors, and methods process_incoming_data / prepare_outgoing_message.
Protocol Node Helpers Cleanup
wacore/src/iq/node.rs
Removed four public lenient/optional parsing functions; retained strict collect_children for strict error propagation.
Event Types & Module Removals
wacore/src/types/events.rs, wacore/src/types/mod.rs
Removed 11 public event structs (KeepAliveTimeout, NewsletterJoin, StarUpdate, PrivacySettingsUpdate, etc.) and newsletter module export.
Misc Updates
wacore/libsignal/src/protocol/storage/traits.rs, wacore/src/lib.rs, wacore/src/proto_helpers.rs
Removed TODO comments; modified is_locked to derive from self.locked using unwrap_or(false).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 Deprecated paths fade away,
Old events see their final day,
APIs cleaned with thoughtful care,
Privacy returns—no empty air!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main intent of the pull request: removing unused structs and cleaning up TODO comments across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown

🐰 Bencher Report

Branchchore-cleanup
Testbedubuntu-latest

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
binary_benchmark::unpack_group::bench_unpack_compressedInstructions
instructions x 1e3
📈 plot
🚷 threshold
🚨 alert (🔔)
555.72 x 1e3
(+8.04%)Baseline: 514.35 x 1e3
540.07 x 1e3
(102.90%)

Click to view all benchmark results
BenchmarkInstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
binary_benchmark::attr_parser_group::bench_attr_parser attr_lookup:setup_attr_marshaled()📈 view plot
🚷 view threshold
7,011.00
(-3.28%)Baseline: 7,248.85
7,611.29
(92.11%)
binary_benchmark::child_iteration_group::bench_get_children_by_tag📈 view plot
🚷 view threshold
848,370.00
(-0.33%)Baseline: 851,216.40
893,777.22
(94.92%)
binary_benchmark::jid_optimization_group::bench_jid_to_owned_access jid_access:setup_jid_heavy_marshaled()📈 view plot
🚷 view threshold
24,760.00
(-0.48%)Baseline: 24,878.25
26,122.16
(94.79%)
binary_benchmark::marshal_group::bench_marshal_allocating📈 view plot
🚷 view threshold
127,234.00
(-7.05%)Baseline: 136,877.30
143,721.17
(88.53%)
binary_benchmark::marshal_group::bench_marshal_long_string📈 view plot
🚷 view threshold
19,576.00
(+0.14%)Baseline: 19,547.82
20,525.21
(95.38%)
binary_benchmark::marshal_group::bench_marshal_reusing_buffer📈 view plot
🚷 view threshold
127,334.00
(-7.04%)Baseline: 136,977.87
143,826.77
(88.53%)
binary_benchmark::roundtrip_group::bench_roundtrip large:setup_large_marshaled()📈 view plot
🚷 view threshold
106,440.00
(+0.14%)Baseline: 106,295.36
111,610.13
(95.37%)
binary_benchmark::roundtrip_group::bench_roundtrip small:setup_small_marshaled()📈 view plot
🚷 view threshold
8,495.00
(+0.08%)Baseline: 8,488.06
8,912.46
(95.32%)
binary_benchmark::unmarshal_group::bench_unmarshal large:setup_large_marshaled()📈 view plot
🚷 view threshold
49,137.00
(-0.62%)Baseline: 49,441.84
51,913.93
(94.65%)
binary_benchmark::unmarshal_group::bench_unmarshal small:setup_small_marshaled()📈 view plot
🚷 view threshold
3,017.00
(-3.98%)Baseline: 3,142.10
3,299.21
(91.45%)
binary_benchmark::unpack_group::bench_unpack_compressed📈 view plot
🚷 view threshold
🚨 view alert (🔔)
555,716.00
(+8.04%)Baseline: 514,351.92
540,069.51
(102.90%)

binary_benchmark::unpack_group::bench_unpack_uncompressed📈 view plot
🚷 view threshold
771.00
(-0.93%)Baseline: 778.27
817.18
(94.35%)
libsignal_benchmark::conversation_group::bench_full_dm_conversation full:setup_conversation_data()📈 view plot
🚷 view threshold
27,870,821.00
(+0.38%)Baseline: 27,764,932.75
29,153,179.38
(95.60%)
libsignal_benchmark::dm_group::bench_dm_decrypt_first_message decrypt_prekey:setup_dm_with_first_message()📈 view plot
🚷 view threshold
5,540,334.00
(-0.47%)Baseline: 5,566,639.00
5,844,970.95
(94.79%)
libsignal_benchmark::dm_group::bench_dm_encrypt_first_message first_msg:setup_dm_session()📈 view plot
🚷 view threshold
178,106.00
(+0.09%)Baseline: 177,952.93
186,850.57
(95.32%)
libsignal_benchmark::dm_group::bench_dm_encrypt_subsequent_message subsequent:setup_established_dm_session()📈 view plot
🚷 view threshold
178,917.00
(+0.09%)Baseline: 178,764.84
187,703.08
(95.32%)
libsignal_benchmark::dm_group::bench_dm_session_establishment setup:setup_dm_users()📈 view plot
🚷 view threshold
17,157,117.00
(-0.75%)Baseline: 17,287,483.07
18,151,857.23
(94.52%)
libsignal_benchmark::group_messaging_group::bench_group_create_distribution_message create:setup_group_sender()📈 view plot
🚷 view threshold
295,894.00
(+0.03%)Baseline: 295,793.49
310,583.17
(95.27%)
libsignal_benchmark::group_messaging_group::bench_group_decrypt_message decrypt:setup_group_with_encrypted_message()📈 view plot
🚷 view threshold
12,661,955.00
(+0.55%)Baseline: 12,592,810.85
13,222,451.40
(95.76%)
libsignal_benchmark::group_messaging_group::bench_group_encrypt_message encrypt:setup_group_with_distribution()📈 view plot
🚷 view threshold
715,619.00
(-0.04%)Baseline: 715,895.11
751,689.86
(95.20%)
libsignal_benchmark::session_optimization_group::bench_decrypt_with_previous_session previous_session:setup_with_archived_sessions()📈 view plot
🚷 view threshold
41,833.00
(+0.13%)Baseline: 41,779.69
43,868.68
(95.36%)
libsignal_benchmark::session_optimization_group::bench_message_key_eviction eviction:setup_message_key_eviction()📈 view plot
🚷 view threshold
15,561,842.00
(+0.00%)Baseline: 15,561,252.37
16,339,314.99
(95.24%)
libsignal_benchmark::session_optimization_group::bench_out_of_order_decryption out_of_order:setup_out_of_order_messages()📈 view plot
🚷 view threshold
5,504,889.00
(-0.41%)Baseline: 5,527,552.97
5,803,930.62
(94.85%)
libsignal_benchmark::session_optimization_group::bench_promote_matching_session promote:setup_promote_matching_session()📈 view plot
🚷 view threshold
956,786.00
(-0.81%)Baseline: 964,558.14
1,012,786.05
(94.47%)
libsignal_benchmark::signature_group::bench_key_generation keygen📈 view plot
🚷 view threshold
2,822,769.00
(-0.02%)Baseline: 2,823,267.76
2,964,431.14
(95.22%)
libsignal_benchmark::signature_group::bench_signature_creation sign:setup_keypair_with_message()📈 view plot
🚷 view threshold
3,444,364.00
(-3.88%)Baseline: 3,583,509.95
3,762,685.44
(91.54%)
libsignal_benchmark::signature_group::bench_signature_verification verify:setup_keypair_with_message()📈 view plot
🚷 view threshold
122,762,095.00
(-2.06%)Baseline: 125,339,391.43
131,606,361.00
(93.28%)
reporting_token_benchmark::content_extraction_group::bench_content_extraction extended:setup_extended_message()📈 view plot
🚷 view threshold
11,669.00
(-1.12%)Baseline: 11,800.78
12,390.82
(94.17%)
reporting_token_benchmark::content_extraction_group::bench_content_extraction simple:setup_simple_message()📈 view plot
🚷 view threshold
3,774.00
(-1.40%)Baseline: 3,827.67
4,019.06
(93.90%)
reporting_token_benchmark::full_generation_group::bench_full_token_generation extended:setup_full_gen_extended()📈 view plot
🚷 view threshold
87,781.00
(-0.24%)Baseline: 87,994.83
92,394.57
(95.01%)
reporting_token_benchmark::full_generation_group::bench_full_token_generation simple:setup_full_gen_simple()📈 view plot
🚷 view threshold
79,909.00
(-0.17%)Baseline: 80,044.72
84,046.96
(95.08%)
reporting_token_benchmark::key_derivation_group::bench_key_derivation📈 view plot
🚷 view threshold
51,010.00
(-0.05%)Baseline: 51,032.97
53,584.61
(95.20%)
reporting_token_benchmark::message_encoding_group::bench_message_encoding extended:setup_extended_message()📈 view plot
🚷 view threshold
5,753.00
(+0.35%)Baseline: 5,733.21
6,019.87
(95.57%)
reporting_token_benchmark::message_encoding_group::bench_message_encoding simple:setup_simple_message()📈 view plot
🚷 view threshold
2,109.00
(-0.32%)Baseline: 2,115.83
2,221.62
(94.93%)
reporting_token_benchmark::token_calculation_group::bench_token_calculation📈 view plot
🚷 view threshold
21,920.00
(+0.04%)Baseline: 21,910.80
23,006.34
(95.28%)
🐰 View full continuous benchmarking report in Bencher

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.

1 participant