#1451·eww

`:visible` updates are lost for widgets inside a closed revealer (stale value applied at first map)

Author: 61021Created Jul 25, 2026Updated Jul 25, 2026

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report

Description of the bug

:visible updates issued while a widget is not yet mapped — most commonly a child of a closed revealer — are silently overwritten when the widget finally maps. The initial :visible value is evaluated at build time and re-applied at the widget's first map (connect_first_map in widget_definitions.rs, needed to survive the window's show_all). But that first map can happen long after build, and the captured snapshot clobbers every reactive update made in between.

Concrete symptom: with (defvar vis false), setting vis=true while the revealer is closed, then revealing → the widget stays hidden even though eww state says vis: true. Toggling vis again while revealed works fine (the stale one-shot map handler has been consumed by then), which makes the bug look intermittent.

The reverse order (hide while closed) happens to behave correctly, because a hidden widget never maps, so the stale handler stays dormant — the asymmetry is what makes this so confusing to debug in a real config.

Reproducing the issue

; eww.yuck
(defvar reveal false)
(defvar vis false)

(defwindow repro
  :monitor 0
  :stacking "overlay"
  :geometry (geometry :x "40px" :y "80px" :width "280px" :height "170px" :anchor "top left")
  (box :orientation "v" :space-evenly false
    (label :text "reveal: ${reveal} / vis: ${vis}")
    (revealer :reveal reveal :transition "slidedown" :duration "150ms"
      (box :orientation "v" :space-evenly false
        (label :text "inside revealer:")
        (label :visible vis :text ">>> TOGGLE-ME <<<")))))
bash
$ eww --config <dir> daemon --no-daemonize &
$ eww --config <dir> open repro
$ eww --config <dir> update vis=true      # while the revealer is closed
$ eww --config <dir> update reveal=true   # TOGGLE-ME should appear — it does not

Reproduced on the v0.6.0 release binary and on current master (48f5aa8):

after vis=true + reveal=true (master)
before

The header says vis: true but >>> TOGGLE-ME <<< is missing.

Expected behaviour

The widget reflects the current value of :visible when it becomes visible/mapped — same as if the update had been issued while revealed:

same sequence with the fix
after

Additional context

Root cause is the build-time capture in resolve_widget_attrs (crates/eww/src/widgets/widget_definitions.rs): the first-map handler applies a visible value snapshotted at build. I have a small fix (share the latest value in a cell that reactive updates write to) with before/after verification — PR incoming.