fix(ui): fix home button not working until stream ends#4145
fix(ui): fix home button not working until stream ends#4145TheodoreSpeaks merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview This deletes the Reviewed by Cursor Bugbot for commit 0a6fc58. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR fixes a UX bug where clicking the home button while a Mothership stream was active would block navigation until the stream finished. The fix removes a Confidence Score: 5/5Safe to merge — targeted one-line removal of a blocking guard with no correctness risk. The fix removes a guard that blocked No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant HomeEffect as useEffect (isHomePage, line 1219)
participant Reset as resetHomeChatState()
participant Stream as processSSEStream read loop
participant Server as Mothership Server
User->>HomeEffect: Click home button (isHomePage = true)
Note over HomeEffect: Before fix: if (sendingRef.current) return — blocked navigation
HomeEffect->>Reset: resetHomeChatState() [now called immediately]
Reset->>Reset: streamGenRef.current++ (marks stream stale)
Reset->>Reset: abortControllerRef.current = null (detach, not abort)
Reset->>Reset: setTransportIdle() / clear UI state
Note over Stream: isStale() === true — discards incoming chunks
Stream-->>Stream: Continues reading until stream ends (no-op)
Server-->>Server: Continues generating and persisting response
Note over User: UI immediately resets to home state
Reviews (1): Last reviewed commit: "fix(ui): fix home button not working unt..." | Re-trigger Greptile |
Summary
We had logic that waited until active transport finished before returning home. Removed this logic so clicking home instantly takes you back.
Type of Change
Testing
Checklist
Screenshots/Videos