[Bug] 诊断导出后显示保存结果与写入失败提示

Open
#62 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bun, electron, react, typescript

Research direction

Start with the export click handler in packages/ui/src/components/settings/DiagnosticsTab.tsx (around lines 56-63), then the export channel wrapper in packages/ui/src/client/diagnostics.ts (around lines 117-130), and the desktop save dialog and write in apps/electron/src/main/index.ts (around lines 413-424). Add a result state for success, cancel and write failure, with a retryable message in the current language, then write component tests that mock the IPC response for each of the three outcomes and check the label and button state. Done when all three states render correctly and the button returns to its idle label in each case.

Written by the indexing model from the issue text.

Description

area:desktop bug help wanted

问题与复现

在「设置 → 诊断」点击导出。组件测试分别让导出通道返回保存成功、用户取消和 EACCES 写入失败。三种情况下按钮都恢复到「导出诊断」,界面也没有结果反馈。保存失败后,用户无法判断诊断文件是否落盘。

在 Windows 和 Bun 1.4.2 上基于 main 的 579395e 验证。 使用模拟导出通道进行组件层复验。

验收标准

  • 保存成功时显示完成提示,写入失败时给出当前语言下可重试的提示,取消保存时回到待操作状态。
  • 模拟三种结果分别验证界面状态及按钮恢复。测试使用合成的诊断快照和 IPC 响应。

源码起点

认领前可先说明准备完成的范围,再评论 /claim。参与方式见 #7。

Dominant language
TypeScript
Stars
206
Forks
37
Avg merge
8h 8m
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ydflow/Trail

All issues in ydflow/Trail

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.