Skip to content

feat(agent-leaf): render via mount(el,props) hand-off under a Vue 2.7 host (fixes #44) - #47

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feat/agent-leaf-mount-render
Jul 26, 2026
Merged

feat(agent-leaf): render via mount(el,props) hand-off under a Vue 2.7 host (fixes #44)#47
rubenvdlinde merged 1 commit into
developmentfrom
feat/agent-leaf-mount-render

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

Flip the Hermiq hermiq-agent render leaf from an SFC render-surface to the new renderMode: '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 (host CnLeafMountHost + registry validation), openregister LeafDescriptor.renderMode (PR#2129), and ADR-066 Decision #7.

Changes

  • src/integration-leaf.js — register renderMode: 'mount' with a mount(el, props) / unmount(el) pair instead of tab/widget SFC refs. mount() createApp()s Hermiq's own Vue 3 app rooted at the host-owned element:
  • 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 RENDER_MODE_* constants + getRenderMode(); listener test asserts renderMode 'mount'.
  • Fixes pre-existing phpcs errors: missing @param $agentMaxTokens docs on four ProviderFactory driver methods.

The agent-leaf webpack entry stays self-contained (excluded from splitChunks) so the globally-injected bundle inlines its own framework and its registerIntegration fires synchronously.

Verification

  • npm run build — webpack compiled (exit 0); agent-leaf entrypoint emits only hermiq-agent-leaf.js (self-contained; zero deferred chunk loads).
  • PHPUnit (nextcloud:34 container): full unit suite 1118 tests OK, 3422 assertions; listener test 2/2, 9 assertions.
  • phpcs on lib/: 0 errors.
  • phpstan level 5 vs baseline: clean (exit 0).
  • npm run check:specs: PASS.
  • Live: served OpenRegister exposes the leaves capability with renderMode; deploying this listener flips hermiq-agent to renderMode: 'mount'.

Cross-Vue-major in-browser render is verified jointly with the host deploy (host owns browser-1).

… 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.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/hermiq @ 0b5c7ef

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.

@rubenvdlinde
rubenvdlinde merged commit 06ad9ab into development Jul 26, 2026
16 of 26 checks passed
@rubenvdlinde
rubenvdlinde deleted the feat/agent-leaf-mount-render branch July 26, 2026 09:31
@rubenvdlinde
rubenvdlinde restored the feat/agent-leaf-mount-render branch August 8, 2026 16:22
@rubenvdlinde
rubenvdlinde deleted the feat/agent-leaf-mount-render branch August 14, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent leaf tab BODY throws under OR's Vue — cross-Vue-bundle trap (reading 'unavailable' of undefined)

1 participant