feat(agent-leaf): render via mount(el,props) hand-off under a Vue 2.7 host (fixes #44) - #47
Merged
Merged
Conversation
… host (fixes #44) Hermiq is Vue 3 while the OpenBuild/OpenRegister host is Vue 2.7. A Vue-3 SFC handed to the host is interpreted under the host's incompatible Vue runtime and renders blank (hermiq#44). Adopt the leaf-mount-render escape hatch shipped in @conduction/nextcloud-vue@1.0.0-beta.223 + openregister LeafDescriptor.renderMode (PR#2129) + ADR-066 Decision #7: - src/integration-leaf.js: register renderMode 'mount' with a mount(el, props) / unmount(el) pair instead of the tab/widget SFC refs. mount() createApp()s Hermiq's OWN Vue 3 app rooted at the host-owned element (chat tab for the single-entity sidebar surface, run-history widget for detail-page/dashboard surfaces), keyed in a per-element Map so the same leaf can mount into several elements; unmount() destroys the instance for that element and is guarded against a double-unmount. - lib/Listener/RegisterAgentLeafListener.php: declare renderMode LeafDescriptor::RENDER_MODE_MOUNT so the server descriptor matches the JS registration under the shared id hermiq-agent (gate-24 integration-parity). - tests: stub LeafDescriptor gains the RENDER_MODE_* constants + getRenderMode(); listener test asserts renderMode 'mount'. The agent-leaf webpack entry stays self-contained (excluded from splitChunks) so the globally-injected bundle inlines its own framework and its registration fires synchronously. Also fixes pre-existing phpcs errors: missing @PARAM $agentMaxTokens docs on four ProviderFactory driver methods.
Contributor
Quality Report — ConductionNL/hermiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ❌ | ❌ 1/117 denied | |||
| npm | ✅ | ❌ 1/659 denied | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
❌ Denied composer licenses
| Package | Version | License |
|---|---|---|
| smalot/pdfparser | v2.12.5 | LGPL-3.0 |
❌ Denied npm licenses
| Package | Version | License |
|---|---|---|
| vue3-apexcharts | 1.11.1 | Custom: https://apexcharts.com/media/vue-apexcharts.png |
Quality workflow — 2026-07-26 09:29 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.
What
Flip the Hermiq
hermiq-agentrender leaf from an SFC render-surface to the newrenderMode: 'mount'micro-frontend hand-off, so its agent-chat tab (and run-history widget) render under the Vue-2.7 OpenBuild/OpenRegister host. Hermiq is Vue 3; a Vue-3 SFC handed to the host is interpreted under the host's incompatible Vue runtime and renders blank — fixes #44 systemically.Consumes the contract shipped as
@conduction/nextcloud-vue@1.0.0-beta.223(hostCnLeafMountHost+ registry validation),openregisterLeafDescriptor.renderMode(PR#2129), and ADR-066 Decision #7.Changes
src/integration-leaf.js— registerrenderMode: 'mount'with amount(el, props)/unmount(el)pair instead oftab/widgetSFC refs.mount()createApp()s Hermiq's own Vue 3 app rooted at the host-owned element:single-entity(object sidebar) surface →CnAgentChatTab(the tool-free chat, Agent leaf tab BODY throws under OR's Vue — cross-Vue-bundle trap (reading 'unavailable' of undefined) #44's blank surface)detail-page/app-dashboard/user-dashboardsurfaces →CnAgentRunsWidgetMap(the same leaf may mount into several elements at once);unmount()destroys the instance for that element, guarded against double-unmount.lib/Listener/RegisterAgentLeafListener.php— declarerenderMode: LeafDescriptor::RENDER_MODE_MOUNTso the server descriptor matches the JS registration under the shared idhermiq-agent(gate-24 integration-parity).LeafDescriptorgainsRENDER_MODE_*constants +getRenderMode(); listener test assertsrenderMode 'mount'.@param $agentMaxTokensdocs on fourProviderFactorydriver methods.The
agent-leafwebpack entry stays self-contained (excluded from splitChunks) so the globally-injected bundle inlines its own framework and itsregisterIntegrationfires synchronously.Verification
npm run build— webpack compiled (exit 0);agent-leafentrypoint emits onlyhermiq-agent-leaf.js(self-contained; zero deferred chunk loads).phpcsonlib/: 0 errors.phpstanlevel 5 vs baseline: clean (exit 0).npm run check:specs: PASS.renderMode; deploying this listener flipshermiq-agenttorenderMode: 'mount'.Cross-Vue-major in-browser render is verified jointly with the host deploy (host owns browser-1).