mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 05:49:26 +08:00
* 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>