fix(c-generative-ui): emit_state → get_stream_writer (LangGraph 1.x)#360
Merged
Conversation
…ph 1.x)
The dashboard's KPI cards / charts / tables never populated past the
"Building UI…" skeleton. Root cause: `adispatch_custom_event` no longer
flows into the `custom` stream channel in LangGraph 1.x. Live verification
via SSE shows 0 custom events with adispatch and 1 custom event with
get_stream_writer().
Additional fix: the payload now matches the chat-lib bridge's expected
shape — `{name: "state_update", data: <patches>}`. The bridge
(stream-manager.bridge.ts) reads `eventData.name` for routing and
`eventData.data` for the flat path→value patches that
signal-state-store.update() needs.
Verified end-to-end via chrome MCP — all 7 state paths now populate
correctly (4 stat_cards, 1 line_chart, 1 bar_chart, 1 data_grid) with
zero render-default-fallback components remaining and zero NG0303
input-spam errors.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
adispatch_custom_eventno longer flows into thecustomstream channel in LangGraph 1.x. Live SSE inspection: 0 custom events with the old API, 1 custom event withget_stream_writer().{name: "state_update", data: <flat-patches>}— so the bridge'seventData.namerouting andeventData.dataextraction hit the right slots, thensignal-state-store.update()receives the flat{"/on_time/value": "84.2%", …}map it expects.Test plan
adispatch_custom_eventin a minimal graph → 0 custom events emitted (confirms the regression)get_stream_writer()in a minimal graph → custom events emit correctlyevent: customwith all 7 state paths in payloadFiles
cockpit/langgraph/streaming/python/src/dashboard_graph.py— switchemit_statetoget_stream_writer(), wrap payload as{name, data}cockpit/chat/generative-ui/python/src/graph.py— same fix in the standalone copy🤖 Generated with Claude Code