Skip to content

fix: resolve existing placeholders when merge fields are registered after load#133

Merged
dazzatronus merged 1 commit into
mainfrom
derk/merge-field-refresh
Jul 2, 2026
Merged

fix: resolve existing placeholders when merge fields are registered after load#133
dazzatronus merged 1 commit into
mainfrom
derk/merge-field-refresh

Conversation

@dazzatronus

Copy link
Copy Markdown
Contributor

Registering a merge field directly on the service (mergeFields.register) updates the registry but nothing re-resolves clips that already contain the placeholder — the canvas keeps showing literal {{ braces }} until the clip re-renders for an unrelated reason (e.g. selecting it routes through the toolbar's resolve path).

Adds Edit.refreshMergeFields(): re-runs load-time placeholder detection over the document, updates clip bindings, and resolves — the Resolved event drives the player reconciler and timeline repaint, the same mechanism SetMergeFieldCommand relies on. The document keeps placeholders; only the resolved view and bindings change.

Verified with a regression test (placeholder literal after load with no merge array; registered + refreshed → resolved on the resolved clip, document still holds the placeholder and serialises the merge entry). Full suite: 1814 tests pass, typecheck and lint clean.

@dazzatronus dazzatronus merged commit 92aa9fe into main Jul 2, 2026
1 check passed
@dazzatronus dazzatronus deleted the derk/merge-field-refresh branch July 2, 2026 11:23
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.12.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant