Repository navigation
feat: ✨ show clear, localized messages after creating a link - #46
Merged
Merged
Conversation
Symlinker used to show mklink's raw output after creating a link, for
example "symbolic link created for <link> <<===>> <target>". It is in the
language of Windows, not the app's, and long paths wrapped mid-path in
the small dialog.
- Decide success from the exit code, then confirm on disk that the link
is there and leads to the target (LinkCheck.IsCreated): the stored
target for symbolic links and junctions, the same file for hard links.
- On failure, LinkCheck.Diagnose maps common causes to a LinkError code:
link path taken, hard link across drives, junction to a network folder,
no symbolic link privilege, folder access denied. mklink's text stays
as the detail for anything else. The code travels over the elevated
helper's pipe as a number, so both paths report the same way.
- LinkResultMessage builds the dialog: a title per link type ("Symbolic
link created"), a sentence with the names, and the link and target
paths on their own lines, shortened in the middle when long. The move
and link flow uses it too, and its failure text uses Reason().
- Message dialogs use most of the window width so a path fits on a line.
- New strings in all 9 languages; LinkSuccessfullyCreated is gone.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Set "What's new" in all 9 languages for the link result messages and the Store version's AppData move guard, and point ReleaseNotesVersion at 4.4.0 so the release job uses them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
amd989
added a commit
that referenced
this pull request
Nov 18, 2026
Brings in #46 (localized link result messages). Batch and single links now report results through LinkResultMessage: created links get the new titles and text, failures in the batch summary use Reason(), and a failed link during a move rolls back with that reason. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After creating a link, Symlinker used to show mklink's raw output, for example
symbolic link created for D:\...\accounts\Test <<===>> D:\...\benchmarks. It was in the language of Windows instead of the app's, and long paths wrapped mid-path in the small dialog. Now Symlinker decides the outcome itself and shows a formatted, localized message.Success (title per link type, names in a sentence, each path on its own line):
Hard links say
"Test.txt" is now another name for the file "benchmarks.txt".Junctions get "Junction created".Failure (plain headline, mapped reason, mklink's text only when unmapped):
Changes
LinkCommand.RunAsyncuses the exit code, thenLinkCheck.IsCreatedconfirms on disk that the link is there and leads to the target: the storedLinkTargetfor symbolic links and junctions (relative symbolic link targets resolve against the link's folder), and the same volume and file index for hard links. Exit code 0 without a link is reported asNotCreated.LinkResulthas a newError(LinkError).LinkCheck.Diagnosemaps the common cases from what is on disk, never from mklink's text:Unknown, and mklink's own text is shown as the detailLinkResultstill only holds plain values;Errortravels over the pipe as a number. Both ends are the same exe, and the in-process pipe test now also checks aLinkExistsreply.LinkResultMessage(new, self-contained) builds the title and text. Long paths are shortened in the middle (D:\...\Anno 1800\accounts\Test, 52 characters max) so each fits on one line after the longest label (Italian "Destinazione:").LinkResultMessage.ForMove), and its rollback message usesReason()instead of raw mklink output.MessageDialogmost of the window width (MahApps keeps only the middle half by default). This applies to all message dialogs.Result*strings, grouped whereLinkSuccessfullyCreatedwas, in all 9 languages, with typed properties inResources.Designer.cs.LinkSuccessfullyCreatedis removed.Reuse point for batch links (#6)
The batch summary can format each row without touching the dialog code:
LinkResultMessage.For(request, result)returns(Title, Message)for one link.LinkResultMessage.Reason(request, result)returns a single localized failure line, suitable for a row.LinkResultMessage.CompactPath(path)shortens a path for a narrow column.LinkResult.Messagekeeps its name and still holds mklink's raw text, so existing callers keep compiling.Testing
dotnet test --project Symlinker.Tests: 226 passed, 0 skipped, 100% line, branch and method coverage.LinkCheckTests(real junctions, hard links and symbolic links, a deny ACL for the access check, a locked file for the same-file fallback) andLinkResultMessageTests(every reason, every link type, path shortening).🤖 Generated with Claude Code