fix: await initializeStores() before mounting Vue#165
Merged
Conversation
App.vue's `async created() { await initializeStores() }` was insufficient
to guarantee the lib's shared object store had its types registered
before child components run. Vue doesn't wait for an async `created()`
hook to resolve before mounting children — so a child like LiveMeeting
ran its own `created()` (which calls `fetchObject('meeting', this.id)`
and three `subscribe(...)` calls) BEFORE App.vue's awaited
`initializeStores()` had a chance to call `registerObjectType('meeting',
...)`. The lib correctly threw "Object type 'meeting' is not registered"
and the page rendered with empty `meeting = {}` + fallback header.
Awaiting `initializeStores()` in main.js before `$mount('#content')`
guarantees the store is hot by the time any child's `created()` fires.
The App.vue call stays in place — `initializeStores()` is documented
idempotent, and the second await harmlessly resolves immediately.
Surfaced while running the canonical decidesk LiveMeeting two-browser
demo against the live notify_push stack: browser-1 received the
authenticated WS frame for `or-object-{meetingUuid}` correctly, but
the page couldn't react because the store wasn't initialised.
Contributor
Quality Report — ConductionNL/decidesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ❌ | ❌ | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-10 11:40 UTC
Download the full PDF report from the workflow artifacts.
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.
App.vue's async
await initializeStores()increated()raced with child components: Vue mounts children before async created() hooks resolve, so LiveMeeting.created() calledfetchObject('meeting', ...)andsubscribe(...)beforeregisterObjectType('meeting', ...)had run. The lib correctly threw 'Object type meeting is not registered' and the page rendered with empty data.Now awaiting in main.js before
$mount('#content'). App.vue's call stays in place as documented-idempotent safety net.Surfaced while running the canonical decidesk LiveMeeting two-browser e2e against live notify_push.