Add an option to disable Tart clipboard sharing - #475
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Expose noClipboard in VM creation, CLI inspection, and the API schema. Pass --no-clipboard to Tart when requested. Clipboard sharing remains enabled by default for existing VM specifications.
96fa042 to
ad87b24
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad87b24bf0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Headless bool `json:"headless,omitempty"` | ||
| Nested bool `json:"nested,omitempty"` | ||
| NoAudio bool `json:"noAudio,omitempty"` | ||
| NoClipboard bool `json:"noClipboard,omitempty"` |
There was a problem hiding this comment.
Put noClipboard in the mutable VM specification
When a client reads a running VM, changes noClipboard, and calls VMs.Update/PUT /vms/{name}, updateVMSpec compares and copies only the embedded VMSpec. Because this field is declared outside that struct, the controller returns the unchanged resource without incrementing Generation, so the worker never restarts Tart with the new setting. This is especially misleading because the OpenAPI schema exposes noClipboard as part of the request's VMSpec; include it in the Go VMSpec as well.
Useful? React with 👍 / 👎.
| Headless: headless, | ||
| Nested: nested, | ||
| NoAudio: noAudio, | ||
| NoClipboard: noClipboard, |
There was a problem hiding this comment.
Reject noClipboard for the Vetu runtime
With --runtime vetu --no-clipboard, this value is accepted by VM.Validate() and persisted, but the Vetu runner invokes only vetu run <id> and never consumes NoClipboard; therefore the request succeeds while the requested setting has no effect. Since only the Tart runner implements this option, reject it for RuntimeVetu as is already done for other Tart-only fields, or implement the equivalent Vetu behavior.
Useful? React with 👍 / 👎.
Tart supports disabling clipboard sharing, but Orchard does not expose that option when creating a VM. Add the
noClipboardVM field and--no-clipboardcreation flag, pass the option to Tart, and expose it in VM inspection and the OpenAPI schema. Clipboard sharing remains enabled by default.Validation:
go test -count=1 -timeout=120s ./pkg/resource/v1 ./internal/command/create ./internal/command/get ./internal/worker/vmmanager/tart, plus the combined Orchard build.