feat(clusters): let a plugin row action decide which clusters it applies to - #1415
Merged
hibig merged 1 commit intoSep 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a row-level predicate check (item.show) to filter cluster action items based on the current row's state. The review feedback correctly points out a potential runtime error since item is typed as any, and suggests safely verifying that item.show is a function before calling it.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The reviewed change is focused, and no unresolved issues were identified.
Review effort: Balanced
Findings: None
What changed in this PR
Adds row-specific visibility filtering for plugin actions in the cluster management table.
Changes:
- Evaluates an optional
show(row)predicate before existing provider-based filters. - Preserves current provider and default visibility behavior.
| File | Description |
|---|---|
src/pages/cluster-management/hooks/use-cluster-columns.tsx |
Filters cluster row actions using plugin-defined row predicates. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
…ies to The cluster row-action filter only knew how to gate on `provider`, so an action whose applicability depends on a cluster option had no way to exclude itself and showed up on every row. Honour an optional `show(row)` predicate first, the same seam the my-models card actions already use. Contributed actions are untyped at the plugin boundary, so a `show` that is not callable falls through to the provider rules instead of throwing mid-render.
gitlawr
force-pushed
the
feat/cluster-row-action-show-predicate
branch
from
September 24, 2026 06:20
f198f9c to
8c181ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cluster row-action filter only knew how to gate on
provider, so an action whose applicability depends on a cluster option had no way to exclude itself and showed up on every row. Honour an optionalshow(row)predicate first, the same seam the my-models card actions already use.