Skip to content

fix: resolve relative links from source notes - #488

Open
losnah-think wants to merge 1 commit into
Feel-ix-343:mainfrom
losnah-think:agent/relative-link-resolution
Open

fix: resolve relative links from source notes#488
losnah-think wants to merge 1 commit into
Feel-ix-343:mainfrom
losnah-think:agent/relative-link-resolution

Conversation

@losnah-think

Copy link
Copy Markdown

/claim #274

Summary

  • resolve explicit ./ and ../ wiki and Markdown links relative to the note containing the link
  • preserve existing bare-name and vault-root path behavior while rejecting traversal outside the vault
  • normalize Windows separators and escaped or URL-encoded spaces, and strip only the final .md extension so dotted stems survive
  • generate relative file, heading, and block completions with the same lexical path rules

Validation

  • cargo fmt --check
  • cargo check --locked
  • cargo test --locked — 86 passed
  • cargo clippy --all-targets — no new warnings; existing main warnings remain
  • git diff --check
  • Neovim 0.12 headless A/B against the same temporary vault:
    • main: parent, sibling, and dotted relative definitions returned 0 targets; unresolved diagnostic remained; ../ completion absent
    • this branch: each definition returned 1 target; diagnostic cleared; ../available completion present
    • bare-name and vault-root links resolved in both versions

No TestFiles content was changed. This contribution was AI-assisted with OpenAI Codex and manually reviewed, including an independent diff review.

@losnah-think
losnah-think marked this pull request as ready for review August 9, 2026 05:56
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.

1 participant