Problem / Motivation
The "Preview showcase" button currently appears on the piece detail page for all editable pieces, regardless of whether they are in a terminal state. The showcase view is only meaningful for terminal pieces (where the showcase story and video are finalized), so showing the button for in-progress pieces is premature and potentially confusing.
Additionally, the showcase view (/pieces/:id/showcase) has no navigation back to the piece detail page for the authenticated owner. The current "Edit" button in ShowcaseHeader navigates back, but it is labeled "Edit" rather than something that communicates "return to the piece." Unauthenticated visitors already have the PotterDoc logo linking to /, but authenticated owners deserve a clear way back to the piece they were viewing.
Proposed Solution
- In
PieceDetail.tsx (around line 307), add isTerminal to the gate for the "Preview showcase" button — so it only renders when canEdit && isTerminal.
- In
PublicPieceShell.tsx (ShowcaseHeader), rename the "Edit" button label to something like "Back to piece" (or "View piece") for the authenticated owner case, making the navigation intent explicit.
Acceptance Criteria
Out of Scope
- Changing showcase routing, visibility rules, or share/public access behavior
- Modifying showcase content or layout
Problem / Motivation
The "Preview showcase" button currently appears on the piece detail page for all editable pieces, regardless of whether they are in a terminal state. The showcase view is only meaningful for terminal pieces (where the showcase story and video are finalized), so showing the button for in-progress pieces is premature and potentially confusing.
Additionally, the showcase view (
/pieces/:id/showcase) has no navigation back to the piece detail page for the authenticated owner. The current "Edit" button inShowcaseHeadernavigates back, but it is labeled "Edit" rather than something that communicates "return to the piece." Unauthenticated visitors already have the PotterDoc logo linking to/, but authenticated owners deserve a clear way back to the piece they were viewing.Proposed Solution
PieceDetail.tsx(around line 307), addisTerminalto the gate for the "Preview showcase" button — so it only renders whencanEdit && isTerminal.PublicPieceShell.tsx(ShowcaseHeader), rename the "Edit" button label to something like "Back to piece" (or "View piece") for the authenticated owner case, making the navigation intent explicit.Acceptance Criteria
can_edit: trueShowcaseHeaderis labeled "Back to piece" (not "Edit")PieceDetailtest asserts button absent in non-terminal state, present in terminal state;PublicPieceShelltest asserts button labelOut of Scope