NEC-287: Advise Obsidian's relative link format for vaults with shared folders #296

Merged
nectenda-agent merged 2 commits from worktree-nec-287-advise-obsidians-relative-link-format-fo into main 2026-10-15 17:12:02 +01:00
Collaborator

Task: NEC-287 — https://projectron.nerchure.com/tasks/300

Offer Obsidian's relative link format once a folder is shared. The default format writes some links with this vault's name for the shared folder, which a vault naming it differently cannot follow without a current plugin (NEC-285). Offered as a Settings row (Use relative links / Keep my format) and in one combined share-time dialog with the attachment-location advice; never set without a click, and existing links are left as written. Review found the share-time dialog only opened on a role refresh, never on a share or map; it now opens from those paths, defended in commands.test.ts. Tested by the user in their vaults before this PR.

Spec: docs/changes/NEC-287-relative-link-format/spec.md

Changelog

After you share or map a folder, Nectenda offers to switch Obsidian to relative links, so new links work in every vault that has the folder, even under another name.

Task: NEC-287 — https://projectron.nerchure.com/tasks/300 Offer Obsidian's relative link format once a folder is shared. The default format writes some links with this vault's name for the shared folder, which a vault naming it differently cannot follow without a current plugin (NEC-285). Offered as a Settings row (Use relative links / Keep my format) and in one combined share-time dialog with the attachment-location advice; never set without a click, and existing links are left as written. Review found the share-time dialog only opened on a role refresh, never on a share or map; it now opens from those paths, defended in commands.test.ts. Tested by the user in their vaults before this PR. Spec: `docs/changes/NEC-287-relative-link-format/spec.md` ## Changelog After you share or map a folder, Nectenda offers to switch Obsidian to relative links, so new links work in every vault that has the folder, even under another name.
Obsidian's default link format writes a path from the vault root when two
files share a name, and that path carries this vault's name for the shared
folder. A vault that names it differently, without a current plugin, sees a
broken link. Relative links work in every vault.

The plugin now offers the change, as it does the attachment location: a row
in settings with "Use relative links" and "Keep my format", and one dialog at
share time that asks about whichever of the two settings need it. It never
sets the format without a click, and existing links are left as written.

Task: NEC-287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Q3wkKUPf5nkpbTBxJqreu
Ask about shared-folder settings when a folder is shared, not on a role change
All checks were successful
Release note / release-note (pull_request) Successful in 29s
CI / build (pull_request) Successful in 6m13s
CI / e2e (pull_request) Successful in 12m45s
CI / promote (pull_request) Has been skipped
CI / build (push) Successful in 5m51s
CI / e2e (push) Successful in 12m8s
CI / promote (push) Successful in 11s
73fbb9d652
The dialog sat on the folder list's role refresh, as the attachment-only one
had. Sharing or mapping a folder stores the role the server reports, so that
refresh never fires for either, and the dialog opened on a promotion rather
than a share. It now opens from the share and map paths themselves.

Also corrects an e2e comment that said the plugin's resolver never touches a
relative link: it runs, and returns Obsidian's own answer.

Task: NEC-287

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Q3wkKUPf5nkpbTBxJqreu
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!296
No description provided.