Conversation
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
5 similar comments
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
|
Hi! I'm che-ai-assistant — I help with your pull requests. I check for new comments every 10m0s, so there may be a short delay before I respond. Available commands:
|
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
1 similar comment
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
|
/che-ai-assistant generate-che-doc |
|
/che-ai-assistant ok-pr-review |
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
olexii4
left a comment
There was a problem hiding this comment.
The backend architecture-filtering is clean and well-tested. The blocklist approach for event filtering is a sound default. A few things worth discussing before merge.
Must address before merge:
- Double-toggle in
handleVersionSelectrelies on React batching twosetStatecalls in a specific order (see inline). If the parent ever adds async side effects or uses a non-functionalsetState, both calls silently cancel each other. startsWith(id)prefix check in the event selector can produce false positives when one workspace ID is a prefix of another (see inline).
Worth addressing:
componentDidUpdatereference equality causes unnecessary re-renders -groupByProviderId()creates new arrays on every parent render.- The type guard in
aiRegistryApi.tsassertsAiToolDefinitionshape without verifying any of its fields. groupByProviderIdis duplicated across three components with inconsistent sort order.
Suggestions (fine as follow-up):
- No component-level test verifies that
WorkspaceEventscorrectly filters events from another workspace in the rendered output. Selector-level tests are there, but a regression where the component stops passingworkspace.idwould go undetected. - CSS raw pixel values and inline style objects in JSX should move to CSS modules.
- The committed PR doc file describes cross-repo work not in this diff.
- use PatternFly spacing token for padding-top in Entry card title - use rem value for top offset in TagLabel (replaces raw px) - move inline style object on badge group span to CSS class - use non-empty tuple type for toolGroup prop to encode invariant - add comment explaining why kebab is shown for single-version cards - add providerId shape check to AiToolDefinition type guard - extract shared groupToolsByProvider() utility to aiTools.ts with deterministic alphabetical ordering; use it in Gallery and SelectorModal - use lightweight workspace id/name selector in selectEventsFromResourceVersion to avoid recomputing on every workspace status update - fix startsWith(id) false-positive with delimiter-aware id check - add comment documenting opaque treatment of digest-pinned image versions - note companion-repo work in PR description doc Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
olexii4
left a comment
There was a problem hiding this comment.
General findings
AiSelector factory flow ignores the user's version choice
AiSelector.handleProviderToggle tracks only selectedProviderIds: string[]. The version dropdown in AiProviderEntry updates local component state (activeTool) but that choice is never surfaced to AiSelector - it only calls onSelect(providerIds). Callers then use addAiToolToWorkspace(workspace, toolId, aiTools) without a tag argument, always picking the first tool matching providerId regardless of what the user selected.
The version dropdown in the factory/create-workspace gallery is effectively cosmetic. SelectorModal (the workspace-details path) correctly propagates versions via onConfirm(selectedVersions), but the AiSelector path does not.
Does it make sense to add a selectedVersions map to AiSelector state and thread it through onSelect(providerIds, selectedVersions) - similar to how AiToolFormGroup handles it?
WorkspaceEvents component test does not verify workspace-scoped filtering
The selectors.spec.ts tests cover the filtering logic well. However, there are no component-level tests in WorkspaceEvents/__tests__/index.spec.tsx that verify events from another workspace are hidden in the rendered output. A regression where the component stops passing workspace.id to eventsFromResourceVersionFn would not be caught at the selector level.
Would it be possible to add one test that renders WorkspaceEvents with two workspaces in the store and checks that events from the other workspace do not appear?
olexii4
left a comment
There was a problem hiding this comment.
General findings
AiSelector factory flow ignores the user's version choice
AiSelector.handleProviderToggle tracks only selectedProviderIds: string[]. The version dropdown in AiProviderEntry updates local component state (activeTool) but that choice is never surfaced to AiSelector - it only calls onSelect(providerIds). Callers then use addAiToolToWorkspace(workspace, toolId, aiTools) without a tag argument, always picking the first tool matching providerId regardless of what the user selected.
The version dropdown in the factory/create-workspace gallery is effectively cosmetic. SelectorModal (the workspace-details path) correctly propagates versions via onConfirm(selectedVersions), but the AiSelector path does not.
Does it make sense to add a selectedVersions map to AiSelector state and thread it through onSelect(providerIds, selectedVersions) - similar to how AiToolFormGroup handles it?
WorkspaceEvents component test does not verify workspace-scoped filtering
The selectors.spec.ts tests cover the filtering logic well. However, there are no component-level tests in WorkspaceEvents/__tests__/index.spec.tsx that verify events from another workspace are hidden in the rendered output. A regression where the component stops passing workspace.id to eventsFromResourceVersionFn would not be caught at the selector level.
Would it be possible to add one test that renders WorkspaceEvents with two workspaces in the store and checks that events from the other workspace do not appear?
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
- add onVersionChange prop to AiProviderEntry and AiProviderGallery so version changes are communicated explicitly instead of double-toggling - use content-based tag comparison in componentDidUpdate to avoid unnecessary setState on every parent render - extract getInjectedAiToolInfo combining getInjectedAiToolIds and getInjectedAiToolVersions into a single component pass; update all callers in AiToolFormGroup to use the unified function - use groupToolsByProvider in InfoModal to be consistent with Gallery and SelectorModal (no more inline findIndex dedup) - move SelectorModal checkbox label inline style to SelectorModal.module.css; replace raw pixel values on the Label with rem equivalents - remove redundant cloneDeep in handleConfirmChanges: remove/add functions already clone internally so the up-front copy was wasted work - add tests for addAiToolToWorkspace tag parameter (valid tag, unknown tag fallback, undefined tag) and getInjectedAiToolInfo - add version-selection tests to SelectorModal: dropdown rendering, Save enable/disable on version change, auto-select, onConfirm payload Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
|
/retest |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1643 +/- ##
==========================================
+ Coverage 92.42% 92.56% +0.13%
==========================================
Files 596 596
Lines 61391 61880 +489
Branches 4782 4872 +90
==========================================
+ Hits 56741 57277 +536
+ Misses 4589 4541 -48
- Partials 61 62 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Documents two features shipped in eclipse-che/che-dashboard#1643: - arch-aware filtering: add the optional `arch` field to the tool registry JSON example, document accepted values (x86_64, arm64, s390x, ppc64le), and explain that the backend filters the tool list by the architectures present in the cluster before sending it to the dashboard (a tool is shown if at least one cluster node matches). Add a NOTE that OpenCode supports only x86_64 and arm64 because the official upstream image does not publish s390x/ppc64le builds. - version picker: document that when a provider has multiple tool entries with different tag values, the AI Selector shows a version picker. Update the end-user guide with a dedicated section and explain the same picker is available on the workspace Overview tab. Update the change-AI-tool procedure to cover selecting a specific image variant via the ellipsis menu. relates to https://redhat.atlassian.net/browse/CRW-11779 Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
- selectors.ts: use slice() instead of splice() to avoid mutating the throwaway split array (r3759907540) - AiTool/index.tsx: eliminate redundant third getInjectedAiToolInfo call in componentDidUpdate — destructure ids and versions from the first call and reuse both in the setState branch (r3759907555) - AiProviderEntry: only render the version dropdown when onVersionChange is provided and toolGroup has more than one entry; removes the misleading interactive element in the factory flow where version selection was silently dropped (r3759907561) - AiSelector: drop the no-op onVersionChange prop; the gallery now hides the dropdown automatically when no handler is supplied - Update tests to match new conditional-dropdown contract; fix AiTool/index.spec.tsx mock to use getInjectedAiToolInfo (unified API) Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
Documents two features shipped in eclipse-che/che-dashboard#1643: - arch-aware filtering: add the optional `arch` field to the tool registry JSON example, document accepted values (x86_64, arm64, s390x, ppc64le), and explain that the backend filters the tool list by the architectures present in the cluster before sending it to the dashboard (a tool is shown if at least one cluster node matches). Add a NOTE that OpenCode supports only x86_64 and arm64 because the official upstream image does not publish s390x/ppc64le builds. - version picker: document that when a provider has multiple tool entries with different tag values, the AI Selector shows a version picker. Update the end-user guide with a dedicated section and explain the same picker is available on the workspace Overview tab. Update the change-AI-tool procedure to cover selecting a specific image variant via the ellipsis menu. relates to https://redhat.atlassian.net/browse/CRW-11779 Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
The backend reads the node architecture from DevWorkspace operator server info and filters the AI tool registry so only tools whose arch list includes the running architecture are returned. On IBM Z (s390x) and Power (ppc64le) clusters this prevents tools with no compatible injector image from appearing in the dashboard. Hardened the type predicate to require a string providerId so malformed ConfigMap entries are rejected rather than passed through as typed values. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Switches from allowlist (show only current workspace events) to blocklist
(hide events belonging to other workspaces, show everything else). This
preserves generic cluster events and avoids false negatives when event
object names do not carry a workspace ID prefix.
Uses a lightweight selector that extracts only {id, name} pairs from raw
DevWorkspace state to avoid recomputing full Workspace adapter objects on
every status update.
Assisted-by: Claude Sonnet 4.6
Signed-off-by: Oleksii Orel <oorel@redhat.com>
…rsion tracking Adds groupToolsByProvider to group tool definitions by providerId into non-empty sorted arrays, consolidates getInjectedAiToolIds and getInjectedAiToolVersions into a single getInjectedAiToolInfo call, and extends addAiToolToWorkspace with an optional tag parameter so callers can inject a specific image version rather than always picking the first match. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
…sion providers When a provider has more than one tool entry (e.g. next vs insiders), the gallery card shows a kebab version dropdown. Selecting a version updates the card's active tool display and calls onVersionChange so the parent can persist the choice. Single-version providers and gallery contexts that do not supply onVersionChange show no dropdown. Also adds the version TagLabel to the card header and moves Tech-Preview badges into the card title so the layout is consistent across providers. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
The Change AI Tools modal now shows a version dropdown for multi-version providers and tracks the selected version independently of the checkbox state. Auto-selects the provider when the user picks a version. Saves button becomes active when only the version changes with no selection change. AiToolFormGroup uses getInjectedAiToolInfo to initialise and sync both the selected IDs and the selected versions from the workspace, and passes originVersions to the modal so it can detect version-only changes. When confirmed, tools whose version changed are removed and re-added with the new tag using addAiToolToWorkspace. InfoModal now uses groupToolsByProvider for deduplication to stay in sync with SelectorModal and Gallery. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
1 similar comment
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
Registry entries may use Docker/OCI naming (amd64, aarch64) while the Architecture type and uname -m use Linux naming (x86_64, arm64). Without normalization the arch filter never matches OCI-named entries and tools are silently dropped. Maps amd64->x86_64 and aarch64->arm64 at read time so registries using either naming convention are accepted. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
…rm64) arch names Extends the Architecture type to include OCI/Docker aliases amd64 and aarch64 alongside the existing Linux kernel names x86_64 and arm64. Registry entries may legitimately use either naming convention; both are now valid in tool arch lists and as currentArch values. The filter normalises both sides of the comparison to Linux canonical names before matching, so amd64==x86_64 and aarch64==arm64 regardless of which side uses which convention. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
1 similar comment
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1643 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1643", name: che-dashboard}]}}]" |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: olexii4, svor The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
…3185) Documents two features shipped in eclipse-che/che-dashboard#1643: - arch-aware filtering: add the optional `arch` field to the tool registry JSON example, document accepted values (x86_64, arm64, s390x, ppc64le), and explain that the backend filters the tool list by the architectures present in the cluster before sending it to the dashboard (a tool is shown if at least one cluster node matches). Add a NOTE that OpenCode supports only x86_64 and arm64 because the official upstream image does not publish s390x/ppc64le builds. - version picker: document that when a provider has multiple tool entries with different tag values, the AI Selector shows a version picker. Update the end-user guide with a dedicated section and explain the same picker is available on the workspace Overview tab. Update the change-AI-tool procedure to cover selecting a specific image variant via the ellipsis menu. relates to https://redhat.atlassian.net/browse/CRW-11779 Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>


What does this PR do?
Filters AI tools in
/dashboard/api/ai-registryby the current cluster architecture so thattools without a binary for the host platform are never surfaced to users.
Adds an optional
arch?: Architecture[]field toAiToolDefinition. When set, a tool isreturned only if the cluster architecture (detected via
uname -m, normalised tox86_64/arm64/s390x/ppc64le) appears in the list. Tools with noarchfield are returned onevery architecture.
Current state of
registry.jsonin [che-incubator/che-ai-tool-images@CRW-11779](https://github.com/che-incubator/che-ai-tool-images):["x86_64", "arm64"]linux-x64andlinux-arm64binaries; no s390x/ppc64le["x86_64", "arm64", "s390x", "ppc64le"]["x86_64", "arm64"]linux-x64andlinux-arm64binaries; no s390x/ppc64leWhat issues does this PR fix or reference?
fixes https://redhat.atlassian.net/browse/CRW-11779
Is it tested? How?
curl https://<che-host>/dashboard/api/ai-registry | jq '[.tools[].name]'; verify Claude Code, Gemini CLI, and OpenCode all appear.uname -mreportss390x: run the samecurl; verify Claude Code is absent and the remaining three tools are present.uname -mfailure (e.g. patchgetCurrentArchitectureto throw); verify the endpoint still returns 200 with all tools and aWARNentry appears in the dashboard pod logs.Release Notes
The AI tool registry endpoint now filters tools by cluster architecture; tools without a supported
binary for the host platform (for example, Claude Code on IBM Z) are automatically excluded.
Docs PR
eclipse-che/che-docs#3185
AI Tool PR
che-incubator/che-ai-tool-images#6