[BUG] Web composer: typed text / whole input box can disappear (3 root causes + fix) #1614
Replies: 3 comments
|
All three verified in the installed 0.1.0-rc.6 build — thanks for the precise line refs, they match: defect 2's settling hide ( One real-world amplifier worth adding: defect 2 is not just a flaky-connection issue — it hits large sessions hard. Our live web profile is ~530k events / ~18MB decoded (the same scale as #1550's cold-materialization cases), and the unbounded settling hide means the composer can sit invisible for a long time while that history replay settles. So "the input box vanished" for a heavy-session user can be this defect + slow open, on top of the #1051 composer IME issues. The 3s cap is exactly the right bound — and it's also why the S11 whole-session scan (our offline doctor, #1534) flags oversized sessions: they cost visibility time, not just memory. Solid triage + tests — this deserves upstream attention. |
|
Same class of issue confirmed on our side too 鈥?real-world occurrence, not just audit: Observed symptom (Brave PWA, DSH 0.1.0-rc.6, genui 0.8.4): the composer intermittently does not mount while the message list and running-task state render fine; it may appear on its own after 1鈥?s, and Ctrl+R reliably restores it. Session data is never affected. A diagnostic pass (isolated headless Brave over CDP, both 2079脳1187 and 2106脳658 viewports) reproduced the recovery path but could not reproduce the intermittent trigger 鈥?consistent with a slot-registry lifecycle race rather than a deterministic layout bug. Blue skin and short viewport were ruled out. One amplifier worth linking: #2210 (posted today) describes the same slot system failing harder 鈥?a Question for upstream: is there a timeline for getting the three fixes (visible crash face, 3s settling cap, bounded undo window) into mainline? The fork diff ( |


Uh oh!
There was an error while loading. Please reload this page.
Symptom
Reported by a user running the web UI: while typing in the composer, the typed text disappeared, and at times the entire input box vanished.
What I found
I could not reproduce the exact trigger after fairly extensive attempts (fresh/old sessions, slash and
@-mention flows, undo storms, paste, offline/reconnect, swapping server versions under a live tab, stalelocalStorage, dark mode, narrow/short viewports, a live streaming turn, and a ~1,300-step randomized interaction test). But auditing the composer code inpackages/clientturned up three real defects, each of which independently produces one of the reported symptoms:A crashed composer renders as nothing.
SlotErrorBoundary(and the dry-cell / root outlets) inpackages/client/web-react/src/scoped-slots.tsxcaught a render error in a slot entry and replaced it with an empty<div data-slot-error>— a silent void with only aconsole.erroras a trace. If anything in the composer's render tree throws (a bad projection value, a plugin entry crash, etc.), the whole input box disappears with zero on-screen indication that something failed, and no way to recover short of a reload.The composer can stay invisible indefinitely while a session loads.
ConversationRoot's "settling" phase (packages/client/ui-conversation/src/client/skeleton/ConversationRoot.tsx) hides the composer seat (visibility: hidden) while a session's history replay is in flight, to avoid a hero/docked layout flash. That hide had no time bound — a slow or stalled open (large session, flaky connection, server restart mid-load) left the composer invisible for as long as the open never settled.One Ctrl+Z could wipe an entire message.
InputMachine's single-char typing undo-merge window (packages/client/ui-conversation/src/client/input/machine.ts) re-anchored on every keystroke instead of at the run's start, so steady typing coalesced an entire message — no matter how long — into one undo transaction. A single Ctrl+Z (a common typo-correction reflex) could delete everything just typed, which reads exactly like "my text vanished."Fix
Added unit tests for all three: a real crashing entry mounted through
SlotErrorBoundaryasserting the visible face + in-place Restore recovery, a fake-timer test asserting the settling hide expires at the bound, and a merge-window test asserting steady typing across the window boundary splits into separate undo transactions. Full existing suite for both touched packages (ui-conversation,web-react) still passes (456 tests). Also manually verified live against a builtdsh webinstance (bounded-undo behavior, no regression in normal typing/session-switching) usingagent-browser.Per
CONTRIBUTING.mdI'm not opening a PR — posting the diff here instead in case it's useful:Fork branch: https://github.com/raktim-mondol/deepseek-harness/tree/fix/web-composer-draft-loss
Diff: raktim-mondol/deepseek-harness@master...raktim-mondol:deepseek-harness:fix/web-composer-draft-loss
Happy to expand on any of the three or split them apart if that's more useful for triage.
All reactions