Skip to content

refactor: convert hyperscript components to Vue SFCs - #3001

Merged
tada5hi merged 5 commits into
masterfrom
2998-hyperscript
Apr 16, 2026
Merged

tada5hi merged 5 commits into
masterfrom
2998-hyperscript

Conversation

@tada5hi

@tada5hi tada5hi commented Apr 16, 2026 •

Copy link
Copy Markdown
Collaborator

closes #2998

Summary by CodeRabbit

  • New Features

    • Many entity-assignment UIs now provide per-item toggle controls, policy-binding actions, and dynamic slot forwarding for lists.
    • Policy list supports inline info and a detail modal.
    • OAuth2 endpoint fields and an identity-provider icon component added.
    • New compact toggle button and improved default translation component.
  • Refactor

    • Large migration to single-file Vue components with updated component exports and imports.

Copilot AI review requested due to automatic review settings April 16, 2026 15:17
@coderabbitai

coderabbitai Bot commented Apr 16, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@tada5hi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 15 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 13 minutes and 15 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f6c03e77-9fb9-4c09-b9ee-0a46aa822134

📥 Commits

Reviewing files that changed from the base of the PR and between bc6c653 and 104b60c.

📒 Files selected for processing (16)
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignments.vue
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-user/APermissionUserAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue
  • packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.vue
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue
📝 Walkthrough

Walkthrough

This PR converts many render-function TypeScript Vue components into Single File Components (.vue), adds an AToggleButton SFC, updates internal imports to point to the new .vue files, and updates numerous barrel exports to re-export the .vue defaults. No behavioral logic changes are introduced.

Changes

Cohort / File(s) Summary
Pattern A — Single assignment components (converted to .vue)
packages/client-web-kit/src/components/entities/*/*Assignment.ts → corresponding .../*.vue (e.g. .../AClientPermissionAssignment.vue, .../ARobotPermissionAssignment.vue, .../ARolePermissionAssignment.vue, .../AUserPermissionAssignment.vue, .../AUserRoleAssignment.vue, .../ARobotRoleAssignment.vue, etc.)
Replaced render-function .ts assignment components with SFCs. Each preserves entity-manager logic (filtered queries, socket guards, create/delete), emits, and now uses template-based AToggleButton and conditional APermissionPolicyBindingButton rendering. Old .ts files removed.
Pattern B — List wrapper components (converted to .vue)
packages/client-web-kit/src/components/entities/*/*Assignments.ts → corresponding .../*Assignments.vue (many files, e.g. AUserPermissionAssignments.vue, ARoleUserAssignments.vue, APermissionClientAssignments.vue, AScopeClientAssignments.vue, etc.)
Converted list-wrapper modules to .vue SFCs that render list components (APermissions, ARoles, AClients, AUsers, ARobots, AScopes) and inject per-item assignment components via scoped slots. Forwarding of other named slots preserved. Old .ts modules deleted.
Policy UI (converted to .vue)
packages/client-web-kit/src/components/entities/policy/* → APolicyDetailNav.vue, APolicyInlineInfo.vue, APolicySummary.vue, APolicyTypeBadge.vue, APolicyPicker.vue, APermissionPolicyAssignments.vue, APermissionPolicyAssignment.vue
Moved policy components from render-function .ts to .vue SFCs, preserving behavior (inline info, detail modal, summary, type badge, picker) and updating internal usages to .vue imports.
Identity-provider components (converted to .vue)
.../identity-provider/AIdentityProviderIcon.vue, .../AIdentityProviderOAuth2EndpointFields.vue
Converted icon and OAuth2 endpoint fields components to SFCs (conditional preset/protocol icon; Vuelidate form + optional discovery). Updated imports in dependent files.
Utility: toggle button & translation wrapper
packages/client-web-kit/src/components/utility/toggle-button/AToggleButton.vue, packages/client-web-kit/src/components/utility/translation/ATranslationDefault.vue, .../toggle-button/index.ts, .../translation/index.ts
Added AToggleButton.vue SFC (props: value, isBusy, emits changed) and converted translation wrapper to SFC; updated index re-exports to expose .vue defaults.
Entity manager types & behavior
packages/client-web-kit/src/components/utility/entity/record/module.ts, .../types.ts
Added optional query callback to EntityManagerCreateContext types and implemented reactive watch handling in the record module to re-resolve when ctx.query() output changes. No public API signature changes beyond the added optional query.
Barrel export updates
packages/client-web-kit/src/components/entities/*/index.ts (many files) and various internal imports (examples: APermissionPolicyBindingButton.ts, AIdentityProviderOAuth2Form.ts, policy/composite/ACompositePolicyForm.vue)
Updated barrel files to re-export default .vue components (export { default as X } from './X.vue') and adjusted internal import paths to .vue files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped from h() into .vue,
Templates snug, and props lined true,
Toggles now click with a cheerful ping,
Barrels point new, and slots still sing,
A tiny rabbit cheers — the repo feels new!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely describes the main change: converting hyperscript-based Vue components (.ts with h() functions) to Single File Components (.vue). This matches the primary objective from the linked issue.
Linked Issues check ✅ Passed The PR successfully implements the conversion objectives from issue #2998 across all three phases: Phase 1 (20 entity assignment components converted to .vue), Phase 2 (3 entity-specific components including AIdentityProviderIcon and AIdentityProviderOAuth2EndpointFields converted), Phase 3 (renderToggleButton and ATranslationDefault converted to SFCs). All components follow the specified conversion pattern with proper prop/emit declarations and template implementations. The index.ts files were updated to re-export from .vue files. The PR also includes the auto-re-resolution on query changes and required props enforcement mentioned in commit messages.
Out of Scope Changes check ✅ Passed The PR includes one notable addition beyond the basic hyperscript-to-SFC conversion: conditional reactive query watching in packages/client-web-kit/src/components/utility/entity/record/module.ts and a new optional query property in types.ts. These enable auto re-resolution when query functions change, which aligns with the commit message 'auto-re-resolve on prop changes' and represents a functional enhancement to the entity manager. This appears intentional and documented.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2998-hyperscript

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors packages/client-web-kit Vue components away from TypeScript h() render functions into Vue SFCs (.vue) to improve consistency and ergonomics across the component library (closes #2998).

Changes:

  • Converted multiple “assignment” components (entity relations) from render-function .ts files into .vue SFCs and updated their barrel exports.
  • Introduced an AToggleButton.vue SFC and updated converted components to use it instead of renderToggleButton(...).
  • Converted several policy and identity-provider components (including picker/details/summary/icon) to SFCs and updated imports/exports accordingly.

Reviewed changes

Copilot reviewed 90 out of 90 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/client-web-kit/src/components/utility/translation/index.ts Switches ATranslationDefault export to the .vue SFC default export.
packages/client-web-kit/src/components/utility/translation/ATranslationDefault.vue Converts translation default wrapper to an SFC template.
packages/client-web-kit/src/components/utility/toggle-button/index.ts Exports new AToggleButton.vue from the toggle-button barrel.
packages/client-web-kit/src/components/utility/toggle-button/AToggleButton.vue Adds an SFC implementation of the toggle button UI/behavior.
packages/client-web-kit/src/components/entities/user-role/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignment.vue Converts single assignment to SFC using AToggleButton.
packages/client-web-kit/src/components/entities/user-permission/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.vue Converts assignment + policy-binding button UI to SFC.
packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/scope-client/index.ts Updates exports to point to new .vue SFC.
packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/role-user/index.ts Updates exports to point to new .vue SFC.
packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/role-robot/index.ts Updates exports to point to new .vue SFC.
packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.vue Converts list wrapper to SFC.
packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/role-permission/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue Converts assignment + policy-binding button UI to SFC.
packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/role-client/index.ts Updates exports to point to new .vue SFC.
packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.vue Converts list wrapper to SFC.
packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/robot-role/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue Converts single assignment to SFC using AToggleButton.
packages/client-web-kit/src/components/entities/robot-permission/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.vue Converts assignment + policy-binding button UI to SFC.
packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/policy/index.ts Updates exports to point to new .vue policy SFCs.
packages/client-web-kit/src/components/entities/policy/composite/ACompositePolicyForm.vue Updates import to use default-exported APolicyPicker.vue.
packages/client-web-kit/src/components/entities/policy/APolicyTypeBadge.vue Converts type badge from render-function to template SFC.
packages/client-web-kit/src/components/entities/policy/APolicySummary.vue Adds SFC template version of policy summary component.
packages/client-web-kit/src/components/entities/policy/APolicySummary.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/policy/APolicyPicker.vue Switches picker SFC to default export to match new import style.
packages/client-web-kit/src/components/entities/policy/APolicyInlineInfo.vue Adds SFC version of inline policy info component.
packages/client-web-kit/src/components/entities/policy/APolicyInlineInfo.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/policy/APolicyDetailNav.vue Adds SFC version of policy detail navigation button.
packages/client-web-kit/src/components/entities/policy/APolicyDetailNav.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/permission-user/index.ts Updates exports to point to new .vue SFC.
packages/client-web-kit/src/components/entities/permission-user/APermissionUserAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/permission-user/APermissionUserAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/permission-role/index.ts Updates exports to point to new .vue SFC.
packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/permission-robot/index.ts Updates exports to point to new .vue SFC.
packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/permission-policy/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.vue Converts policy assignment list + modal details UI to SFC.
packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignment.vue Converts single assignment to SFC using AToggleButton.
packages/client-web-kit/src/components/entities/permission-policy-binding/APermissionPolicyBindingButton.ts Updates imports to use .vue default exports for policy inline info/summary.
packages/client-web-kit/src/components/entities/permission-client/index.ts Updates exports to point to new .vue SFC.
packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/identity-provider/index.ts Updates export to point to new AIdentityProviderIcon.vue.
packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2Form.ts Updates endpoint-fields import to the new .vue SFC.
packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.vue Adds SFC version of OAuth2 endpoint fields component.
packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.vue Adds SFC version of identity provider icon component.
packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/identity-provider-role/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.vue Converts role-mapping list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue Adds SFC version of role mapping editor component.
packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/client-scope/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue Converts single assignment to SFC using AToggleButton.
packages/client-web-kit/src/components/entities/client-role/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue Converts single assignment to SFC using AToggleButton.
packages/client-web-kit/src/components/entities/client-permission/index.ts Updates exports to point to new .vue SFCs.
packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignments.vue Converts list wrapper to SFC and forwards slots.
packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignments.ts Removes render-function implementation.
packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.vue Converts assignment + policy-binding button UI to SFC.
packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.ts Removes render-function implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue (1)

20-23: ⚠️ Potential issue | 🟠 Major

Tighten prop contract for assignment identifiers.

roleId and robotId should be required. Otherwise Line 37-44 and Line 48-51 can operate with missing identifiers.

Suggested fix
 props: {
-    roleId: String,
-    robotId: String,
+    roleId: {
+        type: String,
+        required: true,
+    },
+    robotId: {
+        type: String,
+        required: true,
+    },
 },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue`
around lines 20 - 23, The props roleId and robotId on the ARobotRoleAssignment
component should be made required so callers must supply them; update the props
definition for roleId and robotId in ARobotRoleAssignment.vue to use an object
form with type: String and required: true for each (this prevents the functions
that use those identifiers in the component — the code paths around roleId and
robotId usage at the locations that correspond to the current blocks around
where assignments are read/created — from running with undefined values). Ensure
any internal uses assume non-null after this change.
packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue (1)

20-23: ⚠️ Potential issue | 🟠 Major

Make relation IDs required in props.

roleId and clientId are optional right now. If either is missing, Line 37-44 and Line 48-51 can run with undefined identifiers and target unintended records.

Suggested fix
 props: {
-    roleId: String,
-    clientId: String,
+    roleId: {
+        type: String,
+        required: true,
+    },
+    clientId: {
+        type: String,
+        required: true,
+    },
 },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue`
around lines 20 - 23, Props roleId and clientId in AClientRoleAssignment are
currently optional and can be undefined when methods like
createRoleAssignment/deleteRoleAssignment (lines referenced ~37-44 and ~48-51)
run; change the props declaration for roleId and clientId to enforce type and
required (e.g., roleId: { type: String, required: true } and clientId: { type:
String, required: true }) in the AClientRoleAssignment component so the
component always receives these identifiers before calling downstream methods.
🧹 Nitpick comments (10)
packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue (1)

27-36: Filter itemActions from the dynamic slot forwarder to prevent accidental override.

The component defines an internal #itemActions template. While no parent currently passes this slot, the dynamic forwarder iterates over all $slots, which could cause the internal template to be shadowed if a parent were to provide itemActions. Exclude it explicitly:

Suggested fix
         <template
             v-for="(_, name) in $slots"
+            v-if="name !== 'itemActions'"
             :key="name"
             #[name]="slotData"
         >
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue`
around lines 27 - 36, The dynamic slot forwarder iterates over all $slots and
can accidentally override the component's internal `#itemActions` slot; update the
v-for/template that forwards slots (the block using v-for="(_, name) in $slots"
and #[name]="slotData") to skip the itemActions slot (e.g. add a guard so the
template only renders when name !== 'itemActions' or filter $slots to exclude
'itemActions') so the internal `#itemActions` template is never shadowed by a
parent-provided slot.
packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.vue (1)

66-69: Apply discovered userinfo_endpoint when available.

Line 66 currently maps only token/authorize URLs. For OIDC discovery, also mapping userinfo_endpoint improves completeness.

Proposed enhancement
 const handleDiscoveryLookup = (data: OpenIDProviderMetadata) => {
     form.authorize_url = data.authorization_endpoint;
     form.token_url = data.token_endpoint;
+    if (data.userinfo_endpoint) {
+        form.user_info_url = data.userinfo_endpoint;
+    }
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.vue`
around lines 66 - 69, handleDiscoveryLookup currently assigns only authorization
and token endpoints; update it to also apply the discovered userinfo endpoint by
setting the form's userinfo property (e.g., form.userinfo_url or
form.userinfo_endpoint) from OpenIDProviderMetadata.userinfo_endpoint when
present. Locate the handleDiscoveryLookup function that takes
OpenIDProviderMetadata and add a conditional assignment like form.userinfo_url =
data.userinfo_endpoint (or use the existing form field name for userinfo) so the
component captures OIDC userinfo discovery results.
packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.vue (1)

15-15: Make entityId required in the component contract.

On Line 15, entityId is optional (String shorthand), so undefined can flow into assignment props. Prefer a required prop here.

Proposed change
 export default defineComponent({
     components: { ARobots, ARobotRoleAssignment },
-    props: { entityId: String },
+    props: {
+        entityId: {
+            type: String,
+            required: true,
+        },
+    },
 });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.vue`
at line 15, The ARoleRobotAssignments component exposes props: { entityId:
String } which makes entityId optional; update the props contract in
ARoleRobotAssignments.vue to require entityId by changing the entityId
definition to an object with type: String and required: true (i.e., replace the
String shorthand for entityId with { type: String, required: true }) and then
run a quick grep for usages of ARoleRobotAssignments or references to
props.entityId to fix any call sites that may pass undefined.
packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.vue (1)

15-15: Make entityId required in the public API.

On Line 15, entityId is optional via shorthand typing. Prefer a required prop so role assignment always receives a valid role id.

Proposed change
 export default defineComponent({
     components: { AClients, AClientRoleAssignment },
-    props: { entityId: String },
+    props: {
+        entityId: {
+            type: String,
+            required: true,
+        },
+    },
 });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.vue`
at line 15, The prop entityId on the ARoleClientAssignments component is
currently optional; make it required in the public API by changing the props
declaration for entityId to an explicit object with type: String and required:
true (update the props block in ARoleClientAssignments.vue where props: {
entityId: String } is defined) so the component always receives a valid role id;
also run a quick sweep for any usages of ARoleClientAssignments to ensure
callers always pass entityId and update tests/types if necessary.
packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.vue (1)

31-31: Mark decorative icon elements as hidden from assistive tech.

If these <i> nodes are purely visual, adding aria-hidden="true" avoids noisy announcements by screen readers.

Suggested tweak
-            <i :class="[item.icon, $attrs.class]" />
+            <i :class="[item.icon, $attrs.class]" aria-hidden="true" />
...
-            <i :class="[item.icon, $attrs.class]" />
+            <i :class="[item.icon, $attrs.class]" aria-hidden="true" />

Also applies to: 39-39

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.vue`
at line 31, The <i> icon elements in AIdentityProviderIcon.vue (the element
rendering item.icon with :class="[item.icon, $attrs.class]" and the similar
instance around line 39) are decorative and should be hidden from assistive
tech; add aria-hidden="true" to those <i> elements so screen readers ignore them
while preserving existing :class bindings (refer to the <i> with
:class="[item.icon, $attrs.class]" and the other <i> instance).
packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.vue (1)

32-41: Prevent itemActions slot collisions when forwarding parent slots.

On Line 33, forwarding all $slots includes itemActions. If a consumer passes itemActions, it can override the internal assignment action defined on Lines 25-31. Consider excluding itemActions from the forwarded slot-name set.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.vue`
around lines 32 - 41, The template currently forwards every entry in $slots
(v-for="(_, name) in $slots") which allows a consumer-provided slot named
"itemActions" to override the component's internal assignment actions; update
the forwarding logic to exclude "itemActions" (e.g., iterate only over
Object.keys($slots).filter(n => n !== 'itemActions') or otherwise skip when name
=== 'itemActions') so the internal slot/action defined for itemActions remains
intact while still forwarding other slots; keep using the same slot binding
variable (slotData) and :key handling.
packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.vue (1)

33-42: Avoid forwarding the body slot here.

Because Line 25 defines a concrete #body, forwarding all $slots on Line 34 can let an incoming body slot replace this component’s core assignment rendering. Excluding body from forwarded slots would make behavior safer.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.vue`
around lines 33 - 42, The template currently forwards all incoming slots via the
v-for over $slots (the v-for="(_, name) in $slots" block that binds
#[name]="slotData" and renders <slot :name="name" v-bind="slotData ?? {}" />),
which allows an incoming body slot to override this component’s own `#body`;
change the logic so the loop excludes the "body" slot (e.g., filter $slots to
skip name === 'body' or explicitly iterate only allowed slot names) so the
component’s defined `#body` cannot be replaced by a forwarded slot.
packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue (1)

21-24: Require roleId and permissionId props.

Line 22 and Line 23 are used as mandatory relation keys throughout setup; making them required prevents undefined relation operations.

♻️ Suggested patch
     props: {
-        roleId: String,
-        permissionId: String,
+        roleId: {
+            type: String,
+            required: true,
+        },
+        permissionId: {
+            type: String,
+            required: true,
+        },
     },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue`
around lines 21 - 24, The component ARolePermissionAssignment.vue currently
declares props roleId and permissionId as optional Strings but they are used as
mandatory relation keys; update the props block to make both roleId and
permissionId required (e.g., set each prop to { type: String, required: true })
so the ARolePermissionAssignment component and any setup logic that relies on
these values (props.roleId, props.permissionId) cannot receive undefined.
packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue (1)

20-23: Make assignment IDs required at the prop boundary.

Line 21 and Line 22 are optional, but both values are required by resolve, socket filtering, and create. Requiring them avoids undefined-id assignment calls.

♻️ Suggested patch
     props: {
-        clientId: String,
-        scopeId: String,
+        clientId: {
+            type: String,
+            required: true,
+        },
+        scopeId: {
+            type: String,
+            required: true,
+        },
     },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue`
around lines 20 - 23, The component AClientScopeAssignment declares props
clientId and scopeId as optional but both are required by resolve, socket
filtering, and create; update the props in AClientScopeAssignment.vue so
clientId and scopeId are required (set type String and required: true) to
prevent undefined-id calls, and run a quick grep for usages of resolve, create,
and any socket filter logic to ensure callers always provide those props after
this change.
packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.vue (1)

85-135: Consider adding explicit modal focus management.

When opening/closing the teleported dialog, moving focus into the modal and restoring it on close would improve keyboard accessibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.vue`
around lines 85 - 135, The Teleport-based modal opened when detailPolicy is set
needs explicit focus management: when detailPolicy becomes non-null (open) save
document.activeElement, move focus into the modal (e.g., the dialog container or
first focusable element such as the close button), and trap/handle Escape and
Tab as needed; when detailPolicy is cleared (close) restore the previously
focused element. Implement this by adding a ref to the dialog element inside the
Teleport, watching the detailPolicy reactive property (or using
mounted/unmounted hooks) to call openModal/closeModal helper methods that
save/restore focus and attach/detach keydown handlers; reference detailPolicy,
the Teleport/dialog ref, and the Close button (btn-close) when implementing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.vue`:
- Around line 21-24: The props clientId and permissionId are currently optional
which allows code paths using them (e.g., functions that reference them) to run
with undefined; update the component props definition so both are required by
changing clientId and permissionId to object-style prop declarations with type
String and required: true (e.g., clientId: { type: String, required: true },
permissionId: { type: String, required: true }) and run a quick grep for usages
inside the component (methods/computed that reference clientId or permissionId)
to ensure callers no longer need defensive undefined checks.

In
`@packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.vue`:
- Around line 15-17: The prop declaration for entityId in the
AClientRoleAssignments component must be made required to prevent undefined
values being used as client-id; update the props entry for entityId from
"entityId: String" to an object with type: String and required: true (and apply
the same change to the other props block referenced around lines 29-32),
ensuring any code that relies on entityId (e.g., where it is used as client-id)
always receives a non-null string.
- Around line 35-44: The slot-forwarding v-for in AClientRoleAssignments.vue
currently iterates all $slots (v-for="(_, name) in $slots") which will forward a
parent-provided itemActions slot and collide with the component's internal
`#itemActions` template used by ARoles; modify the slot forwarding logic to
skip/ignore the "itemActions" slot name (filter out name === 'itemActions') so
the local `#itemActions` template is preserved and only non-conflicting parent
slots are forwarded.

In
`@packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue`:
- Around line 102-114: Prevent duplicate or invalid submissions by
short-circuiting the save/create flow when the form is invalid or a request is
already in-flight: in the handleSaveOrCreate function check the form validation
state (e.g., form.invalid or form.isValid) and the manager request state (e.g.,
manager.isLoading / manager.pending) and return early if invalid or busy, and
likewise update the save button rendering logic (the clickable handler around
the save button used near the save/button block) to be disabled when form is
invalid or manager is loading so clicks are ignored; ensure you still call
manager.update(form) or manager.create({...form, provider_id: props.entityId,
role_id: props.role.id}) only when not busy and the form is valid.
- Around line 175-179: The delete button is incorrectly disabled by form
validation ($v.$invalid); remove the form-validity check so deletion is only
blocked by the manager's busy state. Update the :disabled binding used on the
delete button (the element referencing manager.data.value and
`@click`="handleDelete") to rely solely on manager.busy.value (and/or any existing
manager-level busy flag) and ensure handleDelete/manager.busy handling still
prevents concurrent deletes.

In
`@packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.vue`:
- Around line 53-57: The init() function can leave stale values when
props.entity is null or missing endpoint keys; before calling
assignFormProperties(form, props.entity) reset/clear the form fields (the
endpoint-related keys on form) to empty/default values, then if props.entity
exists copy only the relevant properties into form (guard each endpoint key or
use a safe partial mapping) so missing keys do not preserve prior values; update
init() to clear form first and then conditionally map props.entity into form.

In
`@packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.vue`:
- Around line 32-41: The current v-for that iterates "(_, name) in $slots"
forwards every parent slot including the already-handled "itemActions", causing
duplicate slot definitions; update the loop in the template that uses "$slots"
(the v-for producing #[name] and binding "slotData") to skip "itemActions" (e.g.
iterate Object.keys($slots).filter(n => n !== 'itemActions') or otherwise
exclude that name) so only non-itemActions slots are forwarded and "itemActions"
remains handled by the explicit slot at line 25.

In
`@packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.vue`:
- Around line 33-41: The dynamic slot forwarding loop currently iterates over
$slots and forwards all slots including the explicitly defined `#itemActions` slot
(see template using v-for="(_, name) in $slots" and the explicit `#itemActions`
slot), which causes redundant forwarding; update the loop to skip "itemActions"
(or filter $slots in setup to exclude "itemActions") so only undeclared slots
are forwarded, preserving the explicit `#itemActions` and avoiding duplicate slot
forwarding.

In
`@packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.vue`:
- Around line 21-24: The component ARobotPermissionAssignment currently declares
robotId and permissionId as optional which leads to invalid queries/mutations;
make both props required by updating the props declaration for robotId and
permissionId to be required String types, and add runtime guards in the
component methods that use them (referencing ARobotPermissionAssignment, the
robotId and permissionId props, and the methods that perform the query/mutation
at lines ~38-45 and ~49-52) to throw or early-return with a clear error if
either prop is missing before calling GraphQL queries/mutations.

In
`@packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.vue`:
- Around line 32-41: The generic slot-forwarding loop is iterating over all
entries in $slots and re-rendering the explicitly handled itemActions slot,
causing duplicate rendering; update the v-for/template logic that iterates over
$slots (the template with v-for="(_, name) in $slots" and the #[name]="slotData"
block) to skip when name === "itemActions" (i.e., add a condition to
continue/omit that slot) so itemActions is only rendered by the dedicated
handler.

In
`@packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.vue`:
- Line 15: Make the entityId prop on ARobotRoleAssignments.vue required to avoid
undefined assignment IDs by updating the props declaration for entityId (the
props object in ARobotRoleAssignments.vue) to mark entityId as required (e.g.,
replace the loose props: { entityId: String } with a required prop definition
for entityId). Ensure the change mirrors other assignment wrapper components so
entityId is validated as required before being forwarded into assignment
mutation functions.

In
`@packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.vue`:
- Around line 19-27: ARoleClientAssignments currently only provides the
`#itemActions` slot to AClients and drops any other named slots; update the
AClients usage in ARoleClientAssignments to forward all incoming slots by adding
v-slots="$slots" on the AClients element so other named slots (header, footer,
body, item, loading, no-more, search-related, etc.) are passed through while
keeping the local <template `#itemActions`> override.

In
`@packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.vue`:
- Around line 32-41: The catch-all slot forwarding loop in the template (the
v-for over $slots) can accidentally re-forward a parent-provided "itemActions"
slot and clash with the explicitly defined itemActions template in
ARolePermissionAssignments.vue; modify the loop that iterates over $slots (the
template with v-for="(_, name) in $slots" and #[name]="slotData") to skip
entries where name === 'itemActions' (e.g. add a condition to filter out
'itemActions' with v-if or by filtering the keys) so only other slots are
forwarded and the explicit itemActions template remains the single definition.

In
`@packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.vue`:
- Around line 19-27: ARoleRobotAssignments only provides the `#itemActions` slot
to ARobots which swallows any other slots passed through; update
ARoleRobotAssignments to forward all incoming slots to ARobots while still
overriding/handling itemActions locally. Concretely, in the
ARoleRobotAssignments component, render ARobots with the parent component's
$slots forwarded (e.g. use v-slots/v-bind to pass $slots or iterate $slots and
attach them to ARobots) but replace/override the itemActions slot with the
existing <template `#itemActions`="{ data }"> that renders ARobotRoleAssignment;
keep ARobotRoleAssignment, entityId, and data.id references unchanged.

In
`@packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue`:
- Around line 13-16: The prop definition for entityId in the defineComponent
block is currently optional but is required by the template binding (the
:role-id on the AUserRoleAssignment usage); update the props in the
defineComponent({ components: { AUsers, AUserRoleAssignment }, props: { ... } })
to declare entityId as an object with type: String and required: true so the
component enforces the contract at runtime (i.e., change entityId: String to
entityId: { type: String, required: true }).

In
`@packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.vue`:
- Around line 33-40: AScopeClientAssignments currently forwards all parent slots
using v-for="(_, name) in $slots" which can overwrite its built-in itemActions
slot; modify the slot-forwarding loop that iterates over $slots (the element
rendering #[name]="slotData") to skip the reserved slot by adding a conditional
filter (e.g., v-if="name !== 'itemActions'") so that the component's own
itemActions slot implementation is preserved.

In
`@packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.vue`:
- Around line 21-24: The component AUserPermissionAssignment has userId and
permissionId props that must not be optional; update the props definition in the
AUserPermissionAssignment component to declare both userId and permissionId with
required: true (e.g., props: { userId: { type: String, required: true },
permissionId: { type: String, required: true } }) so code paths in methods that
reference these IDs (the logic around lines handling assignment lookup/create)
cannot run with undefined values; adjust any callers/tests to pass these
required props if necessary.

In
`@packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue`:
- Line 15: The prop definition for entityId in AUserRoleAssignments.vue is
currently optional and can forward undefined IDs into role-assignment writes;
change the props declaration for entityId to make it required (use a prop object
with type: String and required: true for the entityId prop) so the component
enforces presence at runtime and prevents invalid assignment operations; update
any component initialization or parent usages if needed to ensure they pass a
valid entityId when mounting AUserRoleAssignments.

In
`@packages/client-web-kit/src/components/utility/toggle-button/AToggleButton.vue`:
- Around line 34-50: The button in AToggleButton.vue is icon-only and lacks an
accessible name and explicit type; update the rendered <button> element to
include type="button" and a descriptive accessible name (e.g., aria-label or
aria-labelledby) that reflects the action based on component state (use isBusy,
value to choose labels like "Loading", "Enable", "Disable"), keeping the
existing click handler handleClick and visual classes intact so assistive tech
can identify the control.

---

Outside diff comments:
In
`@packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue`:
- Around line 20-23: Props roleId and clientId in AClientRoleAssignment are
currently optional and can be undefined when methods like
createRoleAssignment/deleteRoleAssignment (lines referenced ~37-44 and ~48-51)
run; change the props declaration for roleId and clientId to enforce type and
required (e.g., roleId: { type: String, required: true } and clientId: { type:
String, required: true }) in the AClientRoleAssignment component so the
component always receives these identifiers before calling downstream methods.

In
`@packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue`:
- Around line 20-23: The props roleId and robotId on the ARobotRoleAssignment
component should be made required so callers must supply them; update the props
definition for roleId and robotId in ARobotRoleAssignment.vue to use an object
form with type: String and required: true for each (this prevents the functions
that use those identifiers in the component — the code paths around roleId and
robotId usage at the locations that correspond to the current blocks around
where assignments are read/created — from running with undefined values). Ensure
any internal uses assume non-null after this change.

---

Nitpick comments:
In
`@packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue`:
- Around line 20-23: The component AClientScopeAssignment declares props
clientId and scopeId as optional but both are required by resolve, socket
filtering, and create; update the props in AClientScopeAssignment.vue so
clientId and scopeId are required (set type String and required: true) to
prevent undefined-id calls, and run a quick grep for usages of resolve, create,
and any socket filter logic to ensure callers always provide those props after
this change.

In
`@packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.vue`:
- Around line 33-42: The template currently forwards all incoming slots via the
v-for over $slots (the v-for="(_, name) in $slots" block that binds
#[name]="slotData" and renders <slot :name="name" v-bind="slotData ?? {}" />),
which allows an incoming body slot to override this component’s own `#body`;
change the logic so the loop excludes the "body" slot (e.g., filter $slots to
skip name === 'body' or explicitly iterate only allowed slot names) so the
component’s defined `#body` cannot be replaced by a forwarded slot.

In
`@packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.vue`:
- Line 31: The <i> icon elements in AIdentityProviderIcon.vue (the element
rendering item.icon with :class="[item.icon, $attrs.class]" and the similar
instance around line 39) are decorative and should be hidden from assistive
tech; add aria-hidden="true" to those <i> elements so screen readers ignore them
while preserving existing :class bindings (refer to the <i> with
:class="[item.icon, $attrs.class]" and the other <i> instance).

In
`@packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.vue`:
- Around line 66-69: handleDiscoveryLookup currently assigns only authorization
and token endpoints; update it to also apply the discovered userinfo endpoint by
setting the form's userinfo property (e.g., form.userinfo_url or
form.userinfo_endpoint) from OpenIDProviderMetadata.userinfo_endpoint when
present. Locate the handleDiscoveryLookup function that takes
OpenIDProviderMetadata and add a conditional assignment like form.userinfo_url =
data.userinfo_endpoint (or use the existing form field name for userinfo) so the
component captures OIDC userinfo discovery results.

In
`@packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.vue`:
- Around line 32-41: The template currently forwards every entry in $slots
(v-for="(_, name) in $slots") which allows a consumer-provided slot named
"itemActions" to override the component's internal assignment actions; update
the forwarding logic to exclude "itemActions" (e.g., iterate only over
Object.keys($slots).filter(n => n !== 'itemActions') or otherwise skip when name
=== 'itemActions') so the internal slot/action defined for itemActions remains
intact while still forwarding other slots; keep using the same slot binding
variable (slotData) and :key handling.

In
`@packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.vue`:
- Around line 85-135: The Teleport-based modal opened when detailPolicy is set
needs explicit focus management: when detailPolicy becomes non-null (open) save
document.activeElement, move focus into the modal (e.g., the dialog container or
first focusable element such as the close button), and trap/handle Escape and
Tab as needed; when detailPolicy is cleared (close) restore the previously
focused element. Implement this by adding a ref to the dialog element inside the
Teleport, watching the detailPolicy reactive property (or using
mounted/unmounted hooks) to call openModal/closeModal helper methods that
save/restore focus and attach/detach keydown handlers; reference detailPolicy,
the Teleport/dialog ref, and the Close button (btn-close) when implementing.

In
`@packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.vue`:
- Line 15: The prop entityId on the ARoleClientAssignments component is
currently optional; make it required in the public API by changing the props
declaration for entityId to an explicit object with type: String and required:
true (update the props block in ARoleClientAssignments.vue where props: {
entityId: String } is defined) so the component always receives a valid role id;
also run a quick sweep for any usages of ARoleClientAssignments to ensure
callers always pass entityId and update tests/types if necessary.

In
`@packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue`:
- Around line 21-24: The component ARolePermissionAssignment.vue currently
declares props roleId and permissionId as optional Strings but they are used as
mandatory relation keys; update the props block to make both roleId and
permissionId required (e.g., set each prop to { type: String, required: true })
so the ARolePermissionAssignment component and any setup logic that relies on
these values (props.roleId, props.permissionId) cannot receive undefined.

In
`@packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.vue`:
- Line 15: The ARoleRobotAssignments component exposes props: { entityId: String
} which makes entityId optional; update the props contract in
ARoleRobotAssignments.vue to require entityId by changing the entityId
definition to an object with type: String and required: true (i.e., replace the
String shorthand for entityId with { type: String, required: true }) and then
run a quick grep for usages of ARoleRobotAssignments or references to
props.entityId to fix any call sites that may pass undefined.

In
`@packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue`:
- Around line 27-36: The dynamic slot forwarder iterates over all $slots and can
accidentally override the component's internal `#itemActions` slot; update the
v-for/template that forwards slots (the block using v-for="(_, name) in $slots"
and #[name]="slotData") to skip the itemActions slot (e.g. add a guard so the
template only renders when name !== 'itemActions' or filter $slots to exclude
'itemActions') so the internal `#itemActions` template is never shadowed by a
parent-provided slot.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f5f8a15f-85dc-4adb-895c-24389ffb89d8

📥 Commits

Reviewing files that changed from the base of the PR and between 916c462 and 7864beb.

📒 Files selected for processing (90)
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.ts
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignments.ts
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/client-permission/index.ts
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/client-role/index.ts
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignments.ts
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignments.vue
  • packages/client-web-kit/src/components/entities/client-scope/index.ts
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.ts
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/identity-provider-role/index.ts
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.ts
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.vue
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.ts
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.vue
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2Form.ts
  • packages/client-web-kit/src/components/entities/identity-provider/index.ts
  • packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.ts
  • packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-client/index.ts
  • packages/client-web-kit/src/components/entities/permission-policy-binding/APermissionPolicyBindingButton.ts
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignment.vue
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.ts
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-policy/index.ts
  • packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.ts
  • packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-robot/index.ts
  • packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-role/index.ts
  • packages/client-web-kit/src/components/entities/permission-user/APermissionUserAssignments.ts
  • packages/client-web-kit/src/components/entities/permission-user/APermissionUserAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-user/index.ts
  • packages/client-web-kit/src/components/entities/policy/APolicyDetailNav.ts
  • packages/client-web-kit/src/components/entities/policy/APolicyDetailNav.vue
  • packages/client-web-kit/src/components/entities/policy/APolicyInlineInfo.ts
  • packages/client-web-kit/src/components/entities/policy/APolicyInlineInfo.vue
  • packages/client-web-kit/src/components/entities/policy/APolicyPicker.vue
  • packages/client-web-kit/src/components/entities/policy/APolicySummary.ts
  • packages/client-web-kit/src/components/entities/policy/APolicySummary.vue
  • packages/client-web-kit/src/components/entities/policy/APolicyTypeBadge.vue
  • packages/client-web-kit/src/components/entities/policy/composite/ACompositePolicyForm.vue
  • packages/client-web-kit/src/components/entities/policy/index.ts
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.ts
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.ts
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-permission/index.ts
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-role/index.ts
  • packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.ts
  • packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.vue
  • packages/client-web-kit/src/components/entities/role-client/index.ts
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.ts
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.ts
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/role-permission/index.ts
  • packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.ts
  • packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.vue
  • packages/client-web-kit/src/components/entities/role-robot/index.ts
  • packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.ts
  • packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue
  • packages/client-web-kit/src/components/entities/role-user/index.ts
  • packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.ts
  • packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.vue
  • packages/client-web-kit/src/components/entities/scope-client/index.ts
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.ts
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignments.ts
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/user-permission/index.ts
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/user-role/index.ts
  • packages/client-web-kit/src/components/utility/toggle-button/AToggleButton.vue
  • packages/client-web-kit/src/components/utility/toggle-button/index.ts
  • packages/client-web-kit/src/components/utility/translation/ATranslationDefault.vue
  • packages/client-web-kit/src/components/utility/translation/index.ts
💤 Files with no reviewable changes (28)
  • packages/client-web-kit/src/components/entities/policy/APolicyDetailNav.ts
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignments.ts
  • packages/client-web-kit/src/components/entities/permission-user/APermissionUserAssignments.ts
  • packages/client-web-kit/src/components/entities/policy/APolicyInlineInfo.ts
  • packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.ts
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.ts
  • packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.ts
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignments.ts
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.ts
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignments.ts
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.ts
  • packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.ts
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.ts
  • packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.ts
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.ts
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.ts
  • packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.ts
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.ts
  • packages/client-web-kit/src/components/entities/policy/APolicySummary.ts
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.ts
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.ts
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.ts
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.ts
  • packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.ts
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue (1)

102-114: ⚠️ Potential issue | 🟠 Major

Prevent invalid/duplicate submissions by gating save/create and disabling the save button.

The save flow still executes while invalid or in-flight, and the save button remains clickable. Add an early return in handleSaveOrCreate and disable the button when invalid/busy.

Suggested fix
-        const handleSaveOrCreate = (e: Event) => {
+        const handleSaveOrCreate = async (e: Event) => {
             e.preventDefault();
+            $v.value.$touch();
+            if ($v.value.$invalid || manager.busy.value) {
+                return;
+            }

             if (manager.data.value) {
-                return manager.update(form);
+                await manager.update(form);
+                return;
             }

-            return manager.create({
+            await manager.create({
                 ...form,
                 provider_id: props.entityId,
                 role_id: props.role.id,
             });
         };
                 <button
                     :class="['btn btn-xs', {
                         'btn-primary': !manager.data.value,
                         'btn-dark': !!manager.data.value,
                     }]"
+                    :disabled="$v.$invalid || manager.busy.value"
                     `@click`="handleSaveOrCreate"
                 >

Also applies to: 161-167

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue`
around lines 102 - 114, The save handler handleSaveOrCreate should guard against
invalid form state and in-flight requests: add an early return that checks form
validity (e.g., a computed/validator like formIsValid or form.invalid) and
manager busy state (e.g., manager.data.value vs manager.isSaving/manager.busy
flag) before calling manager.create/update to prevent duplicate submissions;
also bind the save button's disabled attribute to the same conditions (invalid
|| busy) so the button is unclickable while validation fails or a request is
in-flight; apply the same changes to the other save handler instance referenced
around the second occurrence (the block at lines mentioned in the comment).
🧹 Nitpick comments (1)
packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue (1)

8-63: Consider <script setup lang="ts"> to align with this migration batch.

This converted SFC still uses defineComponent. The PR objective for converted hyperscript components calls for <script setup lang="ts">, so switching here would keep the migration style consistent.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue`
around lines 8 - 63, Replace the current defineComponent-based SFC with the
<script setup lang="ts"> pattern: remove defineComponent/export default and
instead use defineProps to declare clientId and scopeId prop types, use
defineEmits with defineEntityVEmitOptions<ClientScope>() to declare emits, then
run the existing setup logic at top-level (keeping calls to defineEntityManager
and the socket processEvent) and expose handleChanged and manager by simply
declaring them in the script scope; keep references to defineEntityManager,
defineEntityVEmitOptions, AToggleButton, manager and handleChanged but remove
the old setup function wrapper and export default.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue`:
- Around line 25-44: The manager.resolve call runs only once in the async setup,
so when props.clientId or props.scopeId change the assignment state can become
stale; update the component to watch those props (clientId and scopeId) inside
setup and call manager.resolve(...) again with the new query when either
changes, ensuring the same query shape used originally; reference the existing
manager created by defineEntityManager and the async setup function to add a
watch/watchEffect that triggers manager.resolve with { query: { filters: {
client_id: props.clientId, scope_id: props.scopeId } } } whenever props.clientId
or props.scopeId update.

---

Duplicate comments:
In
`@packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue`:
- Around line 102-114: The save handler handleSaveOrCreate should guard against
invalid form state and in-flight requests: add an early return that checks form
validity (e.g., a computed/validator like formIsValid or form.invalid) and
manager busy state (e.g., manager.data.value vs manager.isSaving/manager.busy
flag) before calling manager.create/update to prevent duplicate submissions;
also bind the save button's disabled attribute to the same conditions (invalid
|| busy) so the button is unclickable while validation fails or a request is
in-flight; apply the same changes to the other save handler instance referenced
around the second occurrence (the block at lines mentioned in the comment).

---

Nitpick comments:
In
`@packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue`:
- Around line 8-63: Replace the current defineComponent-based SFC with the
<script setup lang="ts"> pattern: remove defineComponent/export default and
instead use defineProps to declare clientId and scopeId prop types, use
defineEmits with defineEntityVEmitOptions<ClientScope>() to declare emits, then
run the existing setup logic at top-level (keeping calls to defineEntityManager
and the socket processEvent) and expose handleChanged and manager by simply
declaring them in the script scope; keep references to defineEntityManager,
defineEntityVEmitOptions, AToggleButton, manager and handleChanged but remove
the old setup function wrapper and export default.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bf080233-b7bf-4a08-9323-804fc8710703

📥 Commits

Reviewing files that changed from the base of the PR and between 7864beb and 3f9fd4c.

📒 Files selected for processing (17)
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.vue
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.vue
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.vue
  • packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue
  • packages/client-web-kit/src/components/utility/toggle-button/AToggleButton.vue
✅ Files skipped from review due to trivial changes (4)
  • packages/client-web-kit/src/components/entities/role-robot/ARoleRobotAssignments.vue
  • packages/client-web-kit/src/components/entities/role-client/ARoleClientAssignments.vue
  • packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.vue
🚧 Files skipped from review as they are similar to previous changes (10)
  • packages/client-web-kit/src/components/utility/toggle-button/AToggleButton.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderOAuth2EndpointFields.vue
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.vue (1)

43-45: Minor formatting glitch in <slot> tag.

There's an unusual stretch of whitespace between <slot and :name="name" on line 43 (appears to be mixed tabs/spaces or a stray indent) that breaks the otherwise consistent attribute formatting used elsewhere in the template.

✏️ Proposed fix
-            <slot                :name="name"
+            <slot
+                :name="name"
                 v-bind="slotData ?? {}"
             />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.vue`
around lines 43 - 45, Fix the formatting of the <slot> tag in
ARobotPermissionAssignments.vue by removing the stray/mixed whitespace between
"<slot" and the ":name" attribute so attributes follow the same inline/indented
style used elsewhere; ensure the <slot> element that uses :name="name" and
v-bind="slotData ?? {}" has consistent spacing and indentation (no mixed
tabs/spaces) so both attributes are aligned cleanly.
packages/client-web-kit/src/components/utility/entity/record/module.ts (1)

398-415: Reactive query watcher: consider serialization stability, fire-and-forget, and the initialized flag.

A few small things worth tightening on this newly added block:

  1. JSON.stringify as the change key is fragile. Key ordering is not guaranteed to be identical across different call sites building the same logical query (e.g. { filters, fields } vs { fields, filters }), which can cause spurious re-fetches. It also silently drops undefined, serializes Date/BigInt lossily, and throws on circular refs. For a typical rapiq BuildInput it's usually fine, but a deep-equal comparison via a deep watcher (or a stable stringifier) is more robust.
  2. Fire-and-forget resolve(...). resolve() returns a Promise and is not awaited. Internally it traps errors into error.value, so this is safe today, but marking the call with void (or .catch(...)) makes the intent explicit and keeps no-floating-promises lint rules happy.
  3. initialized + immediate: true is equivalent to a non-immediate watcher. Since queryFn is a plain callback and Vue will track whatever reactive refs it reads on the first real access, you can drop the flag by using the default (non-immediate) watch.
  4. Interaction with ctx.props.entity. When both ctx.query and ctx.props.entity are provided, clearing entity.value and calling resolve(...) will be short-circuited by resolveByProps() (line 306), so the query change effectively no-ops. Probably not a real-world combination, but worth a comment or an explicit guard if it is.
♻️ Suggested simplification
-    if (ctx.query) {
-        const queryFn = ctx.query;
-        let initialized = false;
-
-        watch(
-            () => JSON.stringify(queryFn()),
-            () => {
-                if (!initialized) {
-                    initialized = true;
-                    return;
-                }
-
-                entity.value = undefined;
-                resolve({ query: queryFn() as any });
-            },
-            { immediate: true },
-        );
-    }
+    if (ctx.query) {
+        const queryFn = ctx.query;
+        watch(
+            // Track reactive deps inside queryFn; deep-compare to avoid
+            // key-order false positives from JSON.stringify.
+            () => queryFn(),
+            () => {
+                entity.value = undefined;
+                void resolve({ query: queryFn() as any });
+            },
+            { deep: true },
+        );
+    }

Can you confirm whether ctx.query is ever expected to be provided together with ctx.props.entity / ctx.props.entityId? If yes, the precedence may need to be spelled out (props-first vs query-first).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/client-web-kit/src/components/utility/entity/record/module.ts`
around lines 398 - 415, The reactive watcher on ctx.query is fragile and
triggers lint issues: replace JSON.stringify(() => queryFn()) with a deep
watcher or stable-stringifier (e.g., watch(queryFn, callback, { deep: true }) or
a stableSerialize(queryFn()) ) to avoid key-order and serialization bugs; mark
the call to resolve({ query: ... }) as fire-and-forget (use void resolve(...) or
add .catch(...)) to satisfy no-floating-promises; drop the manual initialized
flag by removing immediate: true and rely on the default non-immediate watch
behavior (watch(queryFn, ...)), and add an explicit guard so this watcher
early-returns if ctx.props.entity or ctx.props.entityId is present (or document
precedence between resolveByProps and the query watcher) to avoid being
short-circuited by resolveByProps.
packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue (1)

17-19: forwardedSlots only filters itemActions; consider also skipping default.

Object.entries(slots) includes the default slot when the parent passes children without a named template. Re-emitting a default slot under #[name] would collide with any default content ARoles renders itself. It's probably fine in practice (callers of AUserRoleAssignments aren't expected to pass default content), but hardening the filter is cheap:

♻️ Optional hardening
-        const forwardedSlots = computed(() => {
-            return Object.fromEntries(Object.entries(slots).filter(([name]) => name !== 'itemActions'));
-        });
+        const EXCLUDED = new Set(['itemActions', 'default']);
+        const forwardedSlots = computed(() => Object.fromEntries(
+            Object.entries(slots).filter(([name]) => !EXCLUDED.has(name)),
+        ));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue`
around lines 17 - 19, The computed forwardedSlots currently filters out only
'itemActions' but should also skip the 'default' slot to avoid re-emitting
unnamed children; update the forwardedSlots computed (the variable
forwardedSlots that iterates Object.entries(slots)) to filter out both
'itemActions' and 'default' (i.e., exclude slot names equal to 'itemActions' OR
'default') so only intended named slots are forwarded to ARoles.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue`:
- Around line 38-40: The <slot> tag in AUserRoleAssignments.vue contains
excessive whitespace between the tag name and its first attribute; normalize the
formatting by removing the extra spaces so the tag reads with a single space
before attributes (locate the <slot ...> element in the AUserRoleAssignments
component and fix the spacing around :name="name" and v-bind="slotData ?? {}").

---

Nitpick comments:
In
`@packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.vue`:
- Around line 43-45: Fix the formatting of the <slot> tag in
ARobotPermissionAssignments.vue by removing the stray/mixed whitespace between
"<slot" and the ":name" attribute so attributes follow the same inline/indented
style used elsewhere; ensure the <slot> element that uses :name="name" and
v-bind="slotData ?? {}" has consistent spacing and indentation (no mixed
tabs/spaces) so both attributes are aligned cleanly.

In
`@packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue`:
- Around line 17-19: The computed forwardedSlots currently filters out only
'itemActions' but should also skip the 'default' slot to avoid re-emitting
unnamed children; update the forwardedSlots computed (the variable
forwardedSlots that iterates Object.entries(slots)) to filter out both
'itemActions' and 'default' (i.e., exclude slot names equal to 'itemActions' OR
'default') so only intended named slots are forwarded to ARoles.

In `@packages/client-web-kit/src/components/utility/entity/record/module.ts`:
- Around line 398-415: The reactive watcher on ctx.query is fragile and triggers
lint issues: replace JSON.stringify(() => queryFn()) with a deep watcher or
stable-stringifier (e.g., watch(queryFn, callback, { deep: true }) or a
stableSerialize(queryFn()) ) to avoid key-order and serialization bugs; mark the
call to resolve({ query: ... }) as fire-and-forget (use void resolve(...) or add
.catch(...)) to satisfy no-floating-promises; drop the manual initialized flag
by removing immediate: true and rely on the default non-immediate watch behavior
(watch(queryFn, ...)), and add an explicit guard so this watcher early-returns
if ctx.props.entity or ctx.props.entityId is present (or document precedence
between resolveByProps and the query watcher) to avoid being short-circuited by
resolveByProps.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 501b36eb-8bd5-40e0-8481-deead4b47b1f

📥 Commits

Reviewing files that changed from the base of the PR and between 3f9fd4c and bc6c653.

📒 Files selected for processing (28)
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignment.vue
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignments.vue
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.vue
  • packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignment.vue
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-user/APermissionUserAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue
  • packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.vue
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/user-role/AUserRoleAssignments.vue
  • packages/client-web-kit/src/components/utility/entity/record/module.ts
  • packages/client-web-kit/src/components/utility/entity/record/types.ts
✅ Files skipped from review due to trivial changes (4)
  • packages/client-web-kit/src/components/entities/role-user/ARoleUserAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-role/APermissionRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignment.vue
🚧 Files skipped from review as they are similar to previous changes (17)
  • packages/client-web-kit/src/components/entities/client-permission/AClientPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/client-scope/AClientScopeAssignments.vue
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/user-permission/AUserPermissionAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-client/APermissionClientAssignments.vue
  • packages/client-web-kit/src/components/entities/scope-client/AScopeClientAssignments.vue
  • packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/robot-role/ARobotRoleAssignments.vue
  • packages/client-web-kit/src/components/entities/client-role/AClientRoleAssignment.vue
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-user/APermissionUserAssignments.vue
  • packages/client-web-kit/src/components/entities/permission-policy/APermissionPolicyAssignment.vue
  • packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderIcon.vue
  • packages/client-web-kit/src/components/entities/robot-permission/ARobotPermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/role-permission/ARolePermissionAssignment.vue
  • packages/client-web-kit/src/components/entities/permission-robot/APermissionRobotAssignments.vue

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.

refactor: convert hyperscript components (.ts + h()) to Vue SFCs (.vue)

2 participants