Skip to content

feat: add slice edit and slice edit-variation commands#107

Merged
angeloashmore merged 4 commits intoaa/remote-modelingfrom
aa/slice-edit
Apr 10, 2026
Merged

feat: add slice edit and slice edit-variation commands#107
angeloashmore merged 4 commits intoaa/remote-modelingfrom
aa/slice-edit

Conversation

@angeloashmore
Copy link
Copy Markdown
Member

@angeloashmore angeloashmore commented Apr 10, 2026

Resolves: #92

Description

Adds slice edit and slice edit-variation commands to update slice and variation metadata after creation.

Also fixes type edit:

  • Adds try/catch fallback for local adapter call when the custom type doesn't exist locally
  • Removes --repeatable/--single flags (the Custom Types API rejects updates to the repeatable property)

Adds E2E tests for type edit, slice edit, and slice edit-variation.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

node --run build
./dist/index.mjs slice edit --help
./dist/index.mjs slice edit-variation --help
./dist/index.mjs type edit --help

Note

Medium Risk
Adds new CLI flows that mutate slice/variation metadata via the Custom Types API and local adapter sync, plus removes type edit flags which is a small breaking CLI change. Risk is moderate due to touching update paths and user-facing command surfaces, but changes are scoped and covered by E2E tests.

Overview
Adds prismic slice edit and prismic slice edit-variation commands to rename a slice or a specific variation, persisting changes via updateSlice and syncing the local adapter (with updatecreate fallback) before regenerating types.

Updates prismic type edit by removing unsupported --repeatable/--single flags and adding the same adapter updatecreate fallback to avoid failures when the type isn’t present locally. Adds E2E coverage for the new slice commands and the updated type-edit behavior.

Reviewed by Cursor Bugbot for commit 65a795f. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

angeloashmore and others added 4 commits April 9, 2026 15:17
Adds two new subcommands for editing slice and variation metadata after
creation. Also adds E2E tests for the recently added `type edit` command.

Closes #92

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wraps adapter.updateCustomType in try/catch with createCustomType
fallback, matching the pattern used in other commands. Prevents crash
when the local customtypes/ directory doesn't contain the edited type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Custom Types API does not support updating the repeatable property;
it must be changed from the writing room UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Edit commands should only expose options that the corresponding create
command exposes. `slice add-variation` does not accept --description.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@angeloashmore angeloashmore merged commit ebf788b into aa/remote-modeling Apr 10, 2026
13 checks passed
@angeloashmore angeloashmore deleted the aa/slice-edit branch April 10, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant