Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(dashboard): make the Logs search scope honest

Yudhi Armyndharise59c62267cf5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e438a1800..032dc6b15 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- The Logs page resets to page 1 on a new search and its empty state distinguishes "no matches on this page" (search filters the fetched page only) from "no logs yet".
- docs/06 documents every route-specific status code the contract declares (409/413/415/422/429/501/502/503; 153 missing code mentions across ~90 sections), corrects the catalog routes to Baileys-implements, the profile refusals to 403, scope violations to 401, and the phantom channel 422; a spec now derives the required codes from openapi.json.
- docs/06 scopes the audit log honestly: message/webhook actions are never emitted (their tables own that data), the request-actor columns are documented as null, and the OpenAPI example uses a real snake_case action.
- docs/30 states the plugin sandbox's memory-kind boundary: the worker heap cap does not cover Buffer/native allocations, which grow host RSS up to the container limit.
diff --git a/dashboard/src/i18n/locales/ar.json b/dashboard/src/i18n/locales/ar.json
index 1d7e064df..9d8ea3184 100644
--- a/dashboard/src/i18n/locales/ar.json
+++ b/dashboard/src/i18n/locales/ar.json
@@ -581,7 +581,9 @@
},
"empty": {
"title": "لا توجد سجلات",
- "description": "ستظهر سجلات التدقيق هنا عند تنفيذ الإجراءات"
+ "description": "ستظهر سجلات التدقيق هنا عند تنفيذ الإجراءات",
+ "filteredTitle": "لا نتائج مطابقة في هذه الصفحة",
+ "filteredDescription": "يبحث حقل البحث في الصفحة الحالية فقط. امسحه أو تنقّل بين الصفحات أو استخدم مرشح الخطورة للتصفية من الخادم."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/de.json b/dashboard/src/i18n/locales/de.json
index 00084be66..f10d3bfbf 100644
--- a/dashboard/src/i18n/locales/de.json
+++ b/dashboard/src/i18n/locales/de.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "Keine Protokolle gefunden",
- "description": "Audit-Protokolle werden hier angezeigt, sobald Aktionen ausgeführt werden"
+ "description": "Audit-Protokolle werden hier angezeigt, sobald Aktionen ausgeführt werden",
+ "filteredTitle": "Keine Treffer auf dieser Seite",
+ "filteredDescription": "Die Suche filtert nur die aktuelle Seite. Leere sie, blättere weiter oder grenze serverseitig über den Severity-Filter ein."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/en.json b/dashboard/src/i18n/locales/en.json
index 9e9d61419..35e19b4f7 100644
--- a/dashboard/src/i18n/locales/en.json
+++ b/dashboard/src/i18n/locales/en.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "No logs found",
- "description": "Audit logs will appear here as actions are performed"
+ "description": "Audit logs will appear here as actions are performed",
+ "filteredTitle": "No matches on this page",
+ "filteredDescription": "The search filters the current page only. Clear it, page through, or use the severity filter to narrow server-side."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/es.json b/dashboard/src/i18n/locales/es.json
index a5fa235e0..dc84a909c 100644
--- a/dashboard/src/i18n/locales/es.json
+++ b/dashboard/src/i18n/locales/es.json
@@ -521,7 +521,9 @@
},
"empty": {
"title": "No se encontraron registros",
- "description": "Los registros de auditoría aparecerán aquí cuando se realicen acciones"
+ "description": "Los registros de auditoría aparecerán aquí cuando se realicen acciones",
+ "filteredTitle": "Sin coincidencias en esta página",
+ "filteredDescription": "La búsqueda filtra solo la página actual. Bórrala, navega entre páginas o usa el filtro de severidad para acotar en el servidor."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/fr.json b/dashboard/src/i18n/locales/fr.json
index ff63594e2..cc69efc4b 100644
--- a/dashboard/src/i18n/locales/fr.json
+++ b/dashboard/src/i18n/locales/fr.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "Aucun journal trouvé",
- "description": "Les journaux d'audit apparaîtront ici au fur et à mesure des actions"
+ "description": "Les journaux d'audit apparaîtront ici au fur et à mesure des actions",
+ "filteredTitle": "Aucune correspondance sur cette page",
+ "filteredDescription": "La recherche ne filtre que la page actuelle. Effacez-la, naviguez entre les pages ou utilisez le filtre de sévérité côté serveur."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/he.json b/dashboard/src/i18n/locales/he.json
index 57a7e531e..6999ecb7e 100644
--- a/dashboard/src/i18n/locales/he.json
+++ b/dashboard/src/i18n/locales/he.json
@@ -575,7 +575,9 @@
},
"empty": {
"title": "לא נמצאו לוגים",
- "description": "הלוגים יופיעו כאן ככל שיבוצעו פעולות"
+ "description": "הלוגים יופיעו כאן ככל שיבוצעו פעולות",
+ "filteredTitle": "אין התאמות בעמוד זה",
+ "filteredDescription": "החיפוש מסנן את העמוד הנוכחי בלבד. נקו אותו, דפדפו בין העמודים או השתמשו במסנן החומרה בצד השרת."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/it.json b/dashboard/src/i18n/locales/it.json
index 8b97d54bc..a20f965a9 100644
--- a/dashboard/src/i18n/locales/it.json
+++ b/dashboard/src/i18n/locales/it.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "Nessun log trovato",
- "description": "I log di audit appariranno qui man mano che verranno eseguite le azioni"
+ "description": "I log di audit appariranno qui man mano che verranno eseguite le azioni",
+ "filteredTitle": "Nessuna corrispondenza in questa pagina",
+ "filteredDescription": "La ricerca filtra solo la pagina corrente. Cancellala, sfoglia le pagine o usa il filtro severità lato server."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/ko.json b/dashboard/src/i18n/locales/ko.json
index a9a382def..3b347d29c 100644
--- a/dashboard/src/i18n/locales/ko.json
+++ b/dashboard/src/i18n/locales/ko.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "로그가 없습니다",
- "description": "작업이 수행되면 감사 로그가 여기에 표시됩니다"
+ "description": "작업이 수행되면 감사 로그가 여기에 표시됩니다",
+ "filteredTitle": "이 페이지에 일치하는 항목이 없습니다",
+ "filteredDescription": "검색은 현재 페이지만 필터링합니다. 지우거나 페이지를 이동하거나 서버 측 심각도 필터를 사용하세요."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/pt-BR.json b/dashboard/src/i18n/locales/pt-BR.json
index cb05f62d2..baff7e419 100644
--- a/dashboard/src/i18n/locales/pt-BR.json
+++ b/dashboard/src/i18n/locales/pt-BR.json
@@ -521,7 +521,9 @@
},
"empty": {
"title": "Nenhum registro encontrado",
- "description": "Os registros de auditoria aparecerão aqui quando ações forem realizadas"
+ "description": "Os registros de auditoria aparecerão aqui quando ações forem realizadas",
+ "filteredTitle": "Nenhuma correspondência nesta página",
+ "filteredDescription": "A busca filtra apenas a página atual. Limpe-a, navegue pelas páginas ou use o filtro de severidade no servidor."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/te.json b/dashboard/src/i18n/locales/te.json
index c2cbe0878..173a2e968 100644
--- a/dashboard/src/i18n/locales/te.json
+++ b/dashboard/src/i18n/locales/te.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "ఎలాంటి లాగ్‌లు కనుగొనబడలేదు",
- "description": "చర్యలు జరిగినప్పుడు ఆడిట్ లాగ్‌లు ఇక్కడ కనిపిస్తాయి"
+ "description": "చర్యలు జరిగినప్పుడు ఆడిట్ లాగ్‌లు ఇక్కడ కనిపిస్తాయి",
+ "filteredTitle": "ఈ పేజీలో సరిపోలినవి లేవు",
+ "filteredDescription": "శోధన ప్రస్తుత పేజీని మాత్రమే ఫిల్టర్ చేస్తుంది. దాన్ని క్లియర్ చేయండి, పేజీలను బ్రౌజ్ చేయండి లేదా సర్వర్ వైపు తీవ్రత ఫిల్టర్‌ను ఉపయోగించండి."
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/tr.json b/dashboard/src/i18n/locales/tr.json
index 947f153d5..12ad900db 100644
--- a/dashboard/src/i18n/locales/tr.json
+++ b/dashboard/src/i18n/locales/tr.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "Kayıt bulunamadı",
- "description": "İşlemler gerçekleştirildikçe denetim kayıtları burada görünecektir"
+ "description": "İşlemler gerçekleştirildikçe denetim kayıtları burada görünecektir",
+ "filteredTitle": "Bu sayfada eşleşme yok",
+ "filteredDescription": "Arama yalnızca geçerli sayfayı filtreler. Temizleyin, sayfalar arasında gezinin veya sunucu tarafında önem filtresini kullanın."
}
},
"messageTester": {
@@ -956,4 +958,4 @@
},
"loading": "Aranıyor…"
}
-}
\ No newline at end of file
+}
diff --git a/dashboard/src/i18n/locales/zh-CN.json b/dashboard/src/i18n/locales/zh-CN.json
index b801f4b1f..081b74f93 100644
--- a/dashboard/src/i18n/locales/zh-CN.json
+++ b/dashboard/src/i18n/locales/zh-CN.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "未找到日志",
- "description": "执行操作后,审计日志将显示在这里"
+ "description": "执行操作后,审计日志将显示在这里",
+ "filteredTitle": "本页无匹配项",
+ "filteredDescription": "搜索仅过滤当前页。请清除搜索、翻页,或使用严重级别筛选在服务端收窄。"
}
},
"messageTester": {
diff --git a/dashboard/src/i18n/locales/zh-HK.json b/dashboard/src/i18n/locales/zh-HK.json
index 4fbbe07c0..3a71f1c0d 100644
--- a/dashboard/src/i18n/locales/zh-HK.json
+++ b/dashboard/src/i18n/locales/zh-HK.json
@@ -566,7 +566,9 @@
},
"empty": {
"title": "找不到記錄",
- "description": "執行操作後,審計記錄會顯示在這裡"
+ "description": "執行操作後,審計記錄會顯示在這裡",
+ "filteredTitle": "本頁無符合項目",
+ "filteredDescription": "搜尋只會過濾目前頁面。請清除搜尋、翻頁,或使用嚴重程度篩選在伺服器端收窄。"
}
},
"messageTester": {
diff --git a/dashboard/src/pages/Logs.tsx b/dashboard/src/pages/Logs.tsx
index f7a0b4869..8f019837c 100644
--- a/dashboard/src/pages/Logs.tsx
+++ b/dashboard/src/pages/Logs.tsx
@@ -34,6 +34,10 @@ export function Logs() {
});
const totalPages = Math.ceil(total / limit);
+ // Distinguish "filters matched nothing on this page" from "there are no logs at all": the search
+ // box only filters the fetched page (the API has no text search), so a non-match here must not
+ // read as "no such event exists" while more pages may hold it.
+ const hasActiveFilter = searchQuery.trim() !== '' || severityFilter !== 'all';
const formatTimestamp = (date: string) => new Date(date).toLocaleString();
@@ -139,7 +143,11 @@ export function Logs() {
type="text"
placeholder={t('logs.searchPlaceholder')}
value={searchQuery}
- onChange={e => setSearchQuery(e.target.value)}
+ onChange={e => {
+ setSearchQuery(e.target.value);
+ // A new query invalidates the current page position, like the severity filter below.
+ setPage(1);
+ }}
/>
</div>
@@ -174,8 +182,17 @@ export function Logs() {
{filteredLogs.length === 0 ? (
<div className="empty-table-state">
<FileText size={48} strokeWidth={1} />
- <h3>{t('logs.empty.title')}</h3>
- <p>{t('logs.empty.description')}</p>
+ {hasActiveFilter ? (
+ <>
+ <h3>{t('logs.empty.filteredTitle')}</h3>
+ <p>{t('logs.empty.filteredDescription')}</p>
+ </>
+ ) : (
+ <>
+ <h3>{t('logs.empty.title')}</h3>
+ <p>{t('logs.empty.description')}</p>
+ </>
+ )}
</div>
) : (
filteredLogs.map(log => (