Add PagePreview orphan-badge parity with Card.tsx - #398
Merged
Conversation
Ports Card.tsx's OrphanBadge corner treatment to the /display sheet's own renderer, closing the documented gap and unblocking parity-wave1's red test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
WilfordGrimley
added a commit
that referenced
this pull request
Jul 23, 2026
WilfordGrimley
added a commit
that referenced
this pull request
Jul 23, 2026
* Port parity wave 1: import/card-detail/export test clusters onto DisplayPage Un-skips and ports 58 tests from the classic /editor grid onto the unified page (issue #272 wave 1): ImportCSV/ImportText/ImportXML + visual (29), the CardDetailedViewModal ecosystem via Browse mode (20), ExportDecklist/ ExportXML content-correctness (6), AddCardToProjectForm (3). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Fix orphan-cardback test's dangling importXML reference in ImportXML.spec.ts * Adapt orphan-cardback test's badge assertion to the sheet's per-slot corner badge (#398) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
WilfordGrimley
added a commit
that referenced
this pull request
Jul 24, 2026
* Swap Proposal H's unified page onto /editor, redirect /display Nav-redesign PR #313 only pointed the "Editor" nav label at /display while the classic grid page stayed live at /editor - per the owner's explicit directive, this completes the actual route swap: the unified sheet+rail page now serves at /editor, /display is a client-side redirect preserving query params/hash, and the classic ProjectEditor is fully unrouted (component kept in-tree, deletion is a later decision). Ports ProjectEditor's beforeunload unsaved-work guard onto DisplayPage (it lived only in the now-unrouted component, so it wasn't naturally inherited). Fixes a real, unrelated redirect-preservation bug found in useBackendSetter.ts while verifying (documented in troubleshooting.md, not fixed here - pre-existing, affects every page, out of scope). ~190 Playwright tests that exercised classic-/editor-only UI (CardSlot grid, SelectedImagesRibbon bulk-select, GridSelectorModal-as-modal, etc. - issue #272's own tracked parity gaps) are now individually skipped with a standard citation rather than left red or silently deleted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Port chunkErrorRecovery/DisplayLeftRailFidelity specs to the unified-page route (proposal-h) * Port import/card-detail/export test clusters onto DisplayPage (#395) * Port parity wave 1: import/card-detail/export test clusters onto DisplayPage Un-skips and ports 58 tests from the classic /editor grid onto the unified page (issue #272 wave 1): ImportCSV/ImportText/ImportXML + visual (29), the CardDetailedViewModal ecosystem via Browse mode (20), ExportDecklist/ ExportXML content-correctness (6), AddCardToProjectForm (3). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Fix orphan-cardback test's dangling importXML reference in ImportXML.spec.ts * Adapt orphan-cardback test's badge assertion to the sheet's per-slot corner badge (#398) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * Port ChangeQueryModal/Toasts/a11y/InvalidIdentifiers/SelectVersionSection clusters onto DisplayPage (#403) Wave 2 of issue #272: un-skips and ports 44 Playwright tests from the classic /editor grid onto the unified DisplayPage (issue #272 wave 2): SelectVersionSection (7, already-adapted, just needed its skip removed), ChangeQueryModal via the shared CardSlotContextMenu (9), 3 Toasts.spec.ts tests that fire on plain landing-page mount, GeneralUIAccessibility's per-slot a11y checks (3), InvalidIdentifiersStatus (5) + its visual companion, and SearchSettings.visual (1). Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * Port pin-persistence tests to unified-page routing * Port GridSelectorModal/CardSlot clusters onto DisplayPage (#410) * Port GridSelectorModal/CardSlot clusters onto DisplayPage (issue #272 wave 3) Un-skips 30 of 55 deferred tests (GridSelectorModal.spec.ts + GridSelectorModalVariants.spec.ts fully, CardSlot.spec.ts partially), retargeted onto CardbackToolbarButton's cardback picker and the sheet's page-preview-slot context menu; ports 2 of 6 CardSlot.visual.spec.ts aria-snapshot tests, regex-tolerant on unrelated pre-existing icon-font rendering leaves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Fold the DOM-API sheet gap into the doc body per edit-in-place convention --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.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.
Summary
indexed, e.g. from a foreign order) a corner
OrphanBadgeonCard.tsx(the classic editor's card renderer), but recorded a known gap in
docs/features/foreign-order-resilience.md:PagePreview.tsx— the/displayunified sheet's own renderer — had no equivalent visualtreatment, even though it already rendered the orphan's image correctly.
PagePreviewSlotContentgains anorphanLabel?: stringprop; when set (and a resolved
imageUrlis present), the slot renders adata-testid="orphan-badge"pill in its top-right corner, matchingCard.tsx's badge styling but reimplemented in this component's own mm-unit
idiom (so it stays legible after the sheet's outer
transform: scale(),same reasoning as the component's existing screen-only border/radius).
Wired from both callers that already resolve a
CardDocument:DisplayPage.tsx(the/displaysheet) andPDFGenerator.tsx's fastpreview.
orphan-badgetestid Card.tsx already uses, by design, so a spec cantarget either surface uniformly — this was the actual blocker: a parity
test on the
parity-wave1branch (ImportXML.spec.ts's orphan-cardbackcase) is red today because no orphan indicator exists anywhere on
/display.docs/features/foreign-order-resilience.mdupdated in place to mark thegap CLOSED, with the new files/props/tests recorded.
Why now
Foreign-order resilience is a high-priority feature (owner ruling,
2026-07-22/23) and
/displayis its acceptance surface. The badge gap was arecorded, tracked item blocking a parity test elsewhere — this closes it on
masterso that test's adaptation can proceed independently.Evidence
npx jest— 568/568 passing (64 suites), including newPagePreview.test.tsx"orphan badge" cases (label shown/omitted/gated on a resolved
imageUrl).npx tsc --noEmit— clean.npx prettier@2.7.1 --checkon every changed file — clean.npx playwright test tests/OrphanRendering.spec.ts(extended with sheetbadge assertions on both faces + a new 390px-narrow case) — 3/3 passing.
npx playwright test tests/PagePreview.spec.ts— 3/3 passing (noregression).
npx playwright test tests/DisplayPage.spec.ts— 31/31 passing (noregression).
frontend/test-results/orphan-text-import-desktop.png,frontend/test-results/orphan-xml-import-desktop.png,frontend/test-results/orphan-xml-import-backs-desktop.png(the "cardbackcorner" case),
frontend/test-results/orphan-text-import-narrow-390.png(390px phoneviewport).
Test plan
npx jest(full suite)npx tsc --noEmitnpx prettier@2.7.1 --checkon changed filesnpx playwright test tests/OrphanRendering.spec.ts(desktop + narrow)npx playwright test tests/PagePreview.spec.tsnpx playwright test tests/DisplayPage.spec.tsdocs/itself covers thissurface today — no wiki page identified as needing a change; flagging
here per the merge-time checklist convention in case a reviewer knows
of one this misses.
🤖 Generated with Claude Code