Pending pulse animation for pre-hydration clicks

Buttons clicked before hydration get a subtle pulse animation
(sx-pending class) showing the click was captured. The animation
is removed when the click is replayed after hydration, or cleared
on boot completion as a fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 15:49:02 +00:00
parent 5ca6952217
commit 27059c0581
3 changed files with 14 additions and 3 deletions

View File

@@ -506,9 +506,14 @@
(when entry
(let ((target (host-get entry "t")))
(when (and target (host-get target "isConnected"))
(dom-remove-class target "sx-pending")
(host-call target "click")))))
(loop (+ i 1)))))))
(host-set! (dom-window) "_sxQ" nil))))))
(host-set! (dom-window) "_sxQ" nil)
;; Clear any remaining pending indicators
(for-each (fn (el) (dom-remove-class el "sx-pending"))
(dom-query-all (dom-body) ".sx-pending")))))))
;; --------------------------------------------------------------------------