[Bug] 新建提醒写入失败时保留表单并提示

Aperta
#68 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start with the new-alert handler in packages/ui/src/components/alert/AlertList.tsx (around lines 40-46), then the state update in packages/ui/src/atoms/alertAtoms.ts (lines 134-141), and the save channel in packages/ui/src/client/alerts.ts. Run bun test packages/ui/src/atoms/alertAtoms.test.ts first to see the current behaviour with a mocked alerts.saveRules returning EACCES. Done means a failed save keeps the form open with an error and a retry option, the list matches what was actually saved, and a retry after failure produces exactly one rule.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:desktop bug help wanted

最小复现

让模拟的 alerts.saveRules 返回 EACCES,再新建一条 AAPL.US 价格提醒。在隔离状态测试中,保存失败后列表仍新增了一条规则,错误状态为空。重新读取模拟存储时,这条规则消失。提醒列表的新建处理也会直接关闭表单。

验证环境为 Windows、Bun 1.4.2,基于 main 的 579395e。

验收标准

  • 新建提醒写入失败时保留用户填写的内容,显示可重试的提示,并使列表反映实际保存状态。
  • 用模拟 IPC 验证失败和成功。失败后重试成功时只生成一条规则,刷新后仍能读取。

源码起点

验证入口 bun test packages/ui/src/atoms/alertAtoms.test.ts。

可以先在本条说明准备完成的范围,再评论 /claim。贡献入口见 #7。

Lingua principale
TypeScript
Stelle
206
Fork
37
Merge medio
7h 8m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ydflow/Trail

Tutte le issue di ydflow/Trail

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.