Repository navigation
fix: show AI chat action buttons after streaming completes - #144
Conversation
The message action buttons (edit, delete, retry, undo) were not visible
after AI streaming finished because they were wrapped inside a
`{createdAt && ...}` conditional. During streaming, the AI SDK's useChat
hook creates messages without a createdAt timestamp (only populated when
saved to DB), causing the entire footer with buttons to not render.
Fixed by separating the button rendering from the timestamp condition:
- Buttons now always render when handlers are provided
- Timestamp only shows when createdAt exists
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughRefactored footer rendering logic in two message renderer components. The footer section now renders unconditionally with conditional timestamp display based on Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (6)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.tsx📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{tsx,css}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/web/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/web/src/components/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (4)📚 Learning: 2025-12-16T19:03:59.870ZApplied to files:
📚 Learning: 2025-12-23T18:49:41.966ZApplied to files:
📚 Learning: 2025-12-14T14:54:45.713ZApplied to files:
📚 Learning: 2025-12-23T18:49:41.966ZApplied to files:
🧬 Code graph analysis (2)apps/web/src/components/ai/shared/chat/CompactMessageRenderer.tsx (1)
apps/web/src/components/ai/shared/chat/MessageRenderer.tsx (1)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The message action buttons (edit, delete, retry, undo) were not visible after AI streaming finished because they were wrapped inside a
{createdAt && ...}conditional. During streaming, the AI SDK's useChat hook creates messages without a createdAt timestamp (only populated when saved to DB), causing the entire footer with buttons to not render.Fixed by separating the button rendering from the timestamp condition:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.