veza/apps/web/src
senke 2a08000745 refactor(web): zero out react-hooks/exhaustive-deps (49 → 0)
Final ESLint warning bucket of the dette-tech sprint. 49 warnings
across 41 files, fixed per case based on context :

  ~17 cases — added the missing dep, wrapping the upstream helper
              in useCallback at its definition so the new [fn]
              entry is stable. Files: DeveloperDashboardView,
              WebhooksView, CloudBrowserView, GearDocumentsTab,
              GearRepairsTab, PlaybackSummary, UploadQuota, Dialog,
              SwaggerUI, MarketplacePage, etc.
  ~5 cases  — extracted complex expression to its own useMemo so
              the outer hook's deps array is statically checkable.
              ChatMessages.conversationMessages,
              useGearView.sourceItems, useLibraryPage.tracks,
              usePlaylistNotifications.playlistNotifications,
              ChatRoom.conversationMessages.
  ~5 cases  — inline ref-pattern when the upstream hook returns a
              freshly-allocated object every render
              (ToastProvider's addToast, parent prop callbacks
              that aren't memoized). Captured into a ref so the
              effect's deps stay stable.
  ~5 cases  — ref-cleanup pattern for animation-frame ids :
              capture .current at cleanup time into a local that
              the closure closes over (per React docs).
  ~13 cases — suppressed per-line with specific reason : mount-only
              inits, recursive callback pairs (usePlaybackRealtime
              connect↔reconnect), Zustand-store identity stability,
              search loops, decorator construction (storybook).
              Every comment names WHY the dep isn't safe to add.
   1 case   — dropped a dep that was unnecessary (useChat had a
              setActiveCall in deps that the body didn't use).
   1 case   — replaced 8 granular player.* deps with the parent
              [player] object (useKeyboardShortcuts).

baseline post-commit : 754 warnings, 0 errors, 0 TS errors. The
remaining 754 are entirely no-restricted-syntax — design-system
guardrails (Tailwind defaults / hex literals / native <button>) —
which are per-feature migration work, not lint-sprint fodder.

CI --max-warnings lowered to 754. Trajectory of the sprint :
  1240 → 1108 → 921 → 803 → 754
  (-486 warnings = -39%)

Latent issue surfaced (not fixed in this commit, flagged for v1.1) :
ToastProvider's `useToast` and useSearchHistory's `addToHistory`
return new objects every render, so anything that depends on them
in a useEffect would re-fire on every parent render. Today these
are routed through refs at the call site ; the structural fix is to
memoize the providers themselves. Documented in the suppression
comments at the affected sites.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 04:00:46 +02:00
..
__tests__ chore(refactor/sumi-migration): commit pending changes — tests, stream server, dist_verification 2026-02-13 19:39:18 +01:00
app chore: apply pre-commit hook formatting and cleanup 2026-04-01 01:40:54 +02:00
components refactor(web): zero out react-hooks/exhaustive-deps (49 → 0) 2026-05-01 04:00:46 +02:00
config fix(web): flip HLS_STREAMING feature flag default to true 2026-04-30 15:45:01 +02:00
context refactor(web): zero out react-hooks/exhaustive-deps (49 → 0) 2026-05-01 04:00:46 +02:00
docs refactor(frontend): document chat store as single source of truth 2026-02-15 16:02:14 +01:00
features refactor(web): zero out react-hooks/exhaustive-deps (49 → 0) 2026-05-01 04:00:46 +02:00
hooks refactor(web): zero out @typescript-eslint/no-explicit-any (115 → 0) 2026-05-01 03:23:27 +02:00
lib fix(a11y): fix heading hierarchy h1→h3 gaps on 8 pages 2026-03-25 10:14:18 +01:00
locales feat(ui): add SUMI design system components, seasonal hooks, and i18n updates 2026-03-31 19:15:54 +02:00
mocks refactor(web): zero out @typescript-eslint/no-unused-vars (134 → 0) 2026-04-30 23:05:32 +02:00
providers refactor(web): zero out 3 ESLint warning buckets (storybook + react-refresh + non-null-assertion) 2026-04-30 23:30:22 +02:00
router refactor(web): zero out 3 ESLint warning buckets (storybook + react-refresh + non-null-assertion) 2026-04-30 23:30:22 +02:00
schemas refactor(web): zero out @typescript-eslint/no-unused-vars (134 → 0) 2026-04-30 23:05:32 +02:00
services refactor(web): zero out @typescript-eslint/no-explicit-any (115 → 0) 2026-05-01 03:23:27 +02:00
stores feat(v0.12.7): internationalisation i18n — FR/EN/ES avec formatage locale 2026-03-12 14:29:22 +01:00
stories refactor(web): zero out react-hooks/exhaustive-deps (49 → 0) 2026-05-01 04:00:46 +02:00
styles docs: update Welcome.mdx and deprecate Kodo references in docs 2026-02-17 17:05:33 +01:00
test refactor(web): zero out 3 ESLint warning buckets (storybook + react-refresh + non-null-assertion) 2026-04-30 23:30:22 +02:00
types refactor(web): zero out @typescript-eslint/no-explicit-any (115 → 0) 2026-05-01 03:23:27 +02:00
utils refactor(web): zero out react-hooks/exhaustive-deps (49 → 0) 2026-05-01 04:00:46 +02:00
index.css refactor(web): zero out @typescript-eslint/no-unused-vars (134 → 0) 2026-04-30 23:05:32 +02:00
main.tsx refactor(web): zero out 3 ESLint warning buckets (storybook + react-refresh + non-null-assertion) 2026-04-30 23:30:22 +02:00
setupTests.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
vite-env.d.ts fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00