Skip to content

feat(data model): a Data model entry and a Manage object types card reach the register - #2911

Merged
rubenvdlinde merged 5 commits into
parity/round2from
feat/data-model-link
Sep 18, 2026
Merged

rubenvdlinde merged 5 commits into
parity/round2from
feat/data-model-link

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What this adds

Two links out of dossiq into OpenRegister, so an administrator can see the data model without leaving the product.

  • A Data model entry in the Integrations menu section, pointing at OpenRegister's schema pages for the dossiq register.
  • A Manage object types card on the Objects section of the case page and on #CaseObjects, pointing at the same place.

Both are admin-gated. An ordinary handler does not see either one.

Ownership

dossiq builds the links only. The register and schema admin pages belong to OpenRegister and already ship, so this consumes them rather than rebuilding a schema browser here. The manifest pages and widgets stay unbrowsable; that half is noted in the proposal as a remaining gap, not built.

Competitor line

dossiq/data-model-link - GovZaak, Zaaksysteem.nl, xxllnc Zaken: `backend/z, iTop 3.2: pages/schema.p. 11.17 Custom object type management

Verified

  • npx vitest run tests/vitest/dataModelLink.spec.js: 16 passed.
  • Mutation check: renaming the manifest label reddens is declared, and points at the dossiq register, not a setup line. Restored.
  • npx openspec validate data-model-link --strict: valid.
  • npx eslint on the four changed JS files: clean.
  • No PHP in this change.

Deferred

phpmd, psalm, phpstan, whole-tree gates, check:strict and the e2e run are deferred to the sweep that takes parity/round2 to development. The e2e spec tests/e2e/data-model-link.spec.ts is written and tagged, left for the nightly.

🤖 Generated with Claude Code

…each the register

Every dossiq schema is registered in OpenRegister, whose register page lists
each schema with its properties. dossiq had no way in: one cross-app link,
AvgRegisterLink, and nothing pointing at the model itself. Rows Q11.32 and
11.17 of the competitor gap register.

Two doors, one target, both admin-only:

- Data model, in the Integrations section of the settings modal. The `section`
  key stays out of manifest.json because ADR-110 put that decision in
  menu-layout.json, and `applyIntegrationsSection` stamps it on as the
  effective manifest is built.
- Manage object types, a nav card in the footer slot of #CaseObjects and
  #CaseDetail. Gated by `visibleIf`, not `permission`: CnNavCardGrid declares
  `permission` for parity with menuItem and evaluates it nowhere, so a card
  carrying it alone renders for every account.

The href names the register by SLUG rather than by its numeric id, which
differs per instance and no manifest can know. OpenRegister resolves the slug
on /registers/:id.

main.js fills `manifest.runtime.user.isAdmin` from `currentPermissions()`, the
one source the nav filter and the router guard already share. Without it
`passesContextPredicates` hides a dot-path entry from everyone, admin
included, and nothing warns.

It also passes `mergeStrategy: 'delta'` to useAppManifest, which routes.php
and ManifestController's own docblock both name and main.js never did. Without
it the plain deep merge REPLACES arrays, and /api/manifest answers {"menu": []}
on four of its five paths, so the merge substituted an empty menu for all 32
entries. Nothing reported it: a 200, a manifest that still validates (`menu`
has no minItems), and a navigation that renders nothing looks exactly like one
that has not loaded yet.

Tasks 1.1 and 1.2 of openspec/changes/data-model-link.
Four Playwright tests for openspec/changes/data-model-link:

- An admin finds Data model in Integrations, pointing at the dossiq
  register, and NOT in the navigation (the other half of ADR-110).
- The slug resolves. The declaration can only carry `/registers/dossiq`,
  because the numeric register id differs per instance, so the request
  separates a link that opens the register from one that opens a page with
  an empty schema list and no error.
- An admin reaches Manage object types from the Objects index.
- A handler is offered neither door, as the named non-admin `e2euser` from
  ci-seed.sh. The identity is read off the page and asserted first: an
  omitted `storageState` silently becomes the admin's, and an absent entry
  then proves nothing about the gate.

`openspec validate data-model-link --strict` passes. Task 2.1.
…n, not a page widget

gate-55 refuses a detail page carrying both page-level widgets[] and
config.widgets, because the two spellings shadow each other's render path.
The card moves into the Related tab as an Object types section, right after
Objects. CnDetailWidgetHost resolves a section's type from the shared catalog
only, and nav-card-grid lived in CnWidgetGrid's own map, so
registerCaseSections.js now registers it there too. Without that the section
rendered nothing and logged nothing.
gate-102 found Data model, Manage object types and the card description with
no nl.json key, so they would have rendered English to a Dutch reader. Object
types, the new case section label, gets one too. Catalogues re-sorted with
sortKeys and the .js files rebuilt.
@rubenvdlinde
rubenvdlinde merged commit fffc5d7 into parity/round2 Sep 18, 2026
1 check passed
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.

1 participant