Skip to content

fix(frontend): hide delete button on non-editable schema options (IFC…#9428

Merged
pa-lem merged 2 commits into
stablefrom
ple-IFC-2663-stable-hide-delete-non-editable
Jun 2, 2026
Merged

fix(frontend): hide delete button on non-editable schema options (IFC…#9428
pa-lem merged 2 commits into
stablefrom
ple-IFC-2663-stable-hide-delete-non-editable

Conversation

@pa-lem
Copy link
Copy Markdown
Contributor

@pa-lem pa-lem commented Jun 2, 2026

The inline delete (trash) button on Enum and Dropdown input options was rendered for every option, including those on non-user-editable schema namespaces (e.g. the Core group_type enum: "default"/"internal"). The backend rejects deleting these, so users hit an error toast.

Gate the delete button on useNamespace(schema.namespace)?.user_editable, mirroring the existing "+ Add option" affordance which was already gated the same way. Also add an aria-label to the icon-only delete buttons.

Fixes #9389


Summary by cubic

Hide the delete button for Enum and Dropdown options when the schema namespace is not user-editable. This prevents error toasts and matches backend rules (IFC-2663; Core group_type "default"/"internal").

  • Bug Fixes
    • Added aria-label "Delete option" to icon-only delete buttons for accessibility.
    • Added tests for Enum and Dropdown covering editable vs. non-editable namespaces.

Written for commit be34b79. Summary will update on new commits.

Review in cubic

…-2663)

The inline delete (trash) button on Enum and Dropdown input options was
rendered for every option, including those on non-user-editable schema
namespaces (e.g. the Core `group_type` enum: "default"/"internal"). The
backend rejects deleting these, so users hit an error toast.

Gate the delete button on `useNamespace(schema.namespace)?.user_editable`,
mirroring the existing "+ Add option" affordance which was already gated
the same way. Also add an `aria-label` to the icon-only delete buttons.

Fixes #9389

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the group/frontend Issue related to the frontend (React) label Jun 2, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

Review completed

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. This change hides delete buttons on non-editable schema namespaces to match backend behavior, preventing confusing error toasts, and adds tests and aria-labels; the blast radius is limited to UI rendering logic with no risk to core business logic, data integrity, or infrastructure.

Re-trigger cubic

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

0 issues found across 2 files (changes from recent commits).

Shadow auto-approve: would auto-approve. This PR gates the delete button on non-user-editable namespaces using the same check already applied to the add option button, adds accessibility aria-labels, and includes thorough tests—all changes are low-risk, isolated UI logic with no impact on backend, data, or critical paths.

Re-trigger cubic

@pa-lem pa-lem marked this pull request as ready for review June 2, 2026 13:57
@pa-lem pa-lem requested a review from a team as a code owner June 2, 2026 13:57
@pa-lem pa-lem merged commit edbff71 into stable Jun 2, 2026
58 checks passed
@pa-lem pa-lem deleted the ple-IFC-2663-stable-hide-delete-non-editable branch June 2, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/frontend Issue related to the frontend (React)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Delete (bin) button is accessible on undeletable items during account groups creation

2 participants