Skip to content

Master fix ged#1877

Merged
mcm-odoo merged 2 commits into
masterfrom
master-fix-ged
May 5, 2026
Merged

Master fix ged#1877
mcm-odoo merged 2 commits into
masterfrom
master-fix-ged

Conversation

@ged-odoo
Copy link
Copy Markdown
Contributor

@ged-odoo ged-odoo commented May 5, 2026

No description provided.

ged-odoo added 2 commits May 5, 2026 13:10
In Owl 2, reactivity was tracked per-component-instance: when state read by
a descendant or by slot content was mutated, the parent that owned the
state re-rendered as a whole and its `patched` hook fired. In Owl 3, signal
reads subscribe whichever component is currently rendering, so a parent
that merely holds a signal is no longer re-rendered just because a child or
slot reads it — and its `onPatched` no longer fires.

The hooks still work as documented (they fire when the component's own
bdom is patched), but the surrounding behavior changed enough that code
ported from Owl 2 can silently stop reacting. Documents the new scope and
points readers at `effect` for value-driven side effects.

- reference/component.md: scope subsection on `patched`, with the
  slot+signal example, plus a "what `patched` is for vs. when to reach
  for `effect`" subsection. `willPatch` cross-references the same rules.
- migration_owl2_to_owl3.md: new entry #22 with the same example, an
  explanation of why Owl 2 behaved differently, and an `onPatched` →
  `effect` migration recipe.
When a child component has defaultProps and any willUpdateProps hook, the
update path applied defaults onto the incoming props object and assigned
that augmented object to node.props. On the next parent render,
arePropsDifferent walked the stored props and found ghost diffs on the
default keys (the new fresh props don't carry them), re-rendering the
child every time.

Only paths that iterate every key trip the bug: t-props (dynamic prop
list) and slots-prop. The static propList path was unaffected, since it
only compares listed keys.

Pass effective (defaults-applied) props to the hooks but keep node.props
raw — defaults are already resolved lazily by the prop()/props() getters
reading node.props, matching what the initial render does.
@mcm-odoo mcm-odoo merged commit 08c8b60 into master May 5, 2026
2 checks passed
@mcm-odoo mcm-odoo deleted the master-fix-ged branch May 5, 2026 11:39
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.

2 participants