Repository navigation
codelessly_sdk 7.0.1: build the canvas from the resolved node registry - #60
Merged
Merged
Conversation
On web release builds every published layout failed with "Node with id not found": the layout was replaced by a freshly decoded copy with the same lastUpdated, didUpdateWidget did not reload it, and the canvas was built from that copy, whose nodes have no parent links. Read the canvas from the node registry, which loadLayout resolved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A67XoQYsLVvoMtiKcXXUxY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On web release builds, every published layout loaded by slug (e.g. on CodelesslySite) failed with
Exception: Node with id not foundand rendered the grey error screen. Debug builds were fine.Cause:
CodelesslyLayoutBuilderresolves parent links inloadLayoutand stores the nodes innodeRegistry. The layout can then be replaced by a freshly decoded copy with the samelastUpdated, whichdidUpdateWidgetdeliberately does not reload. ThecanvasNodegetter read fromwidget.layout, so the canvas came from that copy, whose nodes have no parent links.PassiveRectangleWidgetthen calledgetNode('').Fix:
canvasNodereads the canvas fromnodeRegistry(the resolved node) and falls back towidget.layoutonly when it isn't registered. No state is reset.Version bumped to 7.0.1 with a changelog entry.
Test plan
flutter analyze lib: no issues;flutter test: 34 passed.5stars,Apex,2911warriors,0bgmlki1muer): all failed on 7.0.0, all render with this change.🤖 Generated with Claude Code
https://claude.ai/code/session_01A67XoQYsLVvoMtiKcXXUxY
Generated by Claude Code