Skip to content

W1-2 (G-23): custom properties Hub 26 rows and detail page stages 1–2 - #163

Merged
BMJLearnToHelloWorld merged 2 commits into
mainfrom
m2-wave1-g23-s12
Nov 8, 2026
Merged

BMJLearnToHelloWorld merged 2 commits into
mainfrom
m2-wave1-g23-s12

Conversation

@BMJLearnToHelloWorld

Copy link
Copy Markdown
Owner

W1-2 (G-23): custom properties Hub 26 rows and detail page stages 1–2

Stage 1 + stage 2 of G-23 (Wave 1, second batch; scope-lock item 10). Idea review APPROVE with 7 conditions, all implemented.

What lands

  • Hub: the Custom Properties category renders the 26 official rows (icon + description + link each), ordered by label alphabetically, each linking to the existing detail route with params.entityType = type name (table / tableColumn / page …). One 26-item allowlist (type-name set) shared by Hub and list page; the list page no longer shows types outside the official 26, and its total is the filtered count.
  • Detail page: delete (see correction below), read-side customPropertyConfig parsing + Configuration column (official getPropertyConfigSummary four shapes, chips capped at 3 with "+N" tooltip, "—" when unconfigured), read-only Schema tab (JSON.parse of the type's schema field; reachable even with 0 definitions), search by name/displayName with 300ms debounce, type multi-select filter (auto-removes emptied selections), and distinct empty states for "no definitions" vs "no results for this filter".
  • Delete correction (review condition 1, hard correction): the ruling/PLAN wording remove /customProperties/<name> is WRONG — JSON Patch (RFC 6902) cannot address array elements by name and the server returns 400. Implemented per official metadataTypeAPI.ts:126-187 (patchCustomPropertyByName): GET latest type → find index by name → PATCH with [{op: 'test', path: '/customProperties/{i}/name', value}, {op: 'remove', path: '/customProperties/{i}'}], retry only on 400 (stale index), max 3 attempts; already-gone property counts as deleted. Destructive confirm via existing confirmDelete, message carries the property name.

Decisions applied (all settled 2026-11-07)

G-D1 (a) 26-item allowlist fixed; G-D2 (a) route param keeps the type name; G-D3 (a) stage 3 — edit still allows changing propertyType in this batch; G-D4 (a) no official-form direct URL aliases; G-D5 (a) per-type gates are stage 4 (Wave 3) — TYPE resource support verified at code level, live check pending; this batch keeps route-level admin gating only.

Not in this batch

Stage 3 (write-side config fields, edit propertyType lock, name uniqueness/charset validation, "Applies to" badges, help sidebar); stage 4 per-type gates (ResourceEntity.TYPE canEditAll, no ADMIN_ROUTE_RESOURCE change); 26 official-form URL aliases; entity detail-page Custom Properties tab (separate line).

Gates

  • Rebased onto main 5c5b155f (post-W1-1 (G-13): render the two service-% data-insight cards with summary and absolute-value charts #162) with zero conflicts; diff 16 files +1659/−66, no deletions.
  • Branch gate PASS: real npm ci, full vitest 321 files / 1518 tests all pass, npm run build passes, real typecheck 216 errors with zero in batch files (3 fewer than main baseline — the rewrite eliminated 3 pre-existing errors in customProperties.test.ts). Gate round 1 caught 1 real regression (hex fallback in the rewritten SettingsHubView.vue violating the theme-token rule), fixed in code (1 line).
  • ADR: docs/decisions/2026-11-07-custom-properties-s12-hub-allowlist-delete-patch.md, cited in code.

Live verification (owed after deploy)

7 acceptance points: Hub 26 rows + per-type links; delete really deletes and echoes back (incl. stale-index retry); Schema tab matches the server schema field, read-only, reachable at 0 definitions; search matches name/displayName only (not description), 300ms debounce, type filter semantics; Configuration chips / "+N" / "—"; no regressions (create/edit PUT flow, propertyType still editable, routes reachable). Needs the deployed env + admin login.

@BMJLearnToHelloWorld
BMJLearnToHelloWorld merged commit 75ae29d into main Nov 8, 2026
58 checks passed
@BMJLearnToHelloWorld
BMJLearnToHelloWorld deleted the m2-wave1-g23-s12 branch November 12, 2026 03:45
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