UX: unify error/notification handling — severity, persistence, and silent failures
维护者通常 4 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- electron, react, typescript
调研方向
Start with src/store/notification.ts and the toast rendering in App.tsx:941-961, then trace the listed failure sites in PromptInput.tsx, TaskPanel.tsx, PushDialog.tsx, MergeDialog.tsx, and the dialogs using String(err). Check existing notification and error-handling tests before changing behavior. Done means severity, history, accessible announcements, and the specified failure and merge outcomes are handled consistently; the issue does not name tests.
由索引模型根据 Issue 内容生成。
描述
Problem
The notification system is a single global toast slot with a fixed 3-second timeout — errors and info are visually identical, messages clobber each other, and several failures never reach the user at all.
Current state (src/store/notification.ts:5-12):
- One message slot; a new
showNotification()clears the prior timer and replaces the text, so concurrent messages are lost. - Fixed 3000 ms auto-dismiss regardless of message length or severity.
- "Prompt copied to clipboard" (
TaskAITerminal.tsx:209) and "Couldn't scan existing worktrees: …" (Sidebar.tsx:265) render identically. - The toast (
App.tsx:941-961) is a plain click-to-dismiss div: no copy affordance, no history, norole="status"/aria-live(never announced to screen readers).
Failures that are currently silent or lost:
- Prompt send failure is console-only:
catch (e) { console.error('Failed to send prompt:', e); }(PromptInput.tsx:827-833). The text stays in the field, but nothing tells the user the send failed — it just looks like the agent ignored them. - Background push failure loses its reason: closing PushDialog mid-push and failing later yields a bare "Push failed" toast (
TaskPanel.tsx:623); reopening the dialog wipes the captured error and output via the reset effect (PushDialog.tsx:24-29). - Cancelling MergeDialog while a merge is in flight (Cancel is never disabled,
ConfirmDialog.tsx:75-91) closes the dialog; if the merge then fails,setMergeError(MergeDialog.tsx:539) writes into the closed dialog and is wiped on next open (:77-84). The merge itself completes or fails atomically in the backend — what's lost is the error feedback. - Merge success gives no feedback at all — the dialog just closes (
MergeDialog.tsx:535-536); asymmetric with push, which toasts "Push completed".
Related: user-facing errors mix String(err) (raw Electron IPC prefixes) with the friendlier errMessage() helper (src/lib/log.ts:69). Offenders: NewTaskDialog.tsx:671, MergeDialog.tsx:539 + :258, ImportWorktreesDialog.tsx:82,123.
Proposed fix
- Add
kind: 'info' | 'error'toshowNotification; errors get distinct styling, no (or long) auto-dismiss, explicit dismiss, and a copy affordance. - Keep a small history (last ~5) so messages stop clobbering each other.
- Render the toast container permanently with
role="status"and swap content, so announcements fire reliably. - Route the silent failures above through it (prompt send, background push/merge outcomes).
- Toast on merge success; disable Cancel while a merge is in flight (or report completion via notification when dialog is closed).
- Standardize on
errMessage()for all user-facing errors.
From a full design/UX audit (2026-07-07); all claims adversarially verified against the code. Line numbers as of b342bbd (v1.12.0).
- 主要语言
- TypeScript
- 星标
- 1k
- 派生
- 144
- 平均合并
- 4 天 19 小时
- 30 天内合并 PR
- 28
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
johannesjo/parallel-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
johannesjo/parallel-code#385 ·
维护者通常 4 天内回复
-
Option to show usage as used instead of left, and potential further customization ideas可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 83/100
johannesjo/parallel-code#353 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
johannesjo/parallel-code#163 · 2 条评论 ·
维护者通常 4 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 12/100
johannesjo/parallel-code#375 · 2 条评论 ·
维护者通常 4 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
johannesjo/parallel-code#374 ·
维护者通常 4 天内回复
查看 johannesjo/parallel-code 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
ci
难度 2/5 1-3 小时 新手友好度 78/100
ClickHouse/clickhouse-js#1248 ·
维护者通常 1 天内回复
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechselt未关闭technik
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 84/100
AhmedNAgy25/analysor#25 ·
维护者通常 1 天内回复