Skip to content

feat(frontend): navigate relative markdown note links - #311

Merged
johaven merged 9 commits into
Sync-in:mainfrom
lakemike:feat/markdown-relative-links
Oct 30, 2026
Merged

johaven merged 9 commits into
Sync-in:mainfrom
lakemike:feat/markdown-relative-links

Conversation

@lakemike

Copy link
Copy Markdown
Contributor

Summary

Addresses #302: open standard relative Markdown note links in the Markdown viewer, resolved against the current document directory.

  • Supports sibling/parent paths, literal and URL-encoded spaces, and heading fragments (including same-document headings).
  • Opens destination notes read-only, checks them using existing authenticated endpoints and destination permissions, and retains the source viewer and unsaved edits in Windows Manager.
  • Supports click in read-only mode and Ctrl/Cmd-click while editing; external HTTP(S) links remain external.
  • Preserves relative link destinations through Markdown serialization and source/visual/save/reopen round trips.
  • Adds focused path/serialization tests and frontend documentation; no backend changes or new dependencies.

Dependency and review scope

Depends on #310 (relative Markdown images). This draft targets main as required by CONTRIBUTING.md, so its current diff also includes #310. The note-link change itself is commit 389b52f3fbe7a04acfea97db4d2d9b9fdd252275 (8 files, 245 insertions, 13 deletions). Rebase onto main after #310 merges before marking ready.

Validation

Local validation on 22 October 2026:

  • 1,763 backend tests and 61 frontend tests passed; type checking and both lints passed.
  • Production frontend build passed, with the existing 106-byte stylesheet-budget warning.
  • Desktop Chrome checks covered relative navigation, spaces, headings, keyboard activation, external links, missing targets, rejected traversal, denied-response handling, retaining unsaved source edits, and source/visual/save/reopen round trips; no JavaScript page errors.
  • Navigation through a read-only shared mount and the relative-image browser regression passed.

Remaining verification and limitations

  • Denied-access UI handling was tested using an injected HTTP 403. A real restricted-user target ACL test has not been independently verified.
  • A separate downloaded/exported Markdown round trip has not been explicitly verified.
  • No browser Back/Forward history, wikilinks, extensionless lookup, backlinks, graph, or block embeds. Non-Markdown local links and context-menu new-tab navigation are outside this change. Missing headings leave the target document open without jumping.

AI-assisted implementation and validation; submitted for human review under the project's AI usage policy.

@johaven

johaven commented Oct 30, 2026

Copy link
Copy Markdown
Member

Hi @lakemike, I reviewed and cleaned up the PR: consolidated Markdown link/image utilities, removed duplicate and dead code, moved Markdown-specific navigation out of FilesService, fixed permissions and hidden-file resolution, preserved edit mode, and simplified link handling.

@johaven
johaven marked this pull request as ready for review October 30, 2026 09:20
@johaven
johaven merged commit bd8aa12 into Sync-in:main Oct 30, 2026
2 checks passed
@johaven

johaven commented Oct 30, 2026

Copy link
Copy Markdown
Member

Resolves #302

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