Skip to content

fix(ui): 显示图片复制失败原因并保留原图 - #456

Merged
Qiyuanqiii merged 3 commits into
mainfrom
Qiyuanqiii/image-clipboard-feedback
Oct 27, 2026
Merged

Qiyuanqiii merged 3 commits into
mainfrom
Qiyuanqiii/image-clipboard-feedback

Conversation

@Qiyuanqiii

@Qiyuanqiii Qiyuanqiii commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Right-clicking Copy image after clipboard permission was denied incorrectly offered Reload image and hid the failure reason in a tooltip. The image remains loaded; the menu now displays the action failure, and a successful retry replaces it with Image copied. Thumbnail and original-viewer copy actions share a localized permission-denial message.

Base: #432 (Qiyuanqiii/docs-current-state). Changes are limited to the existing image UI and its regression coverage.

Real before/after screenshots

Microsoft Edge on Windows, production Go API and production frontend, 1280 × 900. The same real PNG was uploaded through the picker. The browser's actual clipboard permission was denied, then granted for the recovery check. Verification notes.

Before After
Misleading image reload Clipboard failure explained
Copy after allowing clipboard access

Successful retry clears the error

Validation

  • New regression fails on the previous implementation and passes with the fix.
  • 25 image input/viewer tests; TypeScript and production build passed.
  • Real clipboard rejection, subsequent success and cleared error checked in Edge; clipboard PNG remains 1258 × 802.
  • Save image remains available when copying is denied; downloaded SHA-256 matches the original.
  • git diff --check.

Surface governance

  • No Surface is added, promoted, downgraded, deprecated, or removed.
  • Registry item(s): N/A — existing image actions retain their scope.

Audit

  • Existing image verification and clipboard permission enforcement are preserved.
  • No credentials or temporary service metadata are committed.
  • Actual behavior and screenshots are recorded in the acceptance README.

最新提交 2ae3b4c73c60e62927e486e8853445c387855146 的 完整 CI 已通过:23 项成功,0 失败、0 等待。

Base automatically changed from Qiyuanqiii/docs-current-state to main October 27, 2026 05:40
@Qiyuanqiii
Qiyuanqiii merged commit 325e690 into main Oct 27, 2026
13 checks passed
@Qiyuanqiii
Qiyuanqiii deleted the Qiyuanqiii/image-clipboard-feedback branch October 27, 2026 18:19
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.

1 participant