Repository navigation
Refine reader presentation and keep paper navigation and music continuous - #5
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b98076627
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9b1f2181f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
@tgrospic The four follow-up points are addressed:
The follow-up scrollport findings are also addressed within their implementation commits: overflowing code, table and math ports are reachable with Tab and retain native scrolling keys, and scrolled snapshots preserve both their outer border boxes and clipped viewports so classic scrollbar gutters cannot reflow following content. The snapshots retain resolved typography and paint; ordinary book and button shortcuts keep their behavior. Cancelling a browser traversal restores the retained history position without overwriting the selected chapter, including a navigation queued during restoration; same-URL traversals also adopt the accepted history position before reusing their frame. The narrow Rust disclosure concern was checked against mdBook's actual nested pre structure: the panel, margins and Copy hit target fit at 390px on every profile, so no CSS change was made. Oversized titles at 320px and maximum text scale now continue onto another leaf, while fitting titles keep their original atomic layout. Native fallback preserves push/replace history, its deadline is suspended while hidden, and disclosure toggles refresh the derived tab stops directly. Pending entrance redirects retain their originating navigation intent rather than replacing the source chapter's history. Cancelling a country-selected redirect now leaves the retained entrance ready for welcome autoplay and trusted-interaction recovery when reopened. Exact-head CI #101 passes 865/865 on The backdrop-search report was also checked against the installed native handler and three desktop engines: hiding via its toggle retains the query in both inner and outer URLs, so that reported mismatch was not reproduced and native behavior was preserved. Ready for another look. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f81c6e9e48
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ddd069f2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a187b8c033
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b1992e28b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a51ef3952c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bind the entrance, shared music, pure transitions and paper renderer to a retained mdBook chapter shell. Preserve the approved controls, typography, themes, content and navigation. Keep browser laws and broken fixtures beside this integration, and load native readiness from a normal TypeScript module. Summarize product intent in the repository guide; review evidence belongs in the PR. Make overflowing reading ports keyboard-reachable and retain their native paging keys without changing the book shortcuts elsewhere. Retain source history on ordinary native fallback, suspend its deadline during hidden paint readiness, and refresh local reading focusability when disclosures toggle. Retarget uncommitted edition redirects with their original navigation intent and ignore redirect requests from superseded documents. Keep the retained entrance ready for welcome recovery if its country-selected edition redirect is cancelled. Restore cancelled traversals to their retained history position, preserving intervening entries and queued navigation. Verify narrow disclosure geometry against the actual generated Rust structure without changing the approved CSS. Allow only naturally oversized headings to fragment at narrow maximum-scale layouts; retain atomic headings and the approved presentation whenever they fit one leaf. Adopt the selected history position when an accepted same-URL traversal reuses the active frame. Measure printed title ink separately from platform-dependent font selection-box leading, retaining an atomic-heading counterexample. Keep 320px magic toolbar actions inside the viewport and place native search outside the transformed mobile drawer container. Extend the same reader laws to tablet WebKit.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
@tgrospic The responsive pass and all eight follow-up reader findings are addressed on The approved fonts, colors, content and controls are preserved. Of 48 rendered Chinese reading states at eight viewport sizes/orientations, 44 match Navigation/history cancellation, request reuse, native 404 handling and live chapter progress are covered. Direct chapter Print now includes the complete text without replacing the live reader or duplicating players; exiting preview preserves position. Print checks pass 18/18 across six profiles, and actual Chromium PDFs retain the chapter ending across 10 pages instead of one clipped page. Exact-head CI run107 passes 1030/1030 tests with zero failures or skips. The latest automated review is complete, with no unresolved review threads. Tablet/phone coverage is browser simulation, not physical-device or soft-keyboard acceptance. Please check the PR and merge if everything looks good. I will look again for smaller issues when I have time. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
@shixi-11 thank you for the reader work and for addressing the review comments. I made a larger architectural change on top of your series: the magic world is now a separate React app with React Router, while the real world is mdBook's own site. Previously, the reader worked across generated chapter documents inside a persistent iframe shell. Keeping the book and music continuous meant coordinating document loading, readiness signals, pending navigation, frame promotion and audio ownership. The shell had to manage a chapter as both a browser document and a view inside the reader. Many of the difficult cases in this PR came from keeping those two lifecycles synchronized. React gives magic one persistent application. The entrance and reader are app views, and chapter navigation changes the route and chapter content inside the same document. The surrounding controls and audio element stay mounted across chapters. This removes the iframe shell and its document-handoff machinery, and gives React Router responsibility for app navigation and browser history. Markup, chapter behavior, search, music and preferences now have separate modules, making those responsibilities easier to follow and change. The paper-turn implementation, pure transition model and pinned StPageFlip adapter remain in use for the physical book presentation. mdBook still defines the book. A custom mdBook renderer produces each edition's book JSON after localization, admonitions and KaTeX preprocessing. React reads that data using the chapter paths and order derived from mdBook. A site-test law checks that every magic chapter's rendered content agrees with the corresponding mdBook page. Adding or translating a chapter therefore does not require maintaining another chapter list for the app. The real world now uses mdBook's own template, navigation, search and page behavior. Its header title links back to the entrance. Removing the copied template and reader shell lets mdBook manage its pages directly, and keeps magic's presentation and state management within the React app. For readers, magic keeps the facing-page book on wide screens, one leaf on narrow screens, continuous reading, day/night themes, paper folds, fixed binding, gutter and ribbon. Text size, reading mode, bookmarks and chapter progress are remembered. Chapter links use app navigation, so reading music continues without loading another document. Search uses mdBook's generated search index and searcher, with CJK substring matching. I also made these behavior changes:
A development container supplies the pinned build tools and browser dependencies. Tests follow the new architecture: site laws cover mdBook's pages and magic's book data, while browser scenarios cover the app. I also removed the exhaustive reader sweep and simplified the audio tests. Testing audio-file decoding and real playback on every CI run was excessive for this repository. Automatic CI now runs only the non-browser suite with |
Preserves the approved reader experience on the mdBook + TypeScript + Vite architecture from #4. Canonical
src/, native generated chapters, chapter-only pagination and the native?reader=nativefallback remain authoritative.The post-refactor differences were at presentation boundaries: separate live/snapshot origins and running-head box models, a renderer starting with its corner already lifted, font-driven relayout during folds, and document-owned audio. Those causes and the preserved behavior belong here rather than in a second repository contract.
Edition names and country assignments now live on each entry in
languages.ts; the country lookup is derived and rejects malformed or duplicate assignments. The paper inset is a CSS custom property read by the paper renderer. StPageFlip's public declaration excludes renderer internals; the closed-corner drag, idle-draw and curl-light hooks are confined to a named adapter with an exact-version contract plus checks of every private method on an initialized installed HTML engine (including missing, non-callable and incompatible-argument counterexamples). The installed dependency supplies its license notice to the bundle, replacing the hand-maintained public copy.A pure
reader-transition.tsmodel describes changes between world, reading mode, chapter and normalized progress. Paper folds and frame commits consume its accepted destination; font and document-load measurements are deferred while a fold is pending, view/geometry replacement invalidates it, and stale readiness cannot commit. The shell retains the old native chapter until the new one's fonts and chapter images settle and passes transient inert paper directly between same-origin documents. Serialized rendered HTML, the sessionStorage handoff protocol and its handoff-specific inline template bootstrap are removed. Native readiness is a separateweb/native-ready.tsmodule loaded as/native-ready.js; it preserves the DOMContentLoaded marker and event ordering. Vite builds and serves both reader entry points. Native fallback preserves push-versus-replace history semantics and its initialization deadline runs only while the outer reader is visible. Disclosure toggles refresh local scrollport focusability without relying on a later font event. Changing world, mode, scale or viewport also invalidates a pending chapter request, preserving the current selection. Uncommitted frames cannot overwrite saved preferences or enter shared music; on promotion they refresh current preferences and redraw bookmarks before taking audio ownership. Restoration scroll events settle before the fold starts. Only headings measured taller than one leaf may fragment at large text scales; fitting headings retain their atomic live/snapshot geometry. Captured typography preserves source font, direction and unitless leading; incompatible edition layouts commit as settled native views instead of importing foreign paper. Native same-frame replacements activate their new controls; cancelled history preparations restore the retained chapter's URL, and an accepted entrance persists its detected edition. A BFCache departure retains music controls for restoration and rebinds welcome playback on persisted entrance restoration, while chapter replacement disposes only departing listeners. Unentered prepared documents preserve the saved music checkpoint until the accepted reader consumes it. Shared volume initializes only on the first committed reading entry; pending controllers cannot reset it, and failed persistence retains its live value. Completed welcome narration is not restarted by ordinary interaction or focus recovery; its explicit play button remains available. Edition navigation reads its URL after the link's fragment handler. An uncommitted entrance redirect retains the originating navigation's push/replace intent and direction; superseded documents cannot redirect the retained reader.Snapshot construction walks original and cloned trees together before replacing descendants, retaining visual offsets for scrolled code, tables and display math. Welcome playback binds only to a committed entrance, checks visibility before each attempt, and retries on return to the foreground. Explicit gateway choices cancel pending entrance redirects even when the world value is unchanged. Video snapshots use a poster or derived YouTube artwork, otherwise a visible label. Overflowing code, table and math scrollports are keyboard-reachable and retain native paging keys without invoking the book's page/chapter shortcuts. Scrolled paper snapshots preserve their outer border boxes, clipped client viewports, resolved typography and paint, so classic scrollbar gutters cannot change following layout during a fold. Browser fixtures select canonical chapters by their source content through
expectedSite(), rather than fixed chapter paths. State laws, edition validation, dependency-version checks and broken inset/media fixtures have negative cases; delayed-font scenarios exercise cancellation through the real shell.AGENTS.mdkeeps a short product-intent section covering worlds, modes, themes, turns, music, entrance and identity; the denotational meaning section remains. Dated correction notes, duplicated pixel histories, the personal-portfolio reference anddocs/reader-experience.mdare removed. Same-chapter search-result navigation cancels older preparation immediately, and native query edits, clearing and Escape keep the shell address synchronized. The PR is a six-commit linear series: edition identity and country routing, entrance selection and welcome playback, reading music ownership, the pure transition model, the pinned paper adapter, and the persistent reader integration. Each module's tests accompany its implementation; browser laws accompany the shell and control integration. The commits add their final implementations without later fixups or reversals.Cancelling a browser history traversal returns to the retained entry without rewriting the selected destination; explicit navigation waits for that restoration. Accepted local page turns cancel pending chapter preparation, and discarding a superseded country result still completes welcome initialization for later re-entry. CI supplies a virtual PulseAudio output for headless audio checks; PR checks cancel superseded heads independently of serialized master publication.
Responsive controls keep their existing appearance at ordinary widths. Below 360px, magic toolbar actions use two rows with full touch targets and a reachable drawer toggle. The native search markup sits outside the transformed mobile page wrapper, so opening search from the directory keeps the modal in the viewport without changing query, result or dismissal behavior. The same browser laws now include an iPad Mini/WebKit tablet profile.
Tablet and mobile browser profiles are simulations. Physical-device Safari acceptance is not claimed. Automated checks, owner visual acceptance and maintainer approval remain separate.