nandi/frqpublic Fork 0
be8da43
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Build the pill row eagerly, so a hover is a read the row records

The pills are the one place in this file that reads a ratom inside a `for`
body rather than above it: each asks `hovering-reaction?` whether the card
belongs to it. A read that happens while a lazy seq is realised somewhere
other than the render is a read the component never records, so nothing
subscribed, and the row went on showing what it showed before the pointer
arrived — the card never appeared however long you rested on a pill.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-10T10:58:29-07:00 Browse files
be8da43 parent: eb6778a
modified src/frq/app.clj +10 -2
@@ -563,7 +563,15 @@
563563 Twemoji pack, in colour, where a label gets whatever the text font has."
564564 [channel m]
565565 (let [reactions (:reactions m)]
566- [:hbox {:key :pills :spacing (chip-gap)}
566+ ;; `into` and not a lazy `for` inside the vector. The pills read
567+ ;; `hovering-reaction?` — a ratom — and a ratom read while a lazy seq is
568+ ;; being realised somewhere other than the render is a read the component
569+ ;; never records, so the row went on showing what it showed before the
570+ ;; pointer arrived. It is the one place in this file whose ratom read is
571+ ;; inside the `for` body rather than above it, which is why it is the one
572+ ;; place that needs this.
573+ (into
574+ [:hbox {:key :pills :spacing (chip-gap)}]
567575 (for [emoji (sort (keys reactions))]
568576 [:reaction (cond-> {:key emoji
569577 :emoji emoji
@@ -581,7 +589,7 @@
581589 ;; whatever children the node has, and a channel's worth of unseen
582590 ;; lists is a tree nobody looks at.
583591 (when (and (platform/desktop?) (s/hovering-reaction? (:id m) emoji))
584- [reactor-card emoji (get reactions emoji)])])]))
592+ [reactor-card emoji (get reactions emoji)])]))))
585593
586594 (def ^:private picker-columns
587595 "Emoji to a row, at the picker's own size. Narrow enough that the grid fits a
@@ -563,7 +563,15 @@
563 Twemoji pack, in colour, where a label gets whatever the text font has."563 Twemoji pack, in colour, where a label gets whatever the text font has."
564 [channel m]564 [channel m]
565 (let [reactions (:reactions m)]565 (let [reactions (:reactions m)]
566- [:hbox {:key :pills :spacing (chip-gap)}566+ ;; `into` and not a lazy `for` inside the vector. The pills read
567+ ;; `hovering-reaction?` — a ratom — and a ratom read while a lazy seq is
568+ ;; being realised somewhere other than the render is a read the component
569+ ;; never records, so the row went on showing what it showed before the
570+ ;; pointer arrived. It is the one place in this file whose ratom read is
571+ ;; inside the `for` body rather than above it, which is why it is the one
572+ ;; place that needs this.
573+ (into
574+ [:hbox {:key :pills :spacing (chip-gap)}]
567 (for [emoji (sort (keys reactions))]575 (for [emoji (sort (keys reactions))]
568 [:reaction (cond-> {:key emoji576 [:reaction (cond-> {:key emoji
569 :emoji emoji577 :emoji emoji
@@ -581,7 +589,7 @@
581 ;; whatever children the node has, and a channel's worth of unseen589 ;; whatever children the node has, and a channel's worth of unseen
582 ;; lists is a tree nobody looks at.590 ;; lists is a tree nobody looks at.
583 (when (and (platform/desktop?) (s/hovering-reaction? (:id m) emoji))591 (when (and (platform/desktop?) (s/hovering-reaction? (:id m) emoji))
584- [reactor-card emoji (get reactions emoji)])])]))592+ [reactor-card emoji (get reactions emoji)])]))))
585 593
586 (def ^:private picker-columns594 (def ^:private picker-columns
587 "Emoji to a row, at the picker's own size. Narrow enough that the grid fits a595 "Emoji to a row, at the picker's own size. Narrow enough that the grid fits a