Backend: - Composite ORDER BY (created_at DESC, iteration ASC, id ASC) to fix non-deterministic ordering when multiple messages share same second - Composite key cursor pagination to avoid missing messages at boundary Android: - Fix message duplication: guard loadMoreHistory from firing before initial scroll completes (isAtTop race → fetchOlderMessages → cacheMessagesFromApi with different IDs → Room duplicates) - Add distinctBy(id) at all message assignment points in ViewModel - cacheMessagesFromApi: skip insert if same ID or same content exists - Add relative timestamp display on message bubbles Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>