memos/web/src
Steven d4e08ae2bd refactor(react-query): optimize config, add error boundary, and remove JSDoc
This commit combines multiple improvements to the React Query migration:

Performance Optimization:
- Increase default staleTime from 10s to 30s for better performance
- Reduces unnecessary network requests while maintaining data freshness

Error Handling:
- Add ErrorBoundary component with user-friendly error UI
- Integrated at app root level for comprehensive coverage
- Provides error details and reload option

Documentation:
- Add docs/auth-architecture.md explaining AuthContext design decisions
- Document why AuthContext is preferred over React Query for current user

Code Cleanup:
- Remove all JSDoc comments from hooks and components
- Keep essential inline comments for clarity
- Simplifies code readability

Files modified:
- src/lib/query-client.ts - Optimized staleTime
- src/main.tsx - Added ErrorBoundary wrapper
- src/components/ErrorBoundary.tsx - New component
- src/hooks/useMemoQueries.ts - Removed JSDoc
- src/hooks/useUserQueries.ts - Removed JSDoc
- src/components/PagedMemoList/PagedMemoList.tsx - Removed JSDoc
- docs/auth-architecture.md - New documentation

All changes verified with TypeScript compilation and production build.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 08:47:36 +08:00
..
components refactor(react-query): optimize config, add error boundary, and remove JSDoc 2025-12-25 08:47:36 +08:00
contexts perf(react-query): fix context re-renders and improve type safety 2025-12-25 08:29:34 +08:00
helpers feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
hooks refactor(react-query): optimize config, add error boundary, and remove JSDoc 2025-12-25 08:47:36 +08:00
layouts feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
lib refactor(react-query): optimize config, add error boundary, and remove JSDoc 2025-12-25 08:47:36 +08:00
locales feat: contribution New Locale: Galician (gl, gl_ES) (#5376) 2025-12-25 08:38:24 +08:00
pages feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
router refactor(web): improve auth flow and eliminate route duplication 2025-12-18 22:14:30 +08:00
themes fix(theme): improve text contrast in default dark mode (#5323) 2025-12-11 07:53:02 +08:00
types refactor: remove deprecated Sessions and AccessTokens settings 2025-12-19 08:35:57 +08:00
utils chore: fix remark tag parse 2025-12-20 13:50:32 +08:00
App.tsx feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
auth-state.ts fix(auth): resolve token refresh and persistence issues 2025-12-18 20:56:54 +08:00
connect.ts feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
i18n.ts feat: add norwegian bokmål (nb) translation (#4561) 2025-03-27 13:14:12 +08:00
index.css feat: add iframe support for embedded videos in markdown content 2025-12-17 08:52:59 +08:00
instance-config.ts feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
main.tsx refactor(react-query): optimize config, add error boundary, and remove JSDoc 2025-12-25 08:47:36 +08:00