Commit Graph

1 Commits

Author SHA1 Message Date
imeepos 83c3183be8 feat: add message action hooks with TDD
Implement useMessageActions and useMessageUnreadCount hooks following strict TDD principles (RED → GREEN → REFACTOR).

useMessageActions provides:
- markRead(id) - mark single message as read
- batchMarkRead(ids) - batch mark messages as read
- deleteMessage(id) - delete message
- Independent loading/error states for each operation

useMessageUnreadCount provides:
- Fetch total unread count and counts by message type
- refetch() method for manual refresh
- loading and error state management

All operations use MessageController from SDK with proper error handling.

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