Skip to content

Migration guide: untouched fields, throws after dispose, reset, field streams, disposing subforms - #98

Merged
KamilSztandur merged 2 commits into
mainfrom
migration-guide-gaps
Sep 28, 2026
Merged

KamilSztandur merged 2 commits into
mainfrom
migration-guide-gaps

Conversation

@KamilSztandur

@KamilSztandur KamilSztandur commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Two ports from 0.1.x compiled fine and then surprised people at runtime, in the same five places. The guide either did not mention them or hid them in one sentence in the middle of a section:

  • a field loaded from the server stopped reacting to the fields it depends on, silently;
  • setValue after an await threw on a screen that had closed;
  • resetAll() left fields read-only and left the validation mode on;
  • porting field.stream.distinct().listen(...) to addListener brought back the old bug of reacting to markReadOnly();
  • a dynamic list of subforms piled up detached controllers until the parent died.

Solution

Each one gets a checklist item at the top of MIGRATION.md and a section with a before/after: the untouched-field gate with the validate()-from-a-listener recipe and its limits, the full list of what throws after dispose() with the isDisposed guard, addRelation as the first port for a field stream, and removeSubform plus dispose() for a section that is gone for good. The short copy on the website gets the same bullets.

What it is like now

Someone porting an edit screen reads the checklist, finds "review subscribeToFields on prefilled fields" and "guard late writes", and does not spend an afternoon in the debugger.

Design decisions

None in the package. The behaviours described are the ones 0.2.x already has, and the guide now says so up front. The listener recipe relies on the validate() fix in #96, so this merges after it.

🤖 Generated with Claude Code

The untouched-field gate, throws after dispose, reset keeping readOnly
and the mode, addRelation as the port for field streams, and disposing
a subform that is gone for good. In the checklist and in the sections.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@KamilSztandur KamilSztandur changed the title Migration guide: say the things that broke edit screens Migration guide: untouched fields, throws after dispose, reset, field streams, disposing subforms Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Docs preview: https://advanced-forms-fc7xkjsoc-leancode.vercel.app

Built from 84eb35c; the landing page is at /, the docs under /docs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@KamilSztandur
KamilSztandur merged commit 17352a8 into main Sep 28, 2026
5 checks passed
@KamilSztandur
KamilSztandur deleted the migration-guide-gaps branch September 28, 2026 15:58
@KamilSztandur KamilSztandur mentioned this pull request Sep 29, 2026
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