veza/docs/archive/root-json/dev_plan.json
senke 43af35fd93 chore(audit 2.2, 2.3): nettoyer .md et .json à la racine
- Archiver 131 .md dans docs/archive/root-md/
- Archiver 22 .json dans docs/archive/root-json/
- Conserver 7 .md utiles (README, CONTRIBUTING, CHANGELOG, etc.)
- Conserver package.json, package-lock.json, turbo.json
- Ajouter README d'index dans chaque archive
2026-02-15 14:35:08 +01:00

84 lines
No EOL
4.4 KiB
JSON

{
"tasks": [
{
"id": "TASK-001",
"priority": "HIGH",
"category": "FIX",
"title": "Fix Error Handling Protocol Mismatch",
"description": "The Backend returns errors wrapped in a root `error` object (e.g., `{\"error\": {\"code\": ...}}`), but the Frontend `apiErrorHandler.ts` expects either `{ \"success\": false, \"error\": ... }` or a root-level `code`/`message`. This causes specific backend parsing errors (like validation details) to be lost, defaulting to generic messages.",
"context_files": [
"veza-backend-api/internal/middleware/error_handler.go",
"apps/web/src/utils/apiErrorHandler.ts",
"apps/web/src/services/api/client.ts"
],
"verification": "Trigger a validation error (e.g. login with empty password) and verify that the Frontend displays the specific field error message instead of a generic fallback.",
"status": "COMPLETED"
},
{
"id": "TASK-002",
"priority": "HIGH",
"category": "FIX",
"title": "Fix Track Upload Metadata Loss",
"description": "The Frontend sends track metadata (title, artist, genre, etc.) via FormData during upload, but the Backend `UploadTrack` handler only reads the `file` field and ignores all other metadata. This results in tracks being created with filenames as titles and missing metadata.",
"context_files": [
"veza-backend-api/internal/core/track/track_handler.go",
"veza-backend-api/internal/core/track/service.go",
"apps/web/src/features/tracks/api/trackApi.ts"
],
"verification": "Upload a track with a specific Title and Genre. Verify in the database or response that the created Track has these fields correctly set.",
"status": "COMPLETED"
},
{
"id": "TASK-003",
"priority": "HIGH",
"category": "FIX",
"title": "Standardize Auth Token Propagation",
"description": "Ensure strict token propagation during Uploads. The manual error throwing in `trackApi.ts` for 401/403 might interfere with the `client.ts` interceptor's auto-refresh logic. Standardize to rely on the interceptor.",
"context_files": [
"apps/web/src/services/api/client.ts",
"apps/web/src/features/tracks/api/trackApi.ts"
],
"verification": "Wait for token expiry (or mock 401), attempt an upload. Verify that the client attempts a refresh and retries the upload automatically.",
"status": "COMPLETED"
},
{
"id": "TASK-004",
"priority": "MEDIUM",
"category": "FIX",
"title": "Harmonize User Data Models (Date Formats)",
"description": "Backend `User` struct uses `*time.Time` (nullable pointers) for `Birthdate` and `UsernameChangedAt`. Frontend interface expects `string` (ISO8601). Ensuring strictly compatible handling is required to avoid rendering issues with 'null' or zero-dates.",
"context_files": [
"veza-backend-api/internal/models/user.go",
"apps/web/src/types/api.ts"
],
"verification": "Fetch a user profile with a null birthdate and one with a set birthdate. Verify both render without runtime errors.",
"status": "COMPLETED"
},
{
"id": "TASK-005",
"priority": "MEDIUM",
"category": "FEATURE",
"title": "Implement Missing DELETE Track Endpoint",
"description": "The `DELETE /api/v1/tracks/:id` endpoint exists in the Backend but is missing from the Frontend `trackApi.ts`. Implement this function to allow users to delete their tracks.",
"context_files": [
"veza-backend-api/internal/core/track/track_handler.go",
"apps/web/src/features/tracks/api/trackApi.ts"
],
"verification": "Call `deleteTrack(id)` from frontend. Verify track is deleted in backend and disappears from list.",
"status": "COMPLETED"
},
{
"id": "TASK-006",
"priority": "MEDIUM",
"category": "FEATURE",
"title": "Implement Chunked Uploads in Frontend",
"description": "The Backend supports robust Chunked Uploads (`/initiate`, `/chunk`, `/complete`), but the Frontend currently relies on a single POST request which is fragile for large files. Implement the chunked upload strategy.",
"context_files": [
"veza-backend-api/internal/core/track/track_handler.go",
"apps/web/src/features/tracks/api/trackApi.ts"
],
"verification": "Upload a file larger than 10MB. Verify it sends multiple requests to `/chunk` and finalizes with `/complete`.",
"status": "COMPLETED"
}
]
}