fix: standardize imports, tighten types, and align

mock data with actual API contracts

- Normalize all `cn` imports to `@/lib/utils` across
  30+ UI and component files
- Replace relative imports with `@/` alias in auth,
  roles, users, stats, and layout components
- Remove redundant `as` type assertions in playlist
  routes (Zod parse already returns typed data)
- Replace `any` with proper types in FallbackCache,
  mock handlers, and validateIcons
- Use `type` import for type-only imports
- Add type-safe `.filter(Boolean)` with type guard
  in Sidebar nav item arrays
- Update MSW mock data to match actual API shape:
  numeric IDs, `role` field, HTTP-only cookie auth,
  paginated response format, and settings schema
- Add JSDoc to AuthTokens clarifying cookie-based
  token storage
- Replace console.* calls with logger in icon
  validation
- Ignore SQLite WAL files in .gitignore
This commit is contained in:
Darkraise
2026-02-10 20:42:56 +07:00
parent b95f058a66
commit 3e35799de8
58 changed files with 118 additions and 109 deletions
+3 -1
View File
@@ -139,4 +139,6 @@ vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.claude/**/*.*
user.db
user.db
*.db-shm
*.db-wal