Repository navigation
fix(chat): hide a queued held message for up to 1 s before showing it - #483
andrebrait wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Delayed reveal and follow-scroll components/MessageView.tsx, hooks/useAgentSession.ts, components/ChatWindow.tsx, components/MessageView.test.mjs, CHANGELOG.md |
HeldMessageView delays selected messages and calls onReveal when they appear. ChatWindow passes the session callback, which increments the held follow-scroll counter. Tests cover visibility by message state and persistence after state changes. The changelog documents the delay and immediate-display cases. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant HeldMessageView
participant ChatWindow
participant useAgentSession
ChatWindow->>HeldMessageView: Pass followHeldMessages as onReveal
HeldMessageView->>ChatWindow: Call onReveal after delayed reveal
ChatWindow->>useAgentSession: Invoke followHeldMessages
useAgentSession->>useAgentSession: Increment heldFollow for follow-scroll
Suggested reviewers: kahme247, gtanger
Merge Risk: 
Minimal · up to 31f9e
-
Held follow-up and steer bubbles now stay hidden for up to one second before appearing, and the chat scrolls to them when they are revealed. No concrete merge-blocking risk was found.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title names the main change: a queued follow-up or steer message is hidden for up to 1 second before it appears. The title uses the fix(chat) prefix and matches the MessageView, ChatWindow, and useAgentSession changes. The title does not mention the follow-scroll reveal behavior added in the second commit, but that detail is secondary.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit watches queued words wait,
One second passes by the gate.
The held words hop into the chat,
A scroll follows after that.
Prompts pop in without delay,
Then off the rabbit bounds away!
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. The only jump-scare was my environment rejecting some read-only file reads, so I reviewed from the PR diff and metadata rather than spelunking every surrounding line like I usually do. 📊 Overall: Like a delayed toast notification that finally behaves — restrained, on time, and not yelling “I EXIST” a millisecond too early. Files Reviewed (5 files)
Reviewed by free · Input: 28.4K · Output: 1.1K · Cached: 52.7K |
A follow-up or steer sent during a run is held in the outbox and drawn as a held bubble until omp's
queue_updateturns it into a queue chip, so it flashed in the chat first.HeldMessageViewhides a follow-up/steer bubble that is still sending, held or delivering for 1 s after it mounts. If omp has not taken it by then, it appears with its delivery status.followHeldMessages), so a reader at the bottom sees it.Tests: new
MessageView.test.mjscase pins the 1000 ms with mock timers (mutating the delay to 10 ms fails it);MessageView,useAgentSession.rpcandChatWindow*suites pass (385/0); typecheck and lint clean.Summary by CodeRabbit