Files
DeepTutor/web/hooks
ZQR1101 7edddbec61 fix(web): pin chat to late-mounted quiz cards (#960)
* fix(web): pin chat to late-mounted quiz cards

QuizViewer loads after the 4s post-stream scroll window, so mastery quiz cards stay below the fold until the user scrolls. Watch [data-chat-grow] for 12s without re-pinning unrelated details expands.

Related to #955

* fix(web): extend the existing post-stream window for late viewers

The post-stream effect already existed for exactly this case — its comment
names QuizViewer — so a second, parallel MutationObserver with its own 12s
window meant two observers racing for the same pin, each unaware of the
other's deadline.

Fold the extension into that one effect: the window starts at 4s and only a
*newly appearing* ``[data-chat-grow]`` node pushes it out to 12s. Gating on
appearance rather than presence matters — presence alone is satisfied
permanently by any quiz card from an earlier turn, which would have re-pinned
the user on every later DOM mutation, the precise mis-classification the
short window exists to avoid. The teardown timer follows the current
deadline, so a turn with no late viewer stops observing at 4s as before.

---------

Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
Co-authored-by: Frank <bingxizhao@novix.science>
2026-08-24 16:52:00 +08:00
..
2026-06-11 20:03:34 +08:00
2026-06-18 00:22:48 +08:00
2026-07-31 00:25:48 +08:00
2026-08-17 11:22:26 +08:00
2026-08-10 00:47:37 +08:00
2026-08-19 17:34:52 +08:00
2026-08-02 13:23:45 +08:00
2026-04-23 19:29:16 +08:00
2026-08-20 14:15:53 +08:00
2026-06-17 10:50:44 +08:00