Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs: correct the dashboard component inventory
Yudhi Armyndharis2545492e72dc
diff --git a/docs/17-dashboard-design.md b/docs/17-dashboard-design.mdindex 9500d3a05..6aa92d75f 100644--- a/docs/17-dashboard-design.md+++ b/docs/17-dashboard-design.md@@ -379,32 +379,40 @@ a non-admin hitting the path falls through to the `*` redirect.### Bespoke componentsThe UI is built from a small set of project-specific components under `dashboard/src/components/`,-most with a colocated CSS file. Five ship none: `ErrorBoundary` styles inline via `style={{...}}`,-`GithubIcon` carries no styling beyond `fill="currentColor"`, `Modal` reuses the global `.modal-*`-rules from `index.css`, and the `chats/` pair take their classes from the page stylesheet-(`pages/Chats.css`) plus the `yet-another-react-lightbox` vendor CSS. There is no design-system-package to pull from.--| Component | File | Responsibility |-| ---------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------- |-| `Layout` | `components/Layout.tsx` | App shell: collapsible sidebar nav, mobile drawer, language menu, light/dark theme toggle, logout, live version badge |-| `ToastProvider` / `useToast` | `components/Toast.tsx` | Context-based toast notifications (success/error/warning/info) with de-dup keys |-| `PageHeader` | `components/PageHeader.tsx` | Shared page title / subtitle / badge / actions header |-| `Modal` | `components/Modal.tsx` | Accessible dialog (`role="dialog"`, Escape/overlay close, focus trap + restore); uses the global `.modal-*` styles |-| `CustomSelect` | `components/CustomSelect.tsx` | Keyboard-navigable select replacement (type-ahead, arrow keys) used by Sessions / Logs / Login |-| `DashboardCharts` | `components/DashboardCharts.tsx` | `recharts`-based message-volume / activity charts on the Dashboard |-| `FilterBuilder` | `components/FilterBuilder.tsx` | Visual condition builder for webhook event filters |-| `GlobalSearch` | `components/GlobalSearch.tsx` | Debounced message-search box in the Chats header, with all-sessions / current-session scope |-| `PluginInstances` | `components/PluginInstances.tsx` | Per-plugin instance list: create / edit / delete and secret regeneration |-| `ErrorBoundary` | `components/ErrorBoundary.tsx` | Top-level React error boundary wrapping the whole app |-| `GithubIcon` | `components/GithubIcon.tsx` | Inline brand SVG |+most with a colocated CSS file. Six top-level components ship none: `ErrorBoundary` styles inline+via `style={{...}}`, `GithubIcon` carries no styling beyond `fill="currentColor"`, `Modal` reuses the+global `.modal-*` rules from `index.css`, `GroupPicker` and `SessionScopePicker` are styled by the+one page that uses each (`pages/MessageTester.css`, `pages/ApiKeys.css`), and `RoleProvider` renders+no DOM. Nothing under `chats/` ships its own stylesheet either: those components take their classes+from `pages/Chats.css`, and `MediaLightbox` adds the `yet-another-react-lightbox` vendor CSS. There+is no design-system package to pull from.++| Component | File | Responsibility |+| ---------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------- |+| `Layout` | `components/Layout.tsx` | App shell: collapsible sidebar nav, mobile drawer, language menu, light/dark theme toggle, logout, live version badge |+| `ToastProvider` / `useToast` | `components/Toast.tsx` | Context-based toast notifications (success/error/warning/info) with de-dup keys |+| `PageHeader` | `components/PageHeader.tsx` | Shared page title / subtitle / badge / actions header |+| `Modal` | `components/Modal.tsx` | Accessible dialog (`role="dialog"`, Escape/overlay close, focus trap + restore); uses the global `.modal-*` styles |+| `CustomSelect` | `components/CustomSelect.tsx` | Keyboard-navigable select replacement (type-ahead, arrow keys) used by Sessions / Logs / Login |+| `DashboardCharts` | `components/DashboardCharts.tsx` | `recharts`-based message-volume / activity charts on the Dashboard |+| `FilterBuilder` | `components/FilterBuilder.tsx` | Visual condition builder for webhook event filters |+| `GlobalSearch` | `components/GlobalSearch.tsx` | Debounced message-search box in the Chats header, with all-sessions / current-session scope |+| `PluginInstances` | `components/PluginInstances.tsx` | Per-plugin instance list: create / edit / delete and secret regeneration |+| `ErrorBoundary` | `components/ErrorBoundary.tsx` | Top-level React error boundary wrapping the whole app |+| `GithubIcon` | `components/GithubIcon.tsx` | Inline brand SVG |+| `GroupPicker` | `components/GroupPicker.tsx` | Searchable multi-select of a session's groups, used by the Message Tester's multi-group send |+| `SessionScopePicker` | `components/SessionScopePicker.tsx` | Per-key session scope checklist on the API Keys page |+| `RoleProvider` | `components/RoleProvider.tsx` | Context holding the logged-in key's role, read with `useRole` (`canWrite` gates write actions) |Chat-specific pieces live one level down in `components/chats/`: `MessageBody` (WhatsApp textformatting + link detection), `ChatThread` (bubble list, including inbound Baileys prompt buttonsthat call `POST /sessions/:id/messages/click-button`), and `MediaLightbox` (the media viewer, built-on `yet-another-react-lightbox`). Prompt choices arrive on live `message.received` as top-level-`buttons` and are also stored in message `metadata.buttons` so a reload can re-render them.-Clicking still requires the prompt to be in the engine store; an evicted prompt 404s.+on `yet-another-react-lightbox`). The rest of the room is split the same way: `ChatSidebar`,+`ChatComposer`, `ChatAvatar`, `KindIcon`, `StatusComposeModal` and `StatusMedia`. Prompt choices+arrive on live `message.received` as top-level `buttons` and are also stored in message+`metadata.buttons` so a reload can re-render them. Clicking still requires the prompt to be in the+engine store; an evicted prompt 404s. A read-only key sees the choices disabled and gets no reply,+react or delete actions, the same as the disabled composer.The message thread is paged. `useChatMessages` is a `useInfiniteQuery` whose cursor is the numberof DB rows fetched so far, not the length of the rendered list — the thread also carries engine