fix: stabilize builds, tests, and lint across all stacks
Complete stabilization pass bringing all 3 stacks to green:
Frontend (apps/web/):
- Fix TypeScript nullability in useSeason.ts, useTimeOfDay.ts hooks
- Disable no-undef in ESLint config (TypeScript handles it; JSX misidentified)
- Rename 306 story imports from @storybook/react to @storybook/react-vite
- Fix conditional hook call in useMediaQuery.ts useIsTablet
- Move useQuery to top of LoginPage.tsx component
- Remove useless try/catch in GearFormModal.tsx
- Fix stale closure in ResetPasswordPage.tsx handleChange
- Make Storybook decorators (withRouter, withQueryClient, withToast, withAudio)
no-ops since global StorybookDecorator already provides these — prevents
nested Router / duplicate provider crashes in vitest-browser
- Fix nested MemoryRouter in 3 page stories (TrackDetail, PlaylistDetail, UserProfile)
- Update i18n initialization in test setup (await init before changeLanguage)
- Update ~30 test assertions from English to French to match i18n translations
- Update test assertions to match SUMI V3 design changes (shadow vs border)
- Fix remaining story type errors (PlayerError, PlaylistBatchActions,
TrackFilters, VirtualizedChatMessages)
Backend (veza-backend-api/):
- Fix response_test.go RespondWithAppError signature (2 args, not 3)
- Fix TestErrorContractAuthEndpoints expected error codes
(ErrCodeUnauthorized vs ErrCodeInvalidCredentials)
- Fix TestTrackHandler_GetTrackLikes_Success missing auth middleware setup
- Fix TestPlaybackAnalyticsService_GetTrackStats k-anonymity threshold
(needs 5 unique users, not 1)
- Replace NOW() PostgreSQL function with time.Now() parameter in marketplace
service for SQLite test compatibility
- Add missing AutoMigrate entries in marketplace_test.go
(ProductImage, ProductPreview, ProductLicense, ProductReview)
Results:
- Frontend TypeCheck: 617 errors -> 0 errors
- Frontend ESLint: 349 errors -> 0 errors
- Frontend Vitest: 196 failing tests -> 1 skipped (3396/3397 passing)
- Backend go vet: 1 error -> 0 errors
- Backend tests: 5 failing -> all 13 packages passing
- Rust: 150/150 tests passing (unchanged)
- Storybook audit: 0 errors across 1244 stories
Triage report: docs/TRIAGE_REPORT.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:48:07 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
2026-02-03 08:56:11 +00:00
|
|
|
import { AdminDashboardView } from './AdminDashboardView';
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
import { AdminDashboardSkeleton } from './admin-dashboard-view';
|
2026-02-03 23:44:40 +00:00
|
|
|
import { ToastProvider } from '../../components/feedback/ToastProvider';
|
2026-02-03 08:56:11 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* AdminDashboardView - Centre de commande admin
|
|
|
|
|
*
|
|
|
|
|
* Vue principale d'administration avec métriques en temps réel,
|
|
|
|
|
* visualisation du trafic, queue de modération et logs système.
|
|
|
|
|
*/
|
|
|
|
|
const meta: Meta<typeof AdminDashboardView> = {
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
title: 'Components/Features/Admin/AdminDashboardView',
|
|
|
|
|
component: AdminDashboardView,
|
|
|
|
|
parameters: {
|
|
|
|
|
layout: 'fullscreen',
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
component:
|
|
|
|
|
'Dashboard admin avec métriques, graphiques de trafic et contrôles système.',
|
|
|
|
|
},
|
2026-02-03 08:56:11 +00:00
|
|
|
},
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
},
|
|
|
|
|
tags: ['autodocs'],
|
|
|
|
|
decorators: [
|
|
|
|
|
(Story) => (
|
|
|
|
|
<ToastProvider>
|
2026-02-07 13:01:29 +00:00
|
|
|
<div className="bg-background min-h-layout-page p-4">
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
<Story />
|
|
|
|
|
</div>
|
|
|
|
|
</ToastProvider>
|
|
|
|
|
),
|
|
|
|
|
],
|
2026-02-03 08:56:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
|
|
|
|
|
|
export const Default: Story = {
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
name: 'Par défaut',
|
2026-02-03 08:56:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const Loading: Story = {
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
name: 'Chargement',
|
|
|
|
|
render: () => <AdminDashboardSkeleton />,
|
|
|
|
|
parameters: {
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
story: 'Skeleton pendant le chargement des données admin.',
|
|
|
|
|
},
|
2026-02-03 08:56:11 +00:00
|
|
|
},
|
refactor(web): split AdminDashboardView into admin-dashboard-view module
- types: DashboardStats, UploadItem, AuditLogItem, StatCardProps, Report
- useAdminDashboardView: fetchData, handleAction, triggerProtocol
- Header, StatCard, TrafficCard, ProtocolsCard, NodeHealthCard, Tabs
- AdminDashboardSkeleton for Loading state
- max-w-layout-content, text-xs, gap-0.5 (no arbitrary values)
- Stories: Default, Loading (Skeleton). Decorator min-h-layout-page
- Re-export from AdminDashboardView.tsx
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 16:54:02 +00:00
|
|
|
},
|
2026-02-03 08:56:11 +00:00
|
|
|
};
|