- accounts.ex: replace validate_user_password (if-based) with with-chain;
drop unnecessary try/rescue around Repo.get_by. Extract transaction_unwrap
helper to eliminate 3 copies of the Multi result-unwrap case block.
- packets.ex: deduplicate store_bad_packet by extracting raw_packet_string,
extract_error_type, and extract_error_message into composable helpers.
Normalize find_coordinate_value — collapse 12 clauses into a generic
deep_get/direct_get that handles atom/string keys and nested maps uniformly.
- data_builder.ex: split build_simple_popup into separate data-construction
(build_simple_popup_data) and rendering (render_popup) phases, eliminating
duplicated PopupComponent/Safe/IO pipelines.
- param_utils.ex: unify parse_float_in_range and parse_int_in_range via a
shared parse_in_range that accepts Float.parse/Integer.parse as a function
parameter — functions-as-values pattern.