Things that are broken or noisy that we have not fixed yet, with enough context that you can decide whether to investigate them.
The chat panel logs three React errors during normal use, especially after the second or third message in a session. They are pre existing in @cloudflare/ai-chat 0.3.2 (the latest published version) and reproduce identically across every lesson 7 and lesson 8 commit. Lesson 8's work did not introduce them.
The errors:
Maximum update depth exceededatPartySocket.onAgentMessage→dispatchSetState. The library's WebSocket message handler enters a setState loop on certain agent response shapes.Encountered two children with the same key, <id>fired hundreds of times. TwoUIMessageobjects in the messages array share the samemsg.id. The duplicate is appended by the chat library, not byMessageList.tsx(which keys correctly onmsg.id).TypeError: Cannot read properties of undefined (reading 'state')atChat.makeRequestinside@cloudflare_ai-chat_react.js. Internal library state issue onsendMessage.
The errors are visible in the dev console but the chat panel still functions: messages send, tool calls fire, the canvas updates. Treat them as console noise until they actually break a workflow.
If you want to investigate:
- Try deduping messages by
msg.idin a wrapper arounduseAgentChat's returnedmessagesarray before passing toMessageList. - File an upstream issue against
@cloudflare/ai-chatwith a minimal reproduction (the JWT diagram prompt followed by a second add prompt is a reliable trigger). - Check
node_modules/@cloudflare/ai-chat_react.jsaround thedispatchSetStatecall site to find what triggers the loop.
@excalidraw/excalidraw's convertToExcalidrawElements only resolves arrow start.id / end.id against elements in its own input batch. When the agent splits a diagram across multiple addElements calls, the second call's arrows reference shapes from the first call and the helper logs No element for start binding with id rect_X found.
src/context/cross-call-bindings.ts patches the runtime arrows after the helper runs so the bindings end up correct on the canvas, but the helper still logs the warning during processing. The visual result is fine; the warning is dev console noise.
If the warnings ever get noisy enough to hide other errors, you can wrap the convertToExcalidrawElements call in a temporary console.warn filter, but that hides the warning for everyone forever and is not recommended.