Commit Graph
8 Commits
Author SHA1 Message Date
Darkraise 3e35799de8 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
2026-02-10 20:42:56 +07:00
Darkraise ba2c6b4ea1 fix: improve error handling, theme tokens, and type safety
- Add error reporting to all error boundary components
- Replace hardcoded colors with theme tokens (destructive,
  primary, amber) for dark mode compatibility
- Use `??` instead of `||` for config/setting defaults
- Replace `any` with `unknown` in asyncHandler types
- Add `Identifiable` constraint to createQueryHook generics
- Fix timeout leaks with useRef and componentWillUnmount
- Add `.catch()` on fire-and-forget promises
- Deduplicate theme sync logic into `maybeSyncToServer`
- Extract `resolveActualMode` helper in theme store
- Add Zustand `useShallow` selector to CardSizeControl
- Add axios module augmentation for custom request config
- Set 30s default timeout on API client
- Deduplicate toast IDs to prevent session-expired spam
- Fix TOAST_REMOVE_DELAY from 1000000ms to 1000ms
- Fix use-toast useEffect dependency array
- Remove redundant try/catch in asyncHandler-wrapped routes
- Lock body scroll when mobile sidebar is open
- Fix route ordering: static before wildcard in App.tsx
- Quote background-image URLs in LazyBackgroundImage
- Remove duplicate onCancel call in ConfirmDialog
- Add deferred TODO.md for architectural improvements
- Clear isMaintenanceMode on logout, stop persisting it
2026-02-10 12:06:47 +07:00
Darkraise 2f641c8441 chore: comments cleanup 2026-02-09 17:26:17 +07:00
Darkraise 96cf4a5b00 feat: revamp the game serving feature 2026-02-07 23:36:45 +07:00
Darkraise 12792db185 chore: apply consistent code formatting across codebase 2026-02-04 06:03:39 +07:00
Darkraise 5ca30044d6 refactor: use ternary expressions for conditional JSX
Replace `{condition && (<JSX>)}` pattern with
`{condition ? (<JSX>) : null}` across all frontend components.
This avoids potential falsy value rendering issues with
the logical AND operator.
2026-02-04 05:50:59 +07:00
Darkraise 12e68f400e feat: add share playlist feature 2026-01-29 23:08:23 +07:00
Darkraise 80a506bf3e feat: polish some features 2026-01-28 19:21:02 +07:00