Skip to content

fix(webUI): handle non-ASCII filenames in snapshot diff#7757

Closed
JASON-QWeb wants to merge 2 commits intoanomalyco:devfrom
JASON-QWeb:opencode/issue/7670
Closed

fix(webUI): handle non-ASCII filenames in snapshot diff#7757
JASON-QWeb wants to merge 2 commits intoanomalyco:devfrom
JASON-QWeb:opencode/issue/7670

Conversation

@JASON-QWeb
Copy link
Copy Markdown

Summary

Fixes #7670
Same as #7408

This PR resolves on Web: when containing non-ASCII filenames, Path is error, so filenames and git diff will display uncorrect and cause SyntaxError.

Problem

  • For non-ASCII filenames (CN/KOR/JP) , Git emits quoted paths, so the filenames in session diffs don’t match the ones in snapshot diffs.
  • shell interpretation can interfere with git show when paths contain Unicode characters, resulting in empty before/after content when get summary diff.

Changes

  • use Bun.spawn to get git show, so it can avoid Bun shell interpretation error
  • add decodeGitQuotepath to handle non-ASCII filenames (CN/KOR/JP)

Solution

Make non-ASCII filenames (CN/KOR/JP) path can be decode correctly like other filenames on Web.

Verification

Make changes to three file: test.py , 测试.py and 시험.py

Before:

  • Filename is wrong and click will cause error
Before1 Before2

After:
After

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@github-actions
Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Mar 19, 2026
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.

OpenCode Desktop bug

1 participant