mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-14 04:01:35 +00:00
The first version coupled the layers from two places: a `scroll` listener and a layout effect keyed on the committed draft. Mutation-testing each hook alone against the built client shows the effect never fires the only assignment that matters — with just the layout effect disabled the browser scenario stays green, while disabling just the listener fails it. Both premises behind the effect were wrong. Typing scrolls the caret into view, which is an ordinary `scroll`. A draft that shrinks past the current offset clamps both layers to the same maximum, because their extents are equal — measured in chromium at 964/964, 1012/1012, 844/844 and 820/820 for plain, soft-wrapped, unbreakable-run and highlighted drafts — and the textarea's clamp fires `scroll` too. The hazard the effect was imagined to cover does not exist either: React replacing every child of the backdrop when the decoration set changes shape preserves `scrollTop` (measured: 300 stays 300 through a full child replacement), and the only replacement that zeroes it shrinks the content below the offset, which is the clamp case already covered. The e2e's edit case survives, retitled to say what it actually pins: that typing is not a separate case needing its own mirror. The unit spec now asserts the backdrop tracks a second move back to the top, which a one-shot mirror would fail.