You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix HMR view-name resolution + split watch from artifactWatch
The blocked verify-hmr-visual smoke test (edit a view in dev mode →
expect API to return fresh value < 1s) was failing for two reasons.
1. View bundles in the compiled artifact have no top-level \`name\` —
their identity is the target object encoded under \`list.data.object\`
(same convention used by ObjectQL.SchemaRegistry.resolveMetadataItemName).
MetadataPlugin._parseAndRegisterArtifact had a naive
so MetadataService.get('view', X) always returned undefined and
the read path fell through to the boot-only SchemaRegistry copy.
Derive the registration key from \`list.data.object\` (or
\`form.data.object\`) when no top-level \`name\` is present.
2. Enabling MetadataPlugin's \`watch\` to pick up dist/objectstack.json
changes also turned on NodeMetadataManager's recursive source-file
scan, which polling-scanned the entire project root (incl.
node_modules) and either hung startup or hit EMFILE on macOS.
Split into two flags:
- \`watch\`: source-file scanner (default false; opt-in)
- \`artifactWatch\`: cheap single-file watcher on the compiled
artifact (auto-enabled in dev by StandaloneStack)
Also pre-emptively switch the CLI dev watcher and NodeMetadataManager
to chokidar polling — native fs.watch hits EMFILE on busy macOS hosts
where parallel node processes saturate the FD pool.
Regression test in packages/metadata/src/plugin.test.ts asserts that
a view artifact item with no top-level \`name\` lands in MetadataManager
under its target-object key.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments