Bug: Chat view freezes after loading earlier history — root cause found, fix branch ready #5907
Replies: 1 comment
EN / EnglishAn outside research team — we use DSH daily — just confirming your fix direction has independent corroboration, since this thread has no comments yet. Your diagnosis (withdraw after materialization → assembler throws → whole projection flush aborts → view freezes) is the same failure class we reported in #5692: the assembler treats one unexpected context transition as a fatal error instead of degrading. The fix direction you've implemented — report the withdrawal violation instead of throwing, and isolate the build-loop failure so one stuck context can't freeze later flushes — is exactly the degrade path we proposed for #5692 (log and skip the offending block; don't let a single bad context abort the window). We just consolidated the family in a comment on #5884 (also Authorship note: reproduced and documented by me in real-world usage; root-cause tracing and drafting assisted by AI; verification and publication by me. I have no engineering background — if any technical claim reads wrong, please call it out; I will re-verify against the toolchain and correct. Reported by the OfferKuai Team — Founder: Zhaofeng (Yaming). Website: https://www.offerkuai.com/ | Contact: contact@offerkuai.com 中文版 / ZH我们是外部研究团队——日常使用 DSH——确认你的修复方向已有独立印证,因为这条帖还没有评论。 你的诊断(materialize 后收到 withdraw → assembler 抛错 → 整个投影 flush 中止 → 视图冻结)与我们 #5692 报告的是同一类失败:assembler 把一次意外的 context 转换当作致命错误而非降级。你实现的修复方向——把 withdrawal violation 记为 report 而非抛出、隔离 build-loop 失败使单个卡死 context 不再冻结后续 flush——正是我们对 #5692 建议的降级路径(记录并跳过问题块,不让单个坏 context 中止整个窗口)。 我们刚在 #5884 评论区汇总了这个家族(也是 协作说明:本文由我在真实使用中复现并记录;根因与成文由 AI 协助完成,我负责校验与发布。我非工程背景,技术表述如有错误,欢迎指出——我会回去用工具链重新验证后更正。 本报告由 OfferKuai(Offer快)团队提交 —— 创始人:Zhaofeng(Yaming)。官网:https://www.offerkuai.com/ | 联系:contact@offerkuai.com |
Uh oh!
There was an error while loading. Please reload this page.
Symptom
In the Web UI, opening a long session and clicking Load earlier can freeze the Chat view:
N tool calls · M messages) appears, but toggling it only changes row spacing — member rows never hide.Root cause
Traced with a live DOM inspection against the affected session:
replayDependenciesreplaysrequest-prompt'sstart()because its predecessor resolution changed, flippingshowsPromptto false.buildViewNodethen returnednullfor an already materializedsystem-promptnode, tripping the assembler's materialized-target contract:conversation Definition "request-prompt" withdrew materialized target "chat"(visible in the browser console).hasMore) had already committed — so every later flush re-throws on the same Context and the view stays frozen. The fold control's member hiding rides the same stuck projection, which is why only the store-driven chrome (chevron, spacing) still responded.Fix
Ready on a fork branch:
northwang-lucky:fix/chat-request-prompt-prepend-withdraw(commit988368d6).request-promptkeeps a materialized node mounted withvisibility: 'hidden'instead of withdrawing it (same precedent asassistant.ts).request-promptto be the only Definition with a withdraw-after-materialize path.request-prompt, plus failure-isolation cases for both build paths and both Location-data paths;test:guigreen, and the recorded-session web replay suite passes.Happy to open this as a PR if a maintainer can enable that path for my account (
CreatePullRequestis currently denied), or feel free to pick the branch directly.Demo
Recorded from a real server booted from the fix branch, serving a byte copy of the affected session: history loads fully (turns 1–15 render) and the fold expands/collapses its member rows correctly.
All reactions