mirror of
https://github.com/cozystack/cozystack.git
synced 2026-03-02 21:18:54 +00:00
## What this PR does Updates the openapi-k8s-toolkit integration in the dashboard to fix two UX issues: **1. Allow clearing the instanceType field in VMInstance form** When `instanceType` has a default value, clearing the field in the form UI would silently revert to the default, making it impossible to explicitly send an empty value. This blocked use of custom KubeVirt resources without a named instance type. Adds `allowEmpty: true` to the instanceType listInput field so the BFF preserves an explicit empty value. Also introduces a generic `persistType` prop (`'str' | 'number' | 'arr' | 'obj'`) to the listInput component, so the allow-empty behaviour works correctly for any field type, not just strings. Updates openapi-k8s-toolkit to release/1.4.0 (d6b9e4ad), which already includes the FormListInput layout refactor — the previous formlistinput-value-binding.diff patch is no longer needed. Upstream PR: https://github.com/PRO-Robotech/openapi-k8s-toolkit/pull/340 **2. Preserve newlines when copying secrets with CMD+C** Native `input[type=text]` strips newlines on copy. Adds an `onCopy` handler to the SecretBase64Plain component that intercepts the copy event and writes the full decoded value (including newlines) to the clipboard. Upstream PR: https://github.com/PRO-Robotech/openapi-k8s-toolkit/pull/339 ### Release note ```release-note [dashboard] Fix clearing instanceType in VMInstance form: explicit empty value is now correctly sent to the API instead of falling back to the schema default. Fix CMD+C copying of secrets stripping newlines. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Dropdown fields now support configuration to allow empty selections * Enhanced empty value handling for form fields across multiple data types (string, number, array, object) * **Bug Fixes** * Fixed secret field copy functionality to preserve plain-text format when visible * **Chores** * Updated base image dependencies for dashboard build <!-- end of auto-generated comment: release notes by coderabbit.ai -->