Commit Graph

3 Commits

Author SHA1 Message Date
imeepos a344410374 fix: change type parameter from array to single value for API compatibility
SDK API only accepts single MessageType value, not array. Updated to use client-side filtering for Tab-based message type filtering (all/notice/other) instead of server-side filtering.

Changes:
- hooks/use-messages.ts: Changed type parameter from array to single value
- app/(tabs)/message.tsx: Replaced getMessageTypeByTab with filterMessagesByTab for client-side filtering
- Removed useEffect dependency on activeTab to prevent unnecessary refetches

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:15:47 +08:00
imeepos 4868ff8660 feat: integrate real message data with SDK in message page
Replace mock data with useMessages hook and useMessageActions for real-time message management. Add support for tab-based filtering (all/notice/other), pull-to-refresh, infinite scroll pagination, and mark-as-read functionality. Integrate LoadingState, ErrorState, and PaginationLoader components for better UX.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 14:58:32 +08:00
imeepos 05fb680fe2 refactor: migrate use-messages hook to MessageController with TDD
Replace ChatController.chat() with MessageController.list() and import types from @repo/sdk. Updated tests to match new implementation. All tests passing (8/8).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 14:41:47 +08:00