feat: show legacy slices in slice list and type view - #390
Merged
Merged
Conversation
`slice list` marks legacy slices with * and shows the type that defines them. `slice list --legacy` lists only legacy slices. `type view` lists the slices in each slice zone and marks legacy ones. Commands that edit a slice now say when the slice is a legacy slice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H4jg7fmGVLhLJjo27eC7Mj
1 of 3 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H4jg7fmGVLhLJjo27eC7Mj
angeloashmore
marked this pull request as ready for review
October 1, 2026 01:01
lihbr
approved these changes
Oct 1, 2026
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.
Related: DT-3535
Description
Before this PR, the CLI ignored legacy slices, the slices that the Legacy Builder defines inside a type. For example,
slice listdid not show them, andslice view heroon a legacy slice failed as a CLI bug.After this PR,
slice listandtype viewmark legacy slices, andslice list --legacylists only them. Commands that edit a slice say when it is a legacy slice.Upgrading legacy slices is in #388, which builds on this PR.
Checklist
Preview
How to QA 1
In a project with legacy slices, run
npx prismic slice list,npx prismic slice list --legacy --json, andnpx prismic type view <type>.🤖 Generated with Claude Code
https://claude.ai/code/session_01H4jg7fmGVLhLJjo27eC7Mj
Note
Low Risk
Read-only listing and clearer errors for slice lookup; no changes to model sync, auth, or write paths beyond messaging.
Overview
Legacy Builder slices embedded in custom types are no longer invisible in the CLI.
getLegacySlicesscans slice zones for non-SharedSlicechoices and powers the new behavior.prismic slice listmerges shared slices with legacy ones in a table (NAME, ID, DEFINED IN), marks legacy rows with*, and adds--legacy(including JSON withdefinedIn/sliceZone).prismic type viewlists each slice zone’s choices and asterisks legacy entries, with a short footnote when the type contains any.Adapter.getSlicenow detects a legacy ID and fails with aCommandErrorexplaining that the CLI cannot edit legacy slices (e.g.slice view hero), instead of a generic not-found error.Reviewed by Cursor Bugbot for commit 5d5a697. Bugbot is set up for automated code reviews on this repo. Configure here.
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩