Repository navigation
Bug: "Load earlier" on a long session throws "system-message withdrew materialized target chat" and breaks Trajectory #10927
sugar-zero
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
In a long-running session, using Load earlier on the conversation history can crash the client-side conversation assembler:
After this, the session's chat UI stops applying history updates and the Trajectory tab no longer opens until the window is reloaded.
Environment
0.2.1-rc.3(desktop)27.0.1(build26A434)Steps to reproduce
Expected behavior
Older history should prepend without errors, and chat plus Trajectory should remain usable.
Actual behavior
Both calls to
POST /api/session/pagereturn200 OK; the failure is client-side.Relevant console output:
Once this happens, subsequent history loads are silent no-ops. The Trajectory view is also unresponsive because the event feed subscriber has failed.
Likely root cause
In
@deepseek-ai/dsh-client-ui-conversation,buildTargetUpsertscurrently treats a materialized target becomingnullas an invariant violation:The Chat
system-messagedefinition can returnnullfrombuildViewNodewhen:system/message, orsystem/messagestate text is empty, orappend(e.g.system/messagereplacement handling), orWhen an older page is prepended, a previously materialized
system-message/chattarget can transition tonull, which triggers the throw. My session containssystem/messageevents together with paginated request headers and seeded history around this boundary; other long sessions without that event sequence do not reproduce.Possible fix directions
system-messagedefinition, when the node is conceptually hidden, return the same key with hidden visibility instead ofnull(as the error message suggests).system/messageevents after an initial snapshot.Workaround
I can provide a sanitized/synthetic session fixture or a smaller event sequence if that would help reproduce it.
Thanks!
All reactions