Skip to content

fix(guided-nav): deduplicate shared documents in Strategy 2#175

Open
m-abs wants to merge 1 commit into
mainfrom
fix/guided-navigation
Open

fix(guided-nav): deduplicate shared documents in Strategy 2#175
m-abs wants to merge 1 commit into
mainfrom
fix/guided-navigation

Conversation

@m-abs

@m-abs m-abs commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Multiple readingOrder items can link to the same guided-navigation
document URL. Strategy 2 treated each alternate as unique (like
sync-narration), causing the shared document to be fetched once per
referencing item and all its entries to be stamped with the wrong
reading-order position.

Fix on all three platforms: collect distinct URLs before fetching, then
use the textref-based position lookup (same as Strategy 1) instead of
the fixed per-item position stamp. Removes _flattenWithFixedPosition
(web) which is now dead code.

Multiple readingOrder items can link to the same guided-navigation
document URL. Strategy 2 treated each alternate as unique (like
sync-narration), causing the shared document to be fetched once per
referencing item and all its entries to be stamped with the wrong
reading-order position.

Fix on all three platforms: collect distinct URLs before fetching, then
use the textref-based position lookup (same as Strategy 1) instead of
the fixed per-item position stamp. Removes _flattenWithFixedPosition
(web) which is now dead code.
@m-abs m-abs requested a review from ddfreiling July 1, 2026 20:46
@m-abs

m-abs commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

Note: Restored branch from before history rewrite

@m-abs m-abs marked this pull request as ready for review July 2, 2026 10:23
@ddfreiling

ddfreiling commented Jul 3, 2026

Copy link
Copy Markdown
Member

@m-abs Hvad er injection_asset.dart ? Hvad har den at gøre i dette PR?
Måske den hørte til #174 ? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants