You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Copy Link to Page generates identical links for pages in different external notebooks #128
Windows, Rust 1.99.1, NoteCraft 0.0.9 at 33429876e885613f6ff8f29a762b15b2be736401 (current main when tested). Verified against the real workspace libraries / front end with synthetic files and an isolated profile. No product source changes or mocks.
Reproduction
Open two notebooks located outside the main notebooks root: away1/book-a and away2/book-b.
Give each a section named Section and a page named Page.
Generate each page's Copy Link to Page target using the actual links::page_uri with roots [main_root, book_a, book_b].
Resolve the link generated for Book B with links::resolve_in against those open roots.
Resolving B's copied link opens Book A's page, because it is the first root with that relative path. The target changes with root order. Reproduced on real notebook folders using the public store APIs.
Expected result
A page link must identify the intended notebook and page unambiguously. Copying B's link must open B, regardless of the order notebooks were opened and whether another notebook has the same section/page names.
Cause / coverage
links.rs, page_uri, strips the matched root. For an external notebook that root is the notebook itself, so the notebook identity disappears. resolve_in then returns the first matching path under any root.
Include the notebook identity in the link contract and cover two external notebooks with identical layouts. This is separate from Unicode parsing (#102) and missing targets after moving a page.
Duplicate check
Checked all open/closed issues and PRs, including the first audit's #102-#116 and new PRs #117-#120. No existing issue or PR covering this specific behavior was found.
Activity