You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(apps): restore carried drafts into forms that are already drawn #662
The draft handoff from #645 restores drafts only into forms that sync after carry().
RemoteAppView/index.tsx:35-39 calls forms.carry() in a layout effect. RemoteForm attaches and syncs in its own layout effects (RemoteAppView/Components/RemoteFormElements.tsx:28-45). If the form is in the same commit, the child effects run first.
remote-forms.ts:246 restores carried drafts only when the form has no previous props, and carry() (:340-342) only replaces the carried set. So a form that is already drawn when carry() runs never gets its draft, and no notice appears.
No production path triggers this today as far as traced: a fresh frame mounts with an empty store. A re-shown <Activity> subtree (AuthenticatedLayout/index.tsx:42-45) and future prewarmed frames for new generations would.
Drafts are also restored into readonly forms (:246-266), and field types are not checked against the new generation (:254).
Proposal
Make carry() reconcile forms that are already attached and notify their listeners.
Skip readonly forms and fields whose type changed; report them as dropped.
Clear carried entries once the carry result is known.
Acceptance
Test: mount RemoteAppView with a store that already holds a top-level ui-form and a draft handoff: the draft is restored and the notice appears.
Tests: a readonly form and a field whose type changed are not restored and are listed as dropped.
Activity