fix(copilot): persist thinking blocks on page refresh#3194
fix(copilot): persist thinking blocks on page refresh#3194waleedlatif1 wants to merge 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR successfully migrates all markdown renderers from Key improvements:
Minor style issue:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Application
participant Old as react-markdown
participant New as Streamdown
participant Remend as remend (incomplete MD)
Note over App,Remend: Before Migration
App->>Old: Render markdown content
Old->>Old: Apply remark-breaks plugin
Old->>Old: Apply remarkGfm plugin
Old->>App: Return rendered output
Note over App,Remend: After Migration
App->>New: Render markdown content
New->>New: Built-in GFM support
New->>Remend: Handle incomplete markdown
Remend->>Remend: Gracefully render partial syntax
New->>App: Return streaming-aware output
Note over App,New: Streaming Text
loop Character streaming removed
App->>New: Pass full content directly
New->>Remend: Process incomplete markdown
Remend->>App: Render without animation buffer
end
|
| <Streamdown | ||
| components={{ | ||
| h2: ({ children, ...props }) => | ||
| h2: ({ children }: any) => |
There was a problem hiding this comment.
Using any type violates TypeScript conventions - consider using proper types from Streamdown's component prop types
| h2: ({ children }: any) => | |
| h2: ({ children }: { children?: React.ReactNode }) => |
Context Used: Context from dashboard - TypeScript conventions and type safety (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx
Outdated
Show resolved
Hide resolved
- Use navigator.sendBeacon in beforeunload handler to reliably persist in-progress messages (including thinking blocks) during page teardown - Flush batched streaming updates before beacon persistence - Fall back to sendBeacon in abortMessage when page is unloading - Fix double-digit ordered list clipping in thinking block (pl-6 → pl-8)
87e50be to
031866e
Compare
Summary
navigator.sendBeaconinbeforeunloadto persist in-progress messages (including thinking blocks) during page refresh/closeabortMessageuses beacon instead of fire-and-forget fetch when page is unloadingpl-6→pl-8)Type of Change
Testing
Tested manually
Checklist