UX: unify error/notification handling — severity, persistence, and silent failures

オープン
#198 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

enhancement ux

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, no role="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' to showNotification; 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時間
マージ済み PR(30日)
28

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

johannesjo/parallel-code のほかの issue

johannesjo/parallel-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。