From 6b77382d8a5aeaaf5e8c36041a5da7eb6c8538bf Mon Sep 17 00:00:00 2001 From: ajianaz Date: Thu, 3 Sep 2026 13:49:06 +0700 Subject: [PATCH] refactor(web): consolidate ApiClient, clean stale config, expand tests - Migrate the four standalone alert-rule functions and fetchAttachments into ApiClient methods, removing the duplicated 401/boilerplate fetch code and the migrate TODO; call sites in rules and event detail pages updated to the shared client - Drop the stale tailwind.config.js reference from components.json (Tailwind v4 is CSS-config only) - Component tests for Pagination and EmptyState via @testing-library/svelte; vitest gains the svelte plugin + browser resolve condition; unit tests for rowKeyActivate and crashRateBarClass - New mobile e2e spec: drawer navigation and no-horizontal-overflow check at 390px --- web/build/index.html | 18 ++--- web/components.json | 1 - web/e2e/mobile.spec.ts | 34 +++++++++ web/src/lib/api.ts | 74 +++++++------------ web/src/lib/components/EmptyState.test.ts | 19 +++++ web/src/lib/components/Pagination.test.ts | 50 +++++++++++++ web/src/lib/utils.test.ts | 48 +++++++++++- .../[issueId]/events/[eventId]/+page.svelte | 5 +- web/src/routes/(dashboard)/rules/+page.svelte | 19 ++--- web/vitest.config.ts | 4 + 10 files changed, 195 insertions(+), 77 deletions(-) create mode 100644 web/e2e/mobile.spec.ts create mode 100644 web/src/lib/components/EmptyState.test.ts create mode 100644 web/src/lib/components/Pagination.test.ts diff --git a/web/build/index.html b/web/build/index.html index 4a7f927..bf8ccdf 100644 --- a/web/build/index.html +++ b/web/build/index.html @@ -4,18 +4,18 @@ - - + + - + - + - - + + @@ -24,15 +24,15 @@