Repository navigation
Conversation
pkaminski
left a comment
There was a problem hiding this comment.
@pkaminski reviewed 9 files and all commit messages.
Reviewable status: 0 of 9 files reviewed, all discussions resolved (waiting on pkaminski).
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| assert.equal(tree.getObject('/foo'), null); | ||
| assert.equal(tree.getObject('/foo/bar'), undefined); | ||
|
|
||
| tree._plantValue('/foo', 'foo', {bar: 'ready'}, tree.root, false, false, false, []); | ||
| assert.equal(tree.getObject('/foo/bar'), 'ready'); |
There was a problem hiding this comment.
Updated the regression test in fa3dd09. A model's beforeCreate hook registers a Vue watcher while _plantValue() has the parent slot set to null. The watcher initially reports undefined for the descendant, then reports 'ready' after Vue.nextTick() once the snapshot is integrated. All 80 tests and lint passed. Removing the null guard reproduced the $data TypeError in this test.
pkaminski
left a comment
There was a problem hiding this comment.
@pkaminski made 1 comment.
Reviewable status: 0 of 9 files reviewed, 1 unresolved discussion.
src/Tree.js line 600 at r1 (raw file):
for (const segment of segments) { // An intermediate model can still be a null placeholder during creation. if (segment && object === null) return;
Point me to where we create null placeholders.
pkaminski
left a comment
There was a problem hiding this comment.
@pkaminski+CODX made 2 comments and resolved 1 discussion.
Reviewable status: 0 of 9 files reviewed, all discussions resolved.
src/Tree.js line 600 at r1 (raw file):
Previously, pkaminski (Piotr Kaminski) wrote…
Point me to where we create null placeholders.
Tree._plantValue() in src/Tree.js sets the parent's child slot to null just before _createObject(), then replaces it with the new model. The temporary reactive slot lets $$touchThis() subscribe through the parent while the model is being created.
| assert.equal(tree.getObject('/foo'), null); | ||
| assert.equal(tree.getObject('/foo/bar'), undefined); | ||
|
|
||
| tree._plantValue('/foo', 'foo', {bar: 'ready'}, tree.root, false, false, false, []); | ||
| assert.equal(tree.getObject('/foo/bar'), 'ready'); |
There was a problem hiding this comment.
Updated the regression test in fa3dd09. A model's beforeCreate hook registers a Vue watcher while _plantValue() has the parent slot set to null. The watcher initially reports undefined for the descendant, then reports 'ready' after Vue.nextTick() once the snapshot is integrated. All 80 tests and lint passed. Removing the null guard reproduced the $data TypeError in this test.
pkaminski
left a comment
There was a problem hiding this comment.
@pkaminski reviewed 1 file and all commit messages.
Reviewable status: 0 of 9 files reviewed, all discussions resolved.
Firetruss inserts a null slot before constructing a model. A reactive lookup of a descendant during that interval dereferenced the null slot as a model. A lookup below the slot now returns undefined and retains the reactive read that can observe its replacement. A lookup of the slot itself still returns null.
The regression reproduces the exception before the change and verifies that the same lookup returns the value once the model is populated. All 80 Firetruss tests passed. Lint and distribution generation completed. The package version is 8.3.1.
Sentry
The application still needs to consume and deploy a release containing this change before either SaaS issue can be resolved.
This change is