Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(dashboard): surface list-fetch errors instead of a misleading empty state
rmyndharis8522118dcb51
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ffcb7a747..31aec5ea2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).+## [Unreleased]++### Fixed++- **Dashboard no longer shows a misleading "nothing here" empty state when a list fetch fails.** The+ Webhooks, API Keys, and Logs pages discarded the query error and rendered the empty state on failure;+ they now surface an accessible error banner (`role="alert"`) so the user knows the data failed to load.+## [0.2.8] - 2026-06-17The engine-pluggability release: the whatsapp-web.js delivery-ack, message-type, and JID specifics arediff --git a/dashboard/src/App.css b/dashboard/src/App.cssindex c7061958b..64e9a7744 100644--- a/dashboard/src/App.css+++ b/dashboard/src/App.css@@ -105,3 +105,23 @@ a {a:hover {text-decoration: underline;}++/* Error banner — shared across pages (moved out of Plugins.css so any page can use it). */+.error-banner {+ background: rgba(239, 68, 68, 0.1);+ border: 1px solid rgba(239, 68, 68, 0.3);+ border-radius: 8px;+ padding: 1rem;+ margin-bottom: 1.5rem;+ display: flex;+ align-items: center;+ gap: 0.75rem;+}++.error-banner svg {+ color: #ef4444;+}++.error-banner-text {+ color: #ef4444;+}diff --git a/dashboard/src/pages/ApiKeys.tsx b/dashboard/src/pages/ApiKeys.tsxindex 1009c0f06..f2b5f5a39 100644--- a/dashboard/src/pages/ApiKeys.tsx+++ b/dashboard/src/pages/ApiKeys.tsx@@ -7,7 +7,20 @@ import {createColumnHelper,type VisibilityState,} from '@tanstack/react-table';-import { Plus, Copy, RefreshCw, Trash2, Eye, EyeOff, Loader2, X, Check, KeyRound, AlertTriangle } from 'lucide-react';+import {+ Plus,+ Copy,+ RefreshCw,+ Trash2,+ Eye,+ EyeOff,+ Loader2,+ X,+ Check,+ KeyRound,+ AlertTriangle,+ AlertCircle,+} from 'lucide-react';import type { ApiKey } from '../services/api';import { useDocumentTitle } from '../hooks/useDocumentTitle';import { useApiKeysQuery, useCreateApiKeyMutation, useDeleteApiKeyMutation, useRevokeApiKeyMutation } from '../hooks/queries';@@ -32,7 +45,7 @@ const columnHelper = createColumnHelper<ApiKey>();export function ApiKeys() {const { t } = useTranslation();useDocumentTitle(t('apiKeys.title'));- const { data: apiKeys = [], isLoading: loading } = useApiKeysQuery();+ const { data: apiKeys = [], isLoading: loading, isError: apiKeysError } = useApiKeysQuery();const createMutation = useCreateApiKeyMutation();const deleteMutation = useDeleteApiKeyMutation();const revokeMutation = useRevokeApiKeyMutation();@@ -211,6 +224,13 @@ export function ApiKeys() {}/>+ {apiKeysError && (+ <div className="error-banner" role="alert">+ <AlertCircle size={20} />+ <span className="error-banner-text">{t('common.loadError')}</span>+ </div>+ )}+{showModal && (<divclassName="modal-overlay"diff --git a/dashboard/src/pages/Logs.tsx b/dashboard/src/pages/Logs.tsxindex 722b30266..fff06fe6c 100644--- a/dashboard/src/pages/Logs.tsx+++ b/dashboard/src/pages/Logs.tsx@@ -1,6 +1,6 @@import { useState } from 'react';import { useTranslation } from 'react-i18next';-import { Download, Search, Filter, Loader2, FileText } from 'lucide-react';+import { Download, Search, Filter, Loader2, FileText, AlertCircle } from 'lucide-react';import type { AuditLog } from '../services/api';import { useDocumentTitle } from '../hooks/useDocumentTitle';import { useLogsQuery } from '../hooks/queries';@@ -16,7 +16,7 @@ export function Logs() {const limit = 20;const severityParam = severityFilter !== 'all' ? severityFilter : undefined;- const { data, isLoading: loading } = useLogsQuery({ severity: severityParam, page, limit });+ const { data, isLoading: loading, isError: logsError } = useLogsQuery({ severity: severityParam, page, limit });const logs: AuditLog[] = data?.data ?? [];const total: number = data?.total ?? 0;@@ -101,6 +101,13 @@ export function Logs() {}/>+ {logsError && (+ <div className="error-banner" role="alert">+ <AlertCircle size={20} />+ <span className="error-banner-text">{t('common.loadError')}</span>+ </div>+ )}+<div className="filters-bar"><div className="search-input"><Search size={18} />diff --git a/dashboard/src/pages/Plugins.css b/dashboard/src/pages/Plugins.cssindex 9eccc7bb4..5a791a948 100644--- a/dashboard/src/pages/Plugins.css+++ b/dashboard/src/pages/Plugins.css@@ -364,26 +364,6 @@color: var(--text-secondary);}-/* Error Banner */-.error-banner {- background: rgba(239, 68, 68, 0.1);- border: 1px solid rgba(239, 68, 68, 0.3);- border-radius: 8px;- padding: 1rem;- margin-bottom: 1.5rem;- display: flex;- align-items: center;- gap: 0.75rem;-}--.error-banner svg {- color: #ef4444;-}--.error-banner-text {- color: #ef4444;-}-/* Empty State */.empty-state {text-align: center;diff --git a/dashboard/src/pages/Webhooks.tsx b/dashboard/src/pages/Webhooks.tsxindex d49e28bd1..66656e4fb 100644--- a/dashboard/src/pages/Webhooks.tsx+++ b/dashboard/src/pages/Webhooks.tsx@@ -11,6 +11,7 @@ import {Webhook as WebhookIcon,Check,AlertTriangle,+ AlertCircle,} from 'lucide-react';import { webhookApi, type Webhook } from '../services/api';import { useDocumentTitle } from '../hooks/useDocumentTitle';@@ -47,7 +48,7 @@ export function Webhooks() {const { t } = useTranslation();useDocumentTitle(t('webhooks.title'));const { canWrite } = useRole();- const { data: webhooks = [], isLoading: loadingWebhooks } = useWebhooksQuery();+ const { data: webhooks = [], isLoading: loadingWebhooks, isError: webhooksError } = useWebhooksQuery();const { data: sessions = [] } = useSessionsQuery();const loading = loadingWebhooks;const createMutation = useCreateWebhookMutation();@@ -220,6 +221,13 @@ export function Webhooks() {}/>+ {webhooksError && (+ <div className="error-banner" role="alert">+ <AlertCircle size={20} />+ <span className="error-banner-text">{t('common.loadError')}</span>+ </div>+ )}+{showCreateModal && (<div className="modal-overlay" onClick={() => setShowCreateModal(false)}><div className="modal" onClick={e => e.stopPropagation()}>