feat: add exact retention help contexts

This commit is contained in:
2026-08-17 17:41:45 +02:00
parent 887e9beb9e
commit ff88142471
15 changed files with 85 additions and 31 deletions
@@ -8,6 +8,7 @@ const read = (path) => readFileSync(resolve(webuiRoot, path), "utf8");
const settings = read("src/features/settings/SettingsPage.tsx");
const retention = read("src/features/privacy/RetentionPolicyManagement.tsx");
const confirmDialog = read("src/components/ConfirmDialog.tsx");
const credentials = read("src/components/CredentialEnvelopeManager.tsx");
const iconRail = read("src/layout/IconRail.tsx");
const moduleLoadBoundary = read("src/components/ModuleLoadBoundary.tsx");
@@ -24,8 +25,14 @@ assert.match(settings, /There are no unsaved interface changes\./, "preference s
assert.match(retention, /<ActionBlockerHint/, "retention renders the shared actionable blocker");
assert.match(retention, /contextId: "privacy\.retention"/, "retention exposes stable admin documentation");
assert.match(retention, /policy\.retention\.field\.store-raw-campaign-json/, "retention storage controls expose exact help contexts");
assert.match(retention, /policy\.retention\.field\.audit-detail-level/, "retention audit controls expose exact help contexts");
assert.match(retention, /policy\.retention\.action\.save/, "retention persistence exposes exact help contexts");
assert.match(retention, /helpModuleId="policy"/, "embedded retention controls retain Policy as their documentation owner");
assert.match(retention, /locked by platform configuration/, "retention explains platform locks");
assert.doesNotMatch(retention, /<textarea/, "retention does not use raw text or JSON as its primary editor");
assert.match(confirmDialog, /PlatformInterfaceIdentityProps/, "confirm dialogs accept stable interface help identities");
assert.match(confirmDialog, /helpContextId=\{helpContextId\}/, "confirm dialogs propagate their explicit help context");
assert.match(credentials, /<ActionBlockerHint/, "credentials render the shared actionable blocker");
assert.match(credentials, /contextId: "access\.credentials"/, "credentials expose stable admin documentation");
@@ -50,6 +57,7 @@ assert.match(helpMenu, /helpContextForTarget\(routeHelpContext, event\.target, m
assert.match(helpContext, /function moduleRouteContext/, "context help covers contributed module routes");
assert.match(helpContext, /function sectionContext/, "context help covers contributed administration and settings sections");
assert.match(helpContext, /data-help-context-id/, "context help honors explicit control metadata");
assert.match(helpContext, /explicit\.dataset\.helpModuleId \|\| base\.moduleId/, "context help honors an explicit documentation owner");
assert.match(layoutStyles, /@media \(max-width: 600px\)[\s\S]*\.app-main \{[\s\S]*grid-template-rows: 104px 51px minmax\(0, 1fr\);/, "the narrow shell reserves two non-overlapping titlebar rows");
assert.match(layoutStyles, /@media \(max-width: 600px\)[\s\S]*\.titlebar-context-selectors \{[\s\S]*overflow-x: auto;/, "narrow context selectors remain reachable without covering titlebar actions");
assert.match(layoutStyles, /@media \(max-width: 600px\)[\s\S]*\.account-pill span \{[\s\S]*display: none;/, "narrow account controls retain the icon while removing collision-prone text");