fix: apply versioningEnabled in canvases update#3903
Merged
forestileao merged 7 commits intomainfrom Apr 2, 2026
Merged
Conversation
Co-authored-by: Pedro Leão <forestileao@users.noreply.github.com>
|
👋 Commands for maintainers:
|
forestileao
commented
Apr 2, 2026
Co-authored-by: Pedro Leão <forestileao@users.noreply.github.com>
shiroyasha
reviewed
Apr 2, 2026
shiroyasha
reviewed
Apr 2, 2026
shiroyasha
reviewed
Apr 2, 2026
Collaborator
Author
|
@cursoragent the current PR is very complex to understand. it has a lot of nesting. And the test is hard to aunderstand too Take a look also in the undersolved comments from @shiroyasha |
Contributor
Reduced complexity per review feedback
Simplified tests
Verification + PR update
|
Co-authored-by: Pedro Leão <forestileao@users.noreply.github.com>
forestileao
commented
Apr 2, 2026
Co-authored-by: Pedro Leão <forestileao@users.noreply.github.com>
Co-authored-by: Pedro Leão <forestileao@users.noreply.github.com>
shiroyasha
reviewed
Apr 2, 2026
Collaborator
|
Looks better. |
Co-authored-by: Pedro Leão <forestileao@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
harxhist
pushed a commit
to harxhist/superplane
that referenced
this pull request
Apr 4, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
### What
- `superplane canvases update -f` now applies
`metadata.versioningEnabled` from canvas YAML.
- The CLI blocks attempts to disable canvas versioning when
organization-level versioning is enabled.
### Why
- `versioningEnabled` is canvas *metadata*, not part of canvas version
updates, so it was being ignored.
- The backend enforces org-level versioning (org > canvas); attempting
to disable at the canvas level should be an explicit error.
### How
- When YAML explicitly sets `metadata.versioningEnabled`, the CLI issues
an additional `PUT /api/v1/canvases/{id}` with `{"versioningEnabled":
<bool>}`.
- Toggle logic is now encapsulated in a small planning helper
(`planCanvasVersioningUpdate`) to keep `Execute` readable.
### Tests
- Canvas update tests were simplified using an expectation-based API
test server helper to avoid large handlers and make request ordering
assertions easier to read.
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-9cf85b36-e0b9-437a-96a3-a7416f0b8601"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-9cf85b36-e0b9-437a-96a3-a7416f0b8601"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Pedro Leão <forestileao@users.noreply.github.com>
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.




What
superplane canvases update -fnow appliesmetadata.versioningEnabledfrom canvas YAML.Why
versioningEnabledis canvas metadata, not part of canvas version updates, so it was being ignored.How
metadata.versioningEnabled, the CLI issues an additionalPUT /api/v1/canvases/{id}with{"versioningEnabled": <bool>}.planCanvasVersioningUpdate) to keepExecutereadable.Tests