Skip to content

Bugfix/improvements data management#29

Merged
hexplus merged 31 commits into
mainfrom
bugfix/improvements-data-management
May 29, 2026
Merged

Bugfix/improvements data management#29
hexplus merged 31 commits into
mainfrom
bugfix/improvements-data-management

Conversation

@hexplus
Copy link
Copy Markdown
Owner

@hexplus hexplus commented May 29, 2026

Description

Fixes per-run dependency tracking for DOM bindings. Reactive children (() => value), reactive class/style getters, and watch previously subscribed only to the signals read on their first evaluation: a signal first read on a later run (e.g. a conditional branch that becomes live after a state change) was never subscribed, so updates to it didn't re-render. Stale deps were also never pruned.

Root cause: these bindings registered their body as the subscriber via track(commit). On re-notification the body ran with no tracking context (currentSubscriber === null), so recordDependency was a no-op and the dependency set was frozen after the first run — unlike derived/effect, which re-run through retrack.

Fix (centralized): track()'s no-explicit-subscriber path now uses a self-re-tracking subscriber (reactiveBinding), so every re-run re-tracks deps — newly-read signals subscribe, abandoned ones prune. Also resolves query() data not reaching a status-branching consumer (if (q.loading()) …; return List(q.data())).

Additionally adds a dev-mode warning (tree-shaken in production) when a lone string argument looks like a CSS class list (div("space-y-6")), since a lone string is a text child — surfacing the footgun without changing behavior. Mirrored in sibujs-ui via normalizeArgs.

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read CONTRIBUTING.md
  • My code builds without errors
  • I have tested my changes
  • I have updated documentation if needed

hexplus added 30 commits March 28, 2026 15:11
@hexplus hexplus merged commit 66562c8 into main May 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant