veza/apps/web/src/hooks
senke 8e9ee2f3a5 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 16:48:07 +02:00
..
index.ts feat(theme): extend ThemeProvider with contrast, density, accent, fontSize 2026-02-25 09:52:32 +01:00
types.ts feat(v0.12.7): internationalisation i18n — FR/EN/ES avec formatage locale 2026-03-12 14:29:22 +01:00
useAbortSignal.ts feat(web): propagate AbortSignal in TanStack Query hooks 2026-02-14 22:41:46 +01:00
useAnimatedCounter.ts feat(ui): animated number counters + navigation progress bar 2026-02-10 00:19:18 +01:00
useAuth.test.ts fix(tests): cycles 12–18 – corrections services, mocks et design tokens 2026-02-11 09:43:55 +01:00
useAuth.ts [INT-AUTH-002] Remove duplicate auth store - migrate to features/auth/store/authStore.ts 2025-12-26 09:11:46 +01:00
useCopyToClipboard.ts feat(ui): Sidebar refactor, premium skeletons, ContentFadeIn transitions 2026-02-10 22:51:51 +01:00
useDebounce.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useDebounce.ts BASE: completing the initial repo state 2025-12-03 22:56:50 +01:00
useDebouncedCallback.ts edge-cases: implement Edge 3.2 - handle rapid user interactions 2026-01-16 12:58:21 +01:00
useFormValidation.ts chore: consolidate CI, E2E, backend and frontend updates 2026-02-17 16:43:21 +01:00
useGlobalKeyboardShortcuts.test.ts Phase 2 stabilisation: code mort, Modal→Dialog, feature flags, tests, router split, Rust legacy 2026-02-14 17:23:32 +01:00
useGlobalKeyboardShortcuts.ts feat(ui): profile page premium polish + keyboard shortcuts panel 2026-02-10 00:15:50 +01:00
useIntersectionObserver.test.ts chore(refactor/sumi-migration): commit pending changes — tests, stream server, dist_verification 2026-02-13 19:39:18 +01:00
useIntersectionObserver.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useIsRateLimited.ts security: disable mutation buttons when rate limited 2026-01-15 20:01:47 +01:00
useKeyboardNavigation.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useKeyboardNavigation.ts [FIX] PROD-010: Corriger ENUM PostgreSQL dans modèle User - Tests E2E passent 2026-01-04 01:44:19 +01:00
useLocalStorage.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useLocalStorage.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useLongRunningOperation.ts edge-cases: implement Edge 3.3 - handle tab switching during operations 2026-01-16 12:59:29 +01:00
useMediaQuery.ts fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
useMutationRetry.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useOnlineStatus.test.ts chore(refactor/sumi-migration): commit pending changes — tests, stream server, dist_verification 2026-02-13 19:39:18 +01:00
useOnlineStatus.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
usePatina.ts feat: UI components, services, utils, i18n, and routing 2026-03-23 15:46:42 +01:00
usePreload.test.ts Phase 2 stabilisation: code mort, Modal→Dialog, feature flags, tests, router split, Rust legacy 2026-02-14 17:23:32 +01:00
usePreload.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
usePreventDoubleClick.ts edge-cases: implement Edge 3.2 - handle rapid user interactions 2026-01-16 12:58:21 +01:00
usePWA.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
usePWA.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useQueryInvalidation.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useQueryInvalidation.ts feat: UI components, services, utils, i18n, and routing 2026-03-23 15:46:42 +01:00
useReducedMotion.ts feat(theme): extend ThemeProvider with contrast, density, accent, fontSize 2026-02-25 09:52:32 +01:00
useRoutePreload.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
useRoutePreload.ts refactor(frontend): eliminate ~45 'any' types in production code 2026-02-22 17:44:49 +01:00
useSeason.ts fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
useSidebarNavigation.ts fix(auth): sign out - await logout and use full page redirect 2026-02-23 09:57:22 +01:00
useTabVisibility.ts fix: type authService.login, replace remaining console.error with logger 2026-02-12 22:15:10 +01:00
useThrottledCallback.ts edge-cases: implement Edge 3.2 - handle rapid user interactions 2026-01-16 12:58:21 +01:00
useTimeOfDay.ts fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
useToast.test.ts chore(refactor/sumi-migration): commit pending changes — tests, stream server, dist_verification 2026-02-13 19:39:18 +01:00
useToast.ts fix: UI remediation Phase 1 (S0-S5) + Phase 2 Sprint 6 shadow system 2026-02-12 10:13:44 +01:00
useTranslation.test.ts feat(v0.12.7): internationalisation i18n — FR/EN/ES avec formatage locale 2026-03-12 14:29:22 +01:00
useTranslation.ts feat(v0.12.7): internationalisation i18n — FR/EN/ES avec formatage locale 2026-03-12 14:29:22 +01:00
useUnsavedChanges.ts feat(ui): unsaved changes warning + chat date separators 2026-02-10 00:07:19 +01:00