memos/web
Steven b2e2b6426c perf(react-query): fix context re-renders and improve type safety
Optimizes React Query migration with performance and consistency improvements:

Performance:
- Memoize AuthContext and InstanceContext provider values to prevent unnecessary re-renders
- Convert InstanceContext getter functions to useMemo hooks
- Fix refetchSettings to avoid state dependency that caused frequent recreations

Type Safety:
- Replace 'any' types in useAttachmentQueries with proper protobuf types
- Add Attachment and ListAttachmentsRequest type imports

Query Key Consistency:
- Replace hardcoded ["users", "stats"] with userKeys.stats() factory function
- Ensures consistent cache key management across mutations

Developer Experience:
- Rename unused useCurrentUser to useCurrentUserQuery to avoid confusion
- Add documentation explaining AuthContext-based vs React Query current user hooks
- Update internal references in useNotifications and useTagCounts

All changes verified with TypeScript compilation and build tests.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 08:29:34 +08:00
..
public chore: enhance site.webmanifest in firefox (#4828) 2025-07-08 19:56:46 +08:00
src perf(react-query): fix context re-renders and improve type safety 2025-12-25 08:29:34 +08:00
.gitignore chore: update gitignore 2025-04-17 23:11:36 +08:00
biome.json chore(web): migrate from ESLint+Prettier to Biome 2025-11-14 23:58:07 +08:00
components.json feat: themes (#4824) 2025-07-07 20:13:22 +08:00
index.html chore: prevent sensitive data caching 2025-12-20 12:33:16 +08:00
package.json feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
pnpm-lock.yaml feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
tsconfig.json refactor: update import prefix with alias (#1433) 2023-04-01 16:03:14 +08:00
vite.config.mts refactor(web): improve MemoContent security and maintainability 2025-12-02 22:45:22 +08:00