function cmd::list::_render_row() {
  local client_name="$1" ip="$2" type="$3"

  local pubkey="${p_pubkeys[$client_name]:-}"
  local handshake_ts="${wg_handshakes[$pubkey]:-0}"
  local is_blocked="${p_blocked[$client_name]:-false}"
  local is_restricted="${p_restricted[$client_name]:-false}"
  local last_ts="${p_last_ts[$client_name]:-}"

  # Apply status filters
  if $online_only;     then cmd::list::_is_connected "$handshake_ts" || return 0; fi
  if $offline_only;    then cmd::list::_is_connected "$handshake_ts" && return 0; fi
  if $restricted_only  && [[ "$is_restricted" != "true" ]]; then return 0; fi
  if $blocked_only     && [[ "$is_blocked"    != "true" ]]; then return 0; fi
  if $allowed_only && { [[ "$is_blocked" == "true" ]] || \
                        [[ "$is_restricted" == "true" ]]; }; then return 0; fi

  if [[ -n "$filter_rule" && "$rule" != "$filter_rule" ]]; then return 0; fi
  if [[ -n "$filter_group" ]]; then
    local peer_group="${peer_group_map[$client_name]:-}"
    [[ "$peer_group" != "$filter_group" ]] && return 0
  fi