From 509b8a6e0116ac063af857acc8a02c1215ff8d00 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 3 Jun 2026 14:46:06 +0530 Subject: [PATCH] fix: update stale mock data in component stories These stories were written against older component APIs and broke under the new harness: - copilot: nest message content/reasoning and use message_type; pass the required conversationInboxType - ArticlesPage: pass the required categories, allowedLocales, portalName and meta props - CategoryPage: use the real category shape (name/icon/slug/meta) so cards render titles instead of "undefined undefined" - PortalSettings: provide a portals array matching the seeded route so the settings forms render --- .../Pages/ArticlePage/ArticlesPage.story.vue | 27 ++- .../CategoryPage/CategoriesPage.story.vue | 206 +++--------------- .../PortalSettings.story.vue | 18 +- .../components-next/copilot/Copilot.story.vue | 50 +++-- .../copilot/CopilotThinkingGroup.story.vue | 18 +- 5 files changed, 114 insertions(+), 205 deletions(-) diff --git a/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticlePage/ArticlesPage.story.vue b/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticlePage/ArticlesPage.story.vue index 58c7acee9..4641be2c0 100644 --- a/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticlePage/ArticlesPage.story.vue +++ b/app/javascript/dashboard/components-next/HelpCenter/Pages/ArticlePage/ArticlesPage.story.vue @@ -59,13 +59,38 @@ const articles = [ views: 400, }, ]; + +const categories = [ + { id: 1, name: 'Getting started', icon: '🚀' }, + { id: 2, name: 'Marketing', icon: '⚡️' }, + { id: 3, name: 'Development', icon: '🛠️' }, +]; + +const allowedLocales = [{ code: 'en', name: 'English' }]; + +const portalName = 'Chatwoot Help Center'; + +const meta = { + currentPage: 1, + allArticlesCount: articles.length, + articlesCount: articles.length, + mineArticlesCount: 2, + draftArticlesCount: 1, + archivedArticlesCount: 2, +};