Align with TPEN messaging contract — read siblings from TPEN_CONTEXT#3
Merged
Conversation
Replace the dedicated CANVASES boot message with the canonical lean TPEN_CONTEXT payload — sibling pages now arrive on the `siblings` field of TPEN_CONTEXT instead of a separate canvases-only message.
This was referenced May 8, 2026
Merged
cubap
reviewed
May 8, 2026
| if (event.data.type === "TPEN_CONTEXT") { | ||
| try { | ||
| const canvases = event.data.canvases || [] | ||
| const canvases = event.data.siblings || [] |
Member
There was a problem hiding this comment.
I'll need to check this... Does siblings include the current page?
Member
Author
There was a problem hiding this comment.
Yes — and renamed to canvases in cd4d134 to match the parent rename in CenterForDigitalHumanities/TPEN-interfaces#564. The active canvas is included so the dropdown can label 'you are here' (matches the legacy CANVASES shape this replaces).
Match parent rename in CenterForDigitalHumanities/TPEN-interfaces#564. Field shape unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <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
Align Compare-Pages with the canonical TPEN messaging contract. Replace the legacy
CANVASESpayload withTPEN_CONTEXT.canvases. The full contract is defined in CenterForDigitalHumanities/TPEN-interfaces#564.Changes
iiif-image-viewer.jsTPEN_CONTEXTinstead ofCANVASES.event.data.canvases. Field shape is identical to the priorCANVASESpayload:{ id, label }per entry, whereidis the canvas IRI for that page — Compare-Pages already fetchesidas a IIIF canvas.Coordinated cut
Hard cut, all PRs must merge together. Full contract and other PRs:
Test plan
Developer-validated locally on 2026-05-08 against CenterForDigitalHumanities/TPEN-interfaces#564 on
:4000:jekyll s), add Compare-Pages to a project's tools. Open/transcribe.CANVASESconsumer)Companion follow-up (deferred, does not block this cut)
TPEN_CONTEXT.canvasesonly includes pages from the layer containing the active page, mirroring the legacyCANVASESshape that this PR replaces. Once the parent broadens to cross-layer, this PR's consumer picks it up automatically with no code change here.