Render fixed permission options without reactive list owners

The action and resource catalogs are fixed literal values. Map those static options once and omit redundant value assignments when text already equals the exact value; keep explicit bindings for unknown values. Retain focused permission controls, every option and the original tooltip without changing size or test limits.

Contract-Neutral: Role fields, grants, authorization and HTTP payloads are unchanged; static option rendering preserves the existing permission-control contract.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-11-14 15:40:07 +00:00
parent 0f4164b68c
commit da3ad7c035
2 changed files with 61 additions and 7 deletions

View File

@@ -0,0 +1,54 @@
{
"version": 1,
"result": "passed",
"base_sha": "0f4164b68ce19d91c3a336c4528cabb134103a3e",
"changed_paths": [
"frontend-modern/src/components/Settings/RolesEditorDialog.tsx"
],
"content_sha256": {
"frontend-modern/src/components/Settings/RolesEditorDialog.tsx": "e48c89a2fc2cfdad8709ced0f75d1240dfee22d0006dfadd8a73e1465a0424b8"
},
"routes": [
"Settings > Security > Roles (real RolesPanel, state owner, RBACAPI and apiClient; synthetic offline transport)"
],
"states": [
"Saved three-rule role including unknown options and saved constraints",
"Middle action/resource changes; same DOM nodes retain focus",
"First-rule removal, reindexed remaining rules, independent least-privilege append",
"One explicit PUT, exact serialized readback and reopened editor; cancellation without write"
],
"interactions": [
"Focus and select native action/resource controls; Tab advances to the matching resource in Chromium and WebKit",
"Identify indexed current-value removal buttons, remove first rule, append and edit last rule",
"Save and reopen actual dispatched-body readback; cancel another draft without mutating saved state"
],
"viewports": [
{
"width": 1440,
"height": 1000
},
{
"width": 390,
"height": 844
}
],
"verified_at": "2026-11-14T15:40:02Z",
"browsers": [
"Chromium 141.0.7390.37",
"WebKit 26.0"
],
"playwright": "1.56.1",
"themes": [
"light",
"dark"
],
"assertions": 169,
"baseline_assertions": 129,
"captures": "Eight final cases/169 assertions; original and each containing-parent generation retained.32 primary captures natively inspected across original, first, second and final source.",
"evidence": "RECEIPTS.md and PAIRS.json in current lane outcome; browser scripts are evidence only, not source.",
"limits": [
"Not full App/IdP, original-client recovery, installed acceptance or screen-reader speech testing.",
"An earlier separately retained exploratory run used a stale canonical dependency tree; final before/after runs used the exact locked graph."
],
"scope_note": "Static option catalogs map directly and derive their value from identical literal text. Unknown values keep explicit bindings. This removes unnecessary reactive work without changing options, focus, payloads or limits."
}

View File

@@ -1,4 +1,4 @@
import { Component, For, Index, Show } from 'solid-js';
import { Component, Index, Show } from 'solid-js';
import { InlineNotice } from '@/components/shared/InlineNotice';
import { Dialog } from '@/components/shared/Dialog';
import { FormSelect } from '@/components/shared/FormSelect';
@@ -153,9 +153,9 @@ export const RolesEditorDialog: Component<RolesEditorDialogProps> = (props) => (
>
<option value={permission().action}>{permission().action}</option>
</Show>
<For each={RBAC_PERMISSION_ACTIONS}>
{(action) => <option value={action}>{action}</option>}
</For>
{RBAC_PERMISSION_ACTIONS.map((action) => (
<option>{action}</option>
))}
</FormSelect>
<span class="hidden sm:inline text-slate-400 text-sm">:</span>
<FormSelect
@@ -177,9 +177,9 @@ export const RolesEditorDialog: Component<RolesEditorDialogProps> = (props) => (
>
<option value={permission().resource}>{permission().resource}</option>
</Show>
<For each={RBAC_PERMISSION_RESOURCES}>
{(resource) => <option value={resource}>{resource}</option>}
</For>
{RBAC_PERMISSION_RESOURCES.map((resource) => (
<option>{resource}</option>
))}
</FormSelect>
<button
type="button"