Skip to content

[0.42-r2 M5] network-failure catch reloads the page and loses in-flight form input without an event #585

Description

@SisyphusZheng

Severity: medium · Category: framework design issue

Evidence. entry-generators.ts: the submit chain's catch does window.location.reload() unconditionally — a transient network failure discards the user's unsaved input elsewhere on the page and gives the app no hook.

Fix. Dispatch a cancelable open:action-error CustomEvent on the form (detail { error, form }) before the reload; preventDefault() suppresses the reload so apps can show their own retry UI. Default behavior (reload) is unchanged. Document in MORPH_CONTRACT.


Filed from the 0.42 round-2 review (docs/audit/2026-07-28-alpha5-round2-review.md). Target line: 0.42.0-alpha.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.42.0-alpha.60.42 round-2 review remediation (morph client hardening)architecturebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions