diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..19152a5 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "allow": [ + "Bash(git *)", + "Bash(pbcopy)" + ] + } +} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..59b58dd --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,8 @@ +# Text Guidelines + +- Check the grammar of any text and adjust if necessary. Text must ALWAYS be written in ENGLISH. +- Write the text using user-manual style language: clear, simple, and accessible, avoiding unnecessary technical jargon, while retaining all technical details explicitly documented in the source, without omitting or oversimplifying them. + +# Versioning + +Do not ask to commit, operations like `commit`, `add`, `push` are done manually by the user diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000..47dc3e3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/css/input.css b/css/input.css index 2dc284d..e73d455 100644 --- a/css/input.css +++ b/css/input.css @@ -160,13 +160,19 @@ td.copy-cmd.copied::after { } img.wiki-img { - max-width: 50%; + max-width: 100%; border: 1px solid #94a3b8; border-radius: 4px; background-color: #fff; padding: 3px; } +@media (min-width: 768px) { + img.wiki-img { + max-width: 50%; + } +} + table.file-legend tr td { padding: 6px 10px; } diff --git a/css/theme.css b/css/theme.css index b2f4ddf..44e7cc3 100644 --- a/css/theme.css +++ b/css/theme.css @@ -1584,12 +1584,17 @@ td.copy-cmd.copied::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); } img.wiki-img { - max-width: 50%; + max-width: 100%; border: 1px solid #94a3b8; border-radius: 4px; background-color: #fff; padding: 3px; } +@media (min-width: 768px) { + img.wiki-img { + max-width: 50%; + } +} table.file-legend tr td { padding: 6px 10px; } diff --git a/trustedPaths.md b/trustedPaths.md index 8da8601..0451183 100755 --- a/trustedPaths.md +++ b/trustedPaths.md @@ -19,24 +19,37 @@ VisualDiffer prompts a file panel when it can't access a file due to a permissio [Using VisualDiffer as external diff tool with sandbox](#using_visualdiffer_as_external_diff_tool_with_sandbox) ===================================================== -VisualDiffer can be used to compare files using other applications, for example to compare a remote file version with the local one. +Other applications can use VisualDiffer to compare files, for example, to compare a remote version of a file with its local version. -Applications like Dreamweaver save the remote version to a temporary file and then pass the generated full path to VisualDiffer, but this path isn't trusted, so VisualDiffer shows the file panel every time. +An application can save the remote version to a temporary file and then pass its full path to VisualDiffer. However, the path is not trusted, so VisualDiffer displays the file panel every time. -This behaviour generates a very frustrating user experience because the user must select the file from the panel again and again. +This behavior can be frustrating because you must select the file from the panel repeatedly. [Use Trusted Paths](#use_trusted_paths) ================= -Trusted paths resolve this problem because applications save files in their own specific temporary folders; for example SourceTree can generate the following path: +Trusted paths solve this problem because applications save files in their own temporary folders. For example, an application can generate the following path: /var/folders/mr/5dfd6w717cj5j374q24fdxsh0000gn/T/2PhpDQ_UnifiedDiff.m -but trusting it works only once because the path component **5dfd6w717cj5j374q24fdxsh0000gn/T/** is randomly generated and changes every time. +Trusting this path works only once because the **5dfd6w717cj5j374q24fdxsh0000gn/T/** path component is generated randomly and changes every time. -We can trust **/var/folders**, which is the root used by SourceTree to save temporary files. +Instead, you can trust **/var/folders**, the root directory used to save temporary files. -Trusting **/var/folders** ensures every path generated inside it (at any deeper subfolder level) doesn't require any additional user permission and the file panel prompts no longer appear. +Trusting **/var/folders** ensures that paths generated anywhere inside it do not require additional permission, preventing further file panel prompts. + +[Trust the File System from the Root (`/`)?](#trust_high_level) +============================= + +Integrating VisualDiffer with [Finder](finder.html) through Services or Quick Actions can make the user experience even more frustrating. The items you want to compare can be located anywhere, either on the main disk or on external disks under `/Volumes/`, causing the file selection panel to appear repeatedly. + +You may wonder, “I have just selected this path in Finder, so why am I being asked to open it?” This behavior is required by the sandbox. Finder and VisualDiffer are separate processes, and trusted paths cannot be transferred between them. + +### [Workaround](#trusted_workaround) + +⚠️ This workaround is not a complete solution. You can manually add a high-level directory, such as `/Volumes` or `/`, to Trusted Paths. Every path below that directory will then be accessible without requiring you to select it. + +Use this workaround only if you understand that it grants VisualDiffer access to everything below the selected directory. VisualDiffer does not send or index data, and it performs file operations only when explicitly initiated by the user, so this approach can be considered “safe.” [Where to configure Trusted Paths](#where_configure_trusted_paths) =============================