POST /api/source-links with enable: true left the new link in the source
when the config could not be saved, so the dialog reported a failure the
filesystem did not match and a retry failed with "already exists". Share
one sourcelink.Discard rollback between the CLI and the handler.
Use the existing link detection and target resolution helpers so correct directory junctions pass the source-link core, API, and CLI tests. Accept the Windows junction kind while retaining symlink coverage and target identity checks without platform skips.
follow_source_links only follows a link the user made by hand, so the
guards (source or parent, sync target overlap, link chain) surfaced in
doctor only after the link existed, and Windows users had to pick
between a junction and mklink /D themselves.
link checks the prospective target with Follow.Allow, which shares the
guard rules and reason strings with the walk, before creating a junction
on Windows or an absolute symlink elsewhere. It warns when the target is
not a git checkout and leaves follow_source_links alone unless --enable
is given. unlink moves only the link entry to trash, the same way
uninstall removes a first-level link, so the target is never touched and
trash restore undoes it. internal/sourcelink holds both operations so the
dashboard can call them too.
Refs #419