fix: migrate docudesk to @conduction/nextcloud-vue useObjectStore#130
Conversation
Quality Report — ConductionNL/docudesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 108/108 | |||
| npm | ✅ | ✅ 529/529 | |||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Coverage: 0% (0/10 statements)
Quality workflow — 2026-05-10 09:10 UTC
Download the full PDF report from the workflow artifacts.
Review — fix: migrate docudesk to @conduction/nextcloud-vue useObjectStoreVerdict: 🟢 APPROVE — Zuivere additieve migratie die het side-by-side patroon van zaakafhandelapp #190 correct spiegelt. Alle 7 object-type registraties kloppen met docudesk_register.json. Geen backwards-compat regressies. Eén 🟡 concern over een potentiële race condition bij de idempotency guard die in een follow-up gefixed kan worden. Wat goed gaatUitstekend voorbereid: heldere openspec-change (proposal + design + tasks + spec), alle 7 type-registraties exact gespiegeld uit docudesk_register.json, onderbouwd liveUpdatesPlugin-deferral met file-level comment die de exacte fix-locatie aanwijst, volledige Pinia store-id isolatie ('docudesk-objects' — geen collision met legacy stores of de lib-default), én het SPDX-header correct aan store.js toegevoegd. Het PR-lichaam is exemplarisch in het documenteren van de waarom-keuze (side-by-side vs full vs thin-wrap) en de Phase 2 cutover-triggers. Findings1. 🟡 Concern — initializeStores() idempotency guard beschermt niet tegen gelijktijdige aanroepen —
|
MWest2020
left a comment
There was a problem hiding this comment.
Zie consolidated review comment voor complimenten, findings en suggested fixes.
… side-by-side) Add the lib's useObjectStore to docudesk's pinia ecosystem alongside the existing eight legacy docudesk-specific stores. Boot the lib store with the canonical OpenRegister base URL and register the seven OR-backed object types declared in lib/Settings/docudesk_register.json (consent, signing-request, signer-record, signing-audit-entry, template, correspondence, huisstijl) under their respective register slugs. Phase 1 is purely additive: - src/store/store.js re-exports useObjectStore alongside the existing legacy *Store exports; legacy consumers see zero behavioural change. - src/main.js calls initializeStores() before mount using the fire-and-forget try/catch pattern (mirrors zaakafhandelapp PR #190); App.vue's existing await is preserved via the helper's idempotency guard. - Pinia store id 'docudesk-objects' is distinct from the lib's default and from every legacy id — no collision risk. Manifest pages, CnIndexPage / CnDetailPage form-dialog save paths, and the lib's sub-resource plugins (audit trails, files, relations, selection) now bind to a known-shape store, eliminating the decidesk #162 class of bug for OR-backed code paths. Lib gap: liveUpdatesPlugin is not yet exported by @conduction/nextcloud-vue@0.1.0-beta.8 (only auditTrailsPlugin, relationsPlugin, filesPlugin, lifecyclePlugin, selectionPlugin, searchPlugin ship in beta.8). The plugin lives on the lib's beta branch but has not been released. Wiring deferred to a follow-up once the next lib release exposes it; the file-level comment in store.js documents the exact line to update on bump. References: - Project memory: feedback_store-pattern.md ("Do not use custom stores") - Decidesk #162: missing fetchObject / live-updates plugin failure - Decidesk PR #163: full thin-wrap migration template - zaakafhandelapp PR #190: side-by-side migration template - procest PR #321 / softwarecatalog PR #219: companion fleet PRs Spec: openspec/changes/docudesk-store-migration/
6ba43cb to
c78c04e
Compare
Quality Report — ConductionNL/docudesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ❌ | ||||
| phpcs | ❌ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ❌ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ❌ | ❌ | |||
| npm | ✅ | ✅ 575/575 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-23 05:47 UTC
Download the full PDF report from the workflow artifacts.
Summary
Phase 1 of the @conduction/nextcloud-vue store migration for docudesk. Mirrors the side-by-side pattern from zaakafhandelapp PR #190 and the project-memory rule feedback_store-pattern.md: adopt the lib's
useObjectStorealongside docudesk's existing eight legacy Pinia stores, register the seven OR-backed object types fromlib/Settings/docudesk_register.jsonagainst the lib store at boot, and leave every legacy store + Vue consumer untouched.Companion fleet migrations just merged: decidesk #163 (thin-wrap), softwarecatalog #219 (spec follow-up), procest #321 (call-site), zaakafhandelapp #190 (side-by-side). Docudesk is the last app in the fleet to adopt.
Why side-by-side and not full / thin-wrap
Docudesk's eight legacy stores (
anonymization,batchAnonymization,consent,folderAnonymization,navigation,settings,signing,template) talk to docudesk-specific REST controllers (/apps/docudesk/api/{anonymization,consents,signing,templates,settings}), not to the OR canonical${baseUrl}/${register}/${schema}/${id}shape. Most expose workflow-specific surface (file queues, batch lifecycle, signing audit trails, version/lock management) with no lib equivalent. A full migration would require rewriting each legacy controller to delegate to OR — multi-week effort, out of scope.A thin-wrap shim has no caller today (no Vue file imports
useObjectStore); adding one would create an unused abstraction.Side-by-side makes the lib store available for any future manifest page, lib component, or sub-resource plugin while keeping the legacy stores running unchanged.
Object types registered
From
lib/Settings/docudesk_register.json:consentpublicationConsentconsentsigning-requestsigningRequestsigningsigner-recordsignerRecordsigningsigning-audit-entrysigningAuditEntrysigningtemplatetemplatetemplatescorrespondencecorrespondencedocumenthuisstijlhuisstijldocumentFiles changed
openspec/changes/docudesk-store-migration/{proposal,design,tasks}.md+specs/docudesk-store-migration/spec.md— full openspec change.src/store/store.js— additive:createObjectStore('docudesk-objects')+useObjectStorere-export,initializeStores()upgraded to register the seven OR types after the existing settings fetch (idempotency-guarded).src/main.js— single fire-and-forgetinitializeStores()call (App.vue's existingawait initializeStores()continues to work via the helper's idempotency guard).No legacy store renamed or deleted. No legacy Vue consumer touched. Pinia store id
'docudesk-objects'(distinct from lib default'conduction-objects'and from every legacy id) — no collision risk.Lib gap (deferred follow-up)
liveUpdatesPluginis not exported by@conduction/nextcloud-vue@0.1.0-beta.8(the version pinned in docudesk's lockfile). beta.8 only exportsauditTrailsPlugin,relationsPlugin,filesPlugin,lifecyclePlugin,selectionPlugin,searchPlugin. The plugin lives on the lib'sbetabranch but has not been released.Wiring is deferred to a follow-up that bumps the lib version + adds
{ plugins: [liveUpdatesPlugin()] }to thecreateObjectStorecall. The file-level comment insrc/store/store.jsdocuments the exact line to update on bump.Validation
npm ci— succeeds (1748 packages installed).npm run lint— clean (zero errors, zero warnings on touched files).npx webpack --mode production— not run (out of scope for this PR; pre-existing build issues are tracked separately).Test plan
useObjectStore().objectTypes— confirm the seven slugs are present (consent,signing-request,signer-record,signing-audit-entry,template,correspondence,huisstijl).useObjectStorePinia store id is'docudesk-objects'(no collision with lib default'conduction-objects').References
feedback_store-pattern.md("Do not use custom stores; use Options API withcreateObjectStore")lib/Settings/docudesk_register.json@conduction/nextcloud-vue@0.1.0-beta.8src/store/useObjectStore.js