Commit graph

10 commits

Author SHA1 Message Date
senke
559cfbee3e refactor(web): zero out 3 ESLint warning buckets (storybook + react-refresh + non-null-assertion)
Three rules cleaned in parallel passes — 187 fewer warnings, 0 TS
errors, 0 behaviour change beyond one incidental auth bugfix
flagged below.

storybook/no-redundant-story-name (23 → 0) — 14 stories files
  Storybook v7+ infers the story name from the variable name, so
  `name: 'Default'` next to `export const Default: Story = …` is
  pure noise. Removed only when the name was redundant ;
  preserved when the label was a French translation
  ('Par défaut', 'Chargement', 'Avec erreur', etc.) since those
  are intentional.

react-refresh/only-export-components (25 → 0) — 21 files
  Each warning marks a file that exports a React component AND a
  hook / context / constant / barrel re-export. Suppressed
  per-line with the suppression-with-justification pattern :
    // eslint-disable-next-line react-refresh/only-export-components -- <kind>; refactor would split a tightly-coupled API
  The justification matters — every comment names the specific
  thing being co-located (hook / context / CVA constant / lazy
  registry / route config / test util / backward-compat barrel).
  Splitting these would create 21 new files for a HMR-only DX
  win that's already a non-issue in practice.

@typescript-eslint/no-non-null-assertion (139 → 0) — 43 files
  Distribution of fixes :
    ~85 cases : refactored to explicit guard
                `if (!x) throw new Error('invariant: …')`
                or hoisted into local with narrowing.
    ~36 cases : helper extraction (one tooltip test had 16
                `wrapper!` patterns reduced to a single
                `getWrapper()` helper).
    ~18 cases : suppressed with specific reason :
                static literal arrays where index is provably
                in bounds, mock fixtures with structural
                guarantees, filter-then-map patterns where the
                filter excludes the null branch.
  One incidental find : services/api/auth.ts threw on missing
  tokens but didn't guard `user` ; added the missing check while
  refactoring the `user!` to a guard.

baseline post-commit : 921 warnings, 0 errors, 0 TS errors.
The remaining buckets are no-restricted-syntax (757, design-system
guardrail), no-explicit-any (115), exhaustive-deps (49).

CI --max-warnings will be lowered to 921 in the follow-up commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 23:30:22 +02:00
senke
9c58ff7818 refactor(web): split VirtualizedList into virtualized-list module
- virtualized-list/types.ts: VirtualizedListProps
- virtualized-list/useInfiniteScroll.ts: useInfiniteScroll hook
- virtualized-list/useScrollPosition.ts: useScrollPosition hook
- virtualized-list/VirtualizedList.tsx: main component
- Re-export from virtualized-list.tsx via ./virtualized-list/index
- Test mock extended with getTotalSize, measureElement, key on virtual items
- 4 tests pass

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 13:55:06 +01:00
senke
76d95ecfb4 incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
senke
83f12a6e42 chore: remove production logs in components 2026-01-07 10:31:02 +01:00
senke
9e16672953 [T0-006] test(backend): Amélioration couverture tests Go - Scripts et tests RBAC
- Scripts créés pour exécuter tests par groupes/packages (évite crashes RAM)
- Tests complets pour handlers RBAC (16 tests, tous passent)
- Interface RBACServiceInterface créée pour permettre mock dans tests
- Couverture actuelle: 29.8% (objectif: 80%)

Files:
- veza-backend-api/scripts/test_coverage_by_groups.sh (créé)
- veza-backend-api/scripts/test_coverage_one_by_one.sh (créé)
- veza-backend-api/internal/api/handlers/rbac_handlers.go (modifié)
- veza-backend-api/internal/api/handlers/rbac_handlers_test.go (créé)
- VEZA_ROADMAP.json (mis à jour)

Hours: 16 estimated, 4 actual (travail en cours)
2026-01-04 01:44:21 +01:00
senke
5bdb224970 [T0-003] fix(frontend): Corriger erreurs TypeScript/React
- Variables non utilisées préfixées avec _
- Badge variants corrigés (outline -> default/secondary)
- Types ApiError corrigés (rate_limit supprimé)
- Logger errors corrigés (LogContext au lieu de Error)
- Types PaginatedResponse corrigés (items au lieu de data)
- Types génériques complexes corrigés (stateCleanup, undoRedo)
- Fichiers .example.ts exclus du typecheck
- Status undefined vérifié dans client.ts

Résultats:
- npm run build  (réussit)
- npm run typecheck  (0 erreurs)
- npm run lint ⚠️ (1521 erreurs restantes - style/variables non utilisées)

Files: 35 fichiers modifiés
Hours: 6 estimated, 6 actual
2026-01-04 01:44:20 +01:00
senke
40170e188a [FIX] PROD-010: Corriger ENUM PostgreSQL dans modèle User - Tests E2E passent
- Ajout de type:user_role dans le tag GORM du champ Role
- Amélioration de la détection d'erreurs ENUM dans le service Register
- L'endpoint /auth/register retourne maintenant 201 OK avec tokens
- Score production: 52/70 → 58/70
- PROD-010 marqué comme fixed (P0 blocker résolu)
2026-01-04 01:44:19 +01:00
senke
114f363c65 fix(MVP-006): Standardize environment variable names (VITE_API_BASE_URL → VITE_API_URL) 2025-12-22 22:56:37 +01:00
senke
2dfde29f7d refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
okinrev
327ac36a30 BASE: completing the initial repo state 2025-12-03 22:56:50 +01:00