Settings follow-ups: dropdown keyboard and names, per-identity reviews, auto-discovery in the cluster list - #1966
Conversation
SelectMenu's Tab stop now follows the focused option, so Tab leaves an
open list instead of returning to the selected option, and the trigger's
accessible name includes the selected value ("Cost source: Kubecost"),
as a native select announces it. Placeholder menus keep their label.
The paused-settings review compares against one previous identity, so it
now only offers integrations paused from that same identity; the others
are named for review in their own tab, without claiming a different
cluster when an identity was never recorded.
The per-cluster list's loading, empty, error and remove wording now
matches its heading, and two zero-height siblings no longer add extra
space above the review page.
PR Summary by QodoFix dropdown accessibility and scope paused-settings reviews by identity
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
The roving tab stop follows the highlighted index, which can point past the end of the list if the options are replaced while the menu is open. Clamp it to the rendered options so Tab still enters the list.
Switching an integration to auto-discovery keeps an empty record, and the list API returned only the kind, so the row still said "Saved: Metrics". List entries now carry mode and cluster ID, like the per-cluster profile, and each integration reads as saved, auto-discovery, or Automatic for Cost.
Summary
Four fixes to Settings behavior and one wording fix:
What changed
Dropdowns (
SelectMenuin@skyhook-io/k8s-ui)aria-labelreplaced the visible value, so screen readers heard only "Cost source", unlike the native select it replaced. Menus showing a placeholder, such as "Copy settings from…", keep their label.SelectMenu, in Radar and in other consumers of@skyhook-io/k8s-ui. A test that finds a dropdown by its exact accessible name needs a prefix match once a value is selected.Paused-settings review
When a kubeconfig context's server, certificate authority, proxy or user changes, each integration saved for that context pauses with the identity it was last accepted for. The review page compares one previous identity, the one for the integration you opened. But it used to list every paused integration for approval.
So if Argo CD had been accepted against a different server than Metrics, the page could show "Server: https://… (unchanged)" from Metrics' comparison while still offering Argo CD for approval.
Now:
Integration settings by cluster
What each integration uses. Each cluster's row now gives every integration's status, for example "Argo CD: saved · Cost: Automatic · Metrics: auto-discovery". Before, a cluster whose Metrics had been switched to auto-discovery, for example by declining paused settings, still read "Saved: Metrics". Switching keeps an empty record for the integration, and the list API returned only the kind.
List entries (
GET /api/integrations/connections→connections[]) now includemodeandclusterId, as the per-cluster profile already does. An integration reads as saved when its record has an endpoint, a credential, a Kubecost cluster mapping, an explicit cost source, or a validation error; otherwise it reads as auto-discovery, or Automatic for Cost, matching the action that set it.Wording. The list's loading, empty, error and remove messages now use its heading's name: "No integration settings saved yet.", "Remove saved settings?", "Removed the saved Metrics settings for …". They still said "saved connections".
Spacing
Two empty elements no longer add about 32px of space above the review page's content.
Testing
make build;make tsc; the full k8s-ui vitest suite passes, including a new jsdom test that shrinks the options while the menu is open. Settings and cost vitest pass.go test ./internal/connections ./internal/server ./internal/config. The decline test now checks that the list reports the saved Kubecost cluster ID, and auto-discovery with no mapping after declining.npm run test:e2e:settings: 135/135. New or updated coverage: