Skip to content

fix(apps): restore carried drafts into forms that are already drawn #662

Backlog

Description

@RentnerKev

Problem

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.

Found in the app platform audit of 2026-11-30.

Activity

  1. added
    bug
    area: ui
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: uibug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions