Repository navigation
feat(cmdb-import): show where each import pack comes from and link to its editor in OpenRegister - #1289
Conversation
…rt section A read-only mapping view in the CMDB import section shows which sheet column feeds which field. Vitest and the Playwright spec cover it; the feature docs describe it. Second of two slices of #1280, on top of the endpoint slice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eat/woo588-cmdb-import-mapping-view-2-ui
…eat/woo588-cmdb-import-mapping-view-2-ui
There was a problem hiding this comment.
Verdict: APPROVE (Thorough) — self-review posted as COMMENT (GitHub blocks self-APPROVE)
No blockers: the block renders everything as text, the collapsible has aria-expanded/aria-controls, every new string is in all four l10n files, and the 503 path shows the reason with the shipped sheet names as fallback. The concerns are the help-text fallback for profiles with other than two sheets and the overclaim in the docs.
Update 2026-10-12: All three concerns were fixed on the branch after posting; f4 (error hints) was fixed too.
🟡 Concerns (3)
- Help text and mapping block disagree for profiles with other than two sheets —
src/utils/cmdbImport.js:1027. mappingSheetNames() returns the first two sheet names when the profile has two or more, and the shipped names ('Onbeh Applicaties CMDB', 'Beheerde Applicaties CMDB') when it has fewer than two. ✅ Addressed in2e381f7b. - Docs claim the block shows what the import does; several behaviours are not shown —
docs/features/cmdb-import.md:352. 'The block reads the files through the same loader the import uses, so what it shows is what the import does' promises totality. ✅ Addressed in7db0b2a0. - Help-text wiring has no executed test —
src/views/settings/sections/CmdbImport.vue:800. The headline change, sheet names in the help text coming from the endpoint, rests on onMappingLoaded -> mapping -> sheetNames -> two t() calls. ✅ Addressed inae929478.
🟢 Minor (4)
- E2E fallback assertion passes before the 503 arrives —
tests/e2e/spec-coverage/cmdb-import-mapping.spec.ts:182. In the 'endpoint fails' half, the loop asserting the help contains the shipped sheets runs before the error card is confirmed. - Heading level, loading announcement and duplicated helpers —
src/views/settings/sections/CmdbImportMapping.vue:80. (a) Pack headings are h4 but the block has no h3 of its own (its title is a button), so in the outline they nest under whichever h3 the report left before it (CmdbImport.vue uses h3 at 246 and 273), or skip a level when no report is shown. - Error hint still names the shipped sheets —
src/utils/cmdbImport.js:535(outside the diff, no thread). The WORKBOOK_TOO_LARGE hint ('it reads only "{first}" and "{second}"') still takes PROFILE_DEFAULTS.sheets (lines 537-538), so after this slice one page can name two different sets of sheets. ✅ Addressed inf04bf823. - Feature overview does not list the new endpoint —
docs/features/README.md:167(outside the diff, no thread). The CMDB import card (not in this diff) lists only 'Endpoint: POST /apps/stackiq/api/cmdb-import' and the CmdbImportController.
✅ Verified clean
- No
v-html; interpolatedt()calls useAS_TEXT. - All new keys are in en.js, en.json, nl.js and nl.json with identical key sets.
- The UI reads only fields
mappingOverview()returns; one call, matchingroutes.php.
Scope decision: slice 2 of 2 of the closed #1280, stacked on #1288; reviewed against its own base only.
Gates: this stacked PR gets no quality workflow until it targets development; hydra-gates ran locally scoped to its diff: 45 of 45 applicable gates green. Conflict markers and PHP syntax green on a3f4da3.
Jira context: WOO-588 — CMDB-import: mapping inzichtelijk en beheerbaar voor de beheerder (status: Refinement)
…eat/woo588-cmdb-import-mapping-view-2-ui
The mapping tables listed every mapped field as written on each import, but the import writes the usage's interneAnnotation and timeClassification only on create or when the stored value is empty, sets the module type on create, and never writes the module's publication dates on an existing record. The block now shows, per row, when the import writes the field, and under each table the pack defaults, the create-only values and the never-written fields that the endpoint answers since the previous slice. New strings in en and nl; REQ-CMDB-020, the user docs, the vitest and the e2e API check name them. Review #1288 f2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mappingSheetNames() fell back to the shipped names unless the profile had at least two sheets, and the file help and the info panel only read the first two entries and tied "(applications without arranged maintenance)" to position 0. A profile with one sheet showed two sheets the import does not read, one with three lost the third, and a reordered profile mislabelled both. The profile's list is now used whenever it names a sheet, and both texts are built from the whole list, with a singular and a plural form and no position-bound description. The two replaced strings are removed from en and nl; the vitest pins the 0, 1, 2 and 3 sheet cases. Review #1289 f1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ates CmdbImport.spec.js shallow-mounted the section, so the mapping block was stubbed and never emitted `loaded`: no executed test failed when onMappingLoaded, the sheetNames computed or the help-text binding went missing. The section is now mounted with a wrapper that renders its slots; the test emits `loaded` from the mapping block and asserts the help text and the info panel name the emitted sheets, the shipped ones before it, and the one sheet of a one-sheet profile. The vitest suite gains the mapping block's errors without a reason (403 with a message, no answer, 500), which only the 503 path covered. Review #1289 f3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user docs said the block "shows what the import does", and that it shows which file and entry hold a column. It shows the column-to-field mappings and, since the write-rule rows, when the import writes each field; the sheet constants, absent columns, sheet precedence, id columns, empty-value placeholders, missingRecords modes and limits are returned by the endpoint but not displayed, and a pack's idStrategy is only in its file. The docs now say that and point to the files that hold them. The same overclaim in the change's proposal, design and spec purpose is narrowed the same way. Review #1289 f2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eat/woo588-cmdb-import-mapping-view-2-ui # Conflicts: # openspec/changes/cmdb-import-mapping-view/specs/cmdb-export-import/spec.md
The endpoint no longer lists the module's create-only default `type` under createOnlyFields; the vitest answer fixture mirrors that, and the block still shows `type = Application` as set on create only. Review pre-push p6 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… hints The NO_SOURCE_SHEET hint read only the first two expected sheets (or the shipped names) and the WORKBOOK_TOO_LARGE hint always named the shipped two, so a one- or three-sheet profile was misreported there too, unlike the help texts. errorText() now takes the profile's sheet names, the section passes the ones from the mapping block, and both hints list all of them; the server's `expected` still wins for NO_SOURCE_SHEET. The three replaced strings are removed from en and nl, with a singular and a plural form for the missing-sheet hint. The jest cases pin a one- and a three-sheet profile, in the helper and through the section. Review pre-push p7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eat/woo588-cmdb-import-mapping-view-2-ui # Conflicts: # openspec/changes/cmdb-import-mapping-view/specs/cmdb-export-import/spec.md
… its editor in OpenRegister The Mapping block of the CMDB import section no longer lists each pack's columns. Per pack it now shows one line: what the pack's rows become, whether the import takes it from OpenRegister's pack store or from the shipped file, the stored and shipped versions, an Edited marker, a hint when a newer shipped version was not applied because the pack was edited, and an Edit in OpenRegister link (http(s) or server-relative addresses only). The municipality pack says it maps the import options and is not edited there. When OpenRegister's pack store is not available, the block says the shipped mapping is used. The transform helpers the tables used are removed, the unused strings are dropped from l10n, and the vitest and jest specs cover the new view. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # docs/features/cmdb-import.md
…egister-first UI Brings in the commits already on the PR branch: every sheet the profile reads is named in the file help, the info panel and the missing-sheet and too-large hints, with their jest and vitest cases, and the mapping block's error states without a reason. The per-row write-rule columns, the rules under each table and their strings are dropped: the per-pack lines replace the tables, and the columns are edited in OpenRegister. Review finding F1 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # docs/features/cmdb-import.md # openspec/changes/cmdb-import-mapping-view/specs/cmdb-export-import/spec.md
…e per-pack block end to end The mapping block's error now shows an Edit in OpenRegister link to details.editUrl, which the endpoint answers for a stored pack, so the admin who broke a pack can open it from the error. The address goes through the same http(s)-or-server-relative check as the per-pack links (editorUrl). The Playwright spec asserted the removed per-pack tables under a scenario that no longer exists. It now drives the block as it is: per sheet pack the source, the version and the editor link to its packId, no link for the municipality pack, no table or field, and the error's link through a route intercept. The endpoint and 403 checks moved to cmdb-import-packs.spec.ts. The UI scenario "The section links each pack to its editor" is back in the spec delta with the error link, REQ-CMDB-014 and the design name every sheet of the profile, and tasks.md marks Task 4 and the e2e implementation done. Review findings F2 (UI part), F3, F4, F7 (UI part) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…help The mapping block lists the export's sheets and columns in one table and the sheet packs, with source, version and editor link, in another, instead of a loose grid and one line per pack. The municipality pack is no longer listed: it maps the municipality chosen in the import options, not a column, so there is nothing to show or edit. The help under each import option is now one short sentence; the full explanation of which fields a re-import overwrites and what publishing means moved to the section's information panel. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
WilcoLouwerse
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (Thorough) — self-review posted as COMMENT (GitHub blocks self-APPROVE)
No blockers at
a1f91b0: 1 new concern (the editor link needs openregister#4602), 2 new minors, 2 earlier minors still open. 5 threads are unresolved anddevelopmentrequires every thread resolved;ce55ebc(the block rewritten as tables, pushed during this review) is not covered by this approval and needs its own round.
| Round | Found | Status |
|---|---|---|
1 (a3f4da3) |
🟡 help text vs mapping block for other sheet counts · 🟡 docs overclaimed what the block shows · 🟡 help-text wiring untested · 🟢 e2e fallback passes before the 503 · 🟢 heading, loading announcement, duplicated helpers | 3 resolved (f04bf82, 7db0b2a, ae92947), 1 partly, 1 open |
2 (a1f91b0) — this review |
1 🟡, 2 🟢 | open |
| Finding | Was | Now | Where |
|---|---|---|---|
| 🟡 Help text and mapping block disagree for profiles with other than two sheets | 🟡 r1 | resolved in f04bf82 (mappingSheetNames, fileHelpText, sheetsReadText handle 1 to N sheets) |
thread |
| 🟡 Docs claim the block shows what the import does | 🟡 r1 | resolved in 7db0b2a at a1f91b0; ce55ebc brings the tables back, so the claim needs a fresh look next round |
thread |
| 🟡 Help-text wiring has no executed test | 🟡 r1 | resolved in ae92947 |
thread |
| 🟢 Heading level, loading announcement and duplicated helpers | 🟢 r1 | partly: the heading point is moot; the loading state still has no role="status"/aria-live, and the .cmdb-import__help/__code CSS is still duplicated from CmdbImport.vue |
thread |
| 🟢 E2E fallback assertion passes before the 503 arrives | 🟢 r1 | still open: the help assertion still runs before the error card is confirmed, so the loading state satisfies it | thread |
| 🟡 The "Edit in OpenRegister" link and the help text depend on an editor that is not merged | new | new — 🟡 | comment |
| 🟢 Orphaned translation key | new | new — 🟢 | comment |
| 🟢 "Nothing is written" is not guaranteed | new | new — 🟢 | comment |
Details of this round
Scope decision: delta a3f4da3…a1f91b0, 8 non-merge commits, 16 files (frontend, l10n, docs, openspec, vitest, e2e). The base merges were read with git show --cc; their resolved conflicts are spec and docs text only. Not reviewed: 836107c and ce55ebc (the block shown as tables, help shortened), pushed during this review. The inline comments sit on ce55ebc, on lines that still carry the finding. A finding about the old "not editable" hint was dropped, because ce55ebc filters the municipality pack out instead.
✅ Verified clean (at a1f91b0)
- Every field the UI reads (
packId,storedVersion,shippedVersion,edited,newerShipped,editable,editUrl,openRegisterPacks) is in #1288's mapping response, and bothsourcevalues render. - The 503 and 500 envelopes keep
details.reason,details.packanddetails.editUrlthroughnormaliseError. The 403, network and no-reason cases have tests. editUrlis built server-side. The frontend accepts only http(s) or server-relative URLs, has nov-html, and renders every pack-supplied value as text.- The four l10n files are in parity.
Gates: local run (stacked PR, no CI), 88 of 89 applicable gates ran. Not run: icon-vocabulary (vue-material-design-icons not installed). Gates 22, 53 and 116 failed for wiring only (ajv not resolvable in the worktree), so they count as not run, not as a pass. The gate-16 hit is on lib/Command/ReferencesAuditCommand.php, which is outside this PR's diff.
Jira context: WOO-588, CMDB-import mapping visible and manageable for the administrator.
Before the next round:
git grep -nF 'OpenRegister is missing or a mapping file is invalid.' -- l10n # empty
gh pr view 4602 --repo ConductionNL/openregister --json state # MERGED, or the order in the PR bodyBrings in the review fixes of #1288: viewing the mapping writes nothing, the guarded update, the write-route check, the literal t() calls, and the docs and spec that describe only the endpoint, the import and the seed. Resolved, and carried by this UI part: - docs: #1288's "Viewing and editing the mapping", plus what the settings block shows (the tables, the link, the newer-version hint, reloading after a save); - spec: the REQ-CMDB-014 change stays here, now with every section SHALL (tables, link, newer-version hint, the 503 link, no editing) covered by a scenario; the one-sentence-help SHALL is dropped; - tasks: Task 7 (the section's e2e) is done in this part; - l10n: this part's strings, minus the orphaned "a mapping file is invalid" message; the MAPPING_UNAVAILABLE hint now speaks of a mapping pack that is invalid or breaks a rule, and points to OpenRegister. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…y its tests - The loading line of the Mapping block is a status region, so a screen reader hears that the mapping is loading. - The block styles its help and code lines with its own classes instead of copies of the parent section's. - The e2e help check for the shipped sheet names runs only after the error card shows, so the loading state cannot satisfy it. - The first-run-wizard helper is shared from spec-coverage/_helpers.ts. - The e2e header says why nothing is written. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ng needs - The docs and the spec delta of this part describe the endpoint, the import and the seed step, and no longer the settings section, which arrives with the UI part (#1289, Task 4). The REQ-CMDB-014 change moves there with its scenarios. - "Viewing and editing the mapping" opens with what editing needs: an OpenRegister with the migration-pack editor (openregister#4602), and what an administrator gets without it. The claims that the import always runs what OpenRegister holds are qualified, and the stale "fixed list of plain fields" now says any plain field of the target schema. - REQ-CMDB-020 says reading the mapping writes nothing; the deleted-pack scenario and its e2e test now expect the next import, not a read, to seed the pack again, and the first e2e test checks a read stores nothing. - The edit e2e test names the "Beheerde" usage as the evidence and the "Onbeh" one as unchanged by the edit. - Task 6 is split into the API coverage (done here) and the section's coverage (Task 7); Task 8 records that archiving returns the canonical spec's status to done. - CHANGELOG: the migration pack store and the repair step. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…eat/woo588-cmdb-import-mapping-view-2-ui
…s in the Mapping block
- f1: each sheet pack gets a collapsible "Columns and fields" block with its
column-to-field mappings (column, field, required, transform) and the write
rules that have values (defaults, createOnlyDefaults, createOnlyFields,
neverWritten), as text in tables with captions and th scopes; the packs
table caption is now "Packs", so help and captions match what is shown.
- f2: docs/features/cmdb-import.md says what the block shows and what it does
not (empty values, sheet constants, limits).
- updatePending from the endpoint: the row says "Update pending: shipped X
replaces stored Y at the next import"; spec and tasks follow.
- f3: the role=status loading line moves outside the v-show block that is
hidden while the load runs, so assistive technology announces it.
- f4: remove the unreachable packTargetLabel('municipality') branch and its
l10n key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eat/woo588-cmdb-import-mapping-view-2-ui
… live region that renders empty first The live region was inserted already holding the loading text and a load failure while the block was collapsed was silent. The region now renders empty, the load starts after mount (mounted + nextTick), and the same region announces loading and a short translatable failure message (en, nl). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the pending-update view Closes sp3-f1 (section and UI wording that belongs to the frontend PR: REQ-CMDB-014 references, the section acceptance criterion, the section tasks now marked #1289), sp3-f2 (the proposal said pack writes are admin-only through AuthorizedAdminSetting, which the probe refuses; it now states what the probe requires, in the proposal and in REQ-CMDB-021) and sp3-f3 (REQ-CMDB-021 names files in its refusal list). Also records the refusal of hidden and calculated fields (be3-f1), the updatePending field of the mapping endpoint and the kept pack without updatedAt (be3-f2, be3-f4) in REQ-CMDB-020/021, the design, tasks and docs/features/cmdb-import.md. Class sweep: git grep for REQ-CMDB-014, "admin-only through" and the section wording in the change finds no remaining claim this PR does not back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WilcoLouwerse
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (Thorough) — self-review posted as COMMENT (GitHub blocks self-APPROVE)
Nothing left to address: this round's 2 concerns and 2 minors, plus one concern from the pre-push check, were fixed on the branch before posting, and all open threads from rounds 1-2 are resolved. What still stands between this PR and a merge: 1 approval, its base #1288, and openregister#4602 for the editor link.
| Round | Found | Status |
|---|---|---|
1 (a3f4da3) |
3 🟡 · 2 🟢 | resolved in f04bf82, 7db0b2a, ae92947, 49bc84b, 9fd025a |
2 (a1f91b0) |
🟡 editor link needs openregister#4602 · 2 🟢 | resolved via #1288's 3d8b789 and ce55ebc |
3 (9fd025a) — this review |
2 🟡 (caption promised a column→field mapping the tables lacked; docs overclaimed) · 2 🟢 | fixed before posting in 7fc5172, 9fd025a |
| Finding | Was | Now | Where |
|---|---|---|---|
| 🟡 Editor link depends on an editor that is not merged | 🟡 r2 | resolved: editUrl only for a pack in a store with the hardened editor (#1288 3d8b789) |
thread |
| 🟢 Orphaned translation key | 🟢 r2 | resolved | thread |
| 🟢 "Nothing is written" not guaranteed | 🟢 r2 | resolved by #1288's read-only GET | thread |
| 🟢 E2E fallback assertion before the 503 | 🟢 r1 | resolved in 49bc84b |
thread |
| 🟢 Heading, loading announcement, duplicated helpers | 🟢 r1 | resolved in 49bc84b + 9fd025a |
thread |
| 🟡 Caption promises a column→field mapping the tables do not show | new | fixed before posting in 7fc5172 |
src/views/settings/sections/CmdbImportMapping.vue |
| 🟡 Docs say the block shows what it does not | new | fixed before posting in 7fc5172 |
docs/features/cmdb-import.md |
Details of this round
Scope decision: this PR's own commits since a1f91b0 (836107c, ce55ebc, 49bc84b: 13 files, 658 changed lines); base merges read with git show --cc. Also this run's merge 50cde19 (conflicts in the change's spec and tasks resolved), the fix 7fc5172, the merge d5a7795 and the fix 9fd025a.
✅ Fixed before posting (5)
- Caption promised a mapping the tables lacked (
7fc5172): every sheet pack has a collapsible "Columns and fields" with a field table and a rules table. The field table shows column, field, required and transform type (a lookup with its size). The rules table shows defaults, create-only defaults, create-only fields and never-written fields. Everything is plain text, with captions andth scope. - Docs overclaimed (
7fc5172):docs/features/cmdb-import.mdnames what the block shows and what it does not (empty values, sheet constants, limits, the municipality pack). updatePendingfrom #1288 shown (7fc5172): "Update pending: shipped {version} replaces stored {storedVersion} at the next import."- The loading announcement reached no one (
7fc5172,9fd025a): one visually hiddenrole="status"region sits outside the collapsed block. It renders empty and changes after mount, and it also announces a failed load while the block is collapsed. Both tests go red without the fix. - Unreachable municipality label (
7fc5172): the branch and its l10n key are removed.
✅ Verified clean
- Every field the UI reads is in #1288's
mappingOverview()at0a349a8. A transform object never prints[object Object], and there is nov-html.
Gates: local run (stacked PR, no CI) on 3ddbffd, 88 of 89 applicable gates ran. Not run: icon-vocabulary. Gates 22, 53 and 116 failed for wiring only (ajv not resolvable), so they count as not run. The gate-16 hit is outside this diff.
Checks after the last edit: vitest cmdbImportMapping.spec.js 24/24; jest CmdbImport.spec.js + cmdbImport.spec.js 86/86; eslint, prettier and stylelint clean; test:l10n and check:l10n-js OK. Playwright was not run.
Jira context: WOO-588, CMDB-import mapping visible and manageable for the administrator.
Before the next round: this round's findings came mostly from the fixing. The next round's fixes go through the class sweep and the pre-push check first.
npx vitest run tests/vitest/cmdbImportMapping.spec.js # 24 green…eat/woo588-cmdb-import-mapping-view-2-ui
What
The "Mapping" block of the CMDB import section shows, per pack, where the mapping the next import runs comes from, and links to its editor in OpenRegister (ConductionNL/openregister#4602). The per-row mapping tables of this PR's first version are gone: viewing and editing the packs happens in OpenRegister. Stacked on #1288.
How
CmdbImportMapping.vue: two tables, the export's sheets and columns, and the sheet packs with target, a source badge (OpenRegister / shipped file), version (stored and shipped when they differ), an "edited" marker, a "newer version shipped" hint, and Edit in OpenRegister (editUrl) for an admin. The municipality pack is not listed: it maps the municipality chosen in the import options, not a column. Without OpenRegister's pack store the block says the shipped mapping is used. A broken stored pack names the pack and links to its editor.CmdbImport.vue: the help under each import option is one short sentence; the full explanation of which fields a re-import overwrites and what publishing means is in the section's information panel.loadedevent stay (the help texts and hints name the profile's sheets).Checks
At 3ddbffd:
npm test(jest) 190 of 190, vitestcmdbImportMapping.spec.js19 of 19 (the full vitest run has 6 failures that are also on #1288's head without this PR's UI: four manifest-page specs and two insettingsInfoPanels.spec.js),test:l10nandcheck:l10n-jsOK, eslint and prettier clean,openspec validate --strictvalid,npm run buildOK. e2e on the rig (OpenRegister with #4602):cmdb-import-mapping.spec.tsandcmdb-import-packs.spec.ts9 of 9. PHP checks: as #1288 (samelib/).Merge order
After #1288, and after ConductionNL/openregister#4602. The link is conditional:
editUrlis only answered for a pack the store holds, and the store is only used on an OpenRegister with #4602 (see #1288's probe). On an older OpenRegister the block shows "Shipped file" and no link, so there is no link into a missing editor. The docs name the requirement.Jira: WOO-588 — plan: https://github.com/ConductionNL/readonly-mirror-wilco-claude-plans/tree/dev-mirror/issues/jira/WOO-586/sub-tasks/WOO-588/
🤖 Generated with Claude Code