Databound value is not applied to a newly visible nested artboard instance unless the source valu...

Rive Editor / Runtime (observed in nested artboard instance workflows)

Summary

When a nested artboard instance becomes visible for the first time, a databound target property can remain at its design-time/default value even though the source ViewModel property already has the correct value.

The target updates only after the source undergoes a real value delta (A -> B -> A), which indicates missed initial synchronization for that instance.

Minimal Reproduction

1. Create child artboard "Child".

2. Add node "N" in Child with a transform property (for example N.y) set to a design-time default D.

3. Add ViewModel "ChildVM" with numeric property "p".

4. Bind ChildVM.p -> N.y.

5. Add a script on Child that sets p to V during init.

6. Create parent artboard "Parent" with multiple nested instances of Child, each with its own ChildVM instance.

7. Start with one nested instance hidden; show it later at runtime (without changing p).

8. Observe: N.y on that instance remains D instead of V.

9. Change p to another value and back (for example V + epsilon, then V).

10. Observe: binding starts working and N.y snaps to V.

Expected Behavior

Each nested instance should synchronize its databound targets from current ViewModel state when it becomes active/visible, even if source value did not change in that frame.

Actual Behavior

Target remains stale (design-time/default value) until source property changes by a non-zero delta.


This behavior appears inconsistent with the runtime's dirt/update model in the

official C++ source:

- DataBind::addDirt schedules updates through the container.

- DataBindContainer::updateDataBinds processes dirty bindings.

- DataBind::collapse includes a re-activation path that re-queues dirty binds.


Given that model, a newly active nested instance should not remain visually

stale when source state is already valid for that instance.


Current Workaround

Force a tiny temporary delta before writing final value:

prop.value = target + 0.01

prop.value = target

This reliably forces a push, but should not be required for correctness.


Requested Fix

On nested instance activation/visibility transition, force a one-time to-target sync from current source value (even when source value is unchanged), or ensure pending initial dirt is applied for that instance.


Official Runtime Source References

https://github.com/rive-app/rive-runtime/blob/main/src/data_bind/data_bind.cpp

https://github.com/rive-app/rive-runtime/blob/main/src/data_bind/data_bind_container.cpp

https://github.com/rive-app/rive-runtime/blob/main/src/data_bind/data_bind_context.cpp

https://github.com/rive-app/rive-runtime/blob/main/src/nested_artboard.cpp