thread-master/docs/product/scout-topic-quality/tasks/T062-scout-live-errors-dele...

1.4 KiB
Raw Permalink Blame History

T062 — Live 錯誤與刪除行為

Status: done Milestone: M6 Est. change: ~140 lines

Goal

完成後run/post 刪除與 401/404/409/503 在 Scout UI 都有可信狀態,且 pagination 正確收斂。

Depends on

  • T061

Inputs

  • 讀取 / 依賴:
    • 檔案:apps/web/src/pages/ScoutPage.tsx、i18n messages
    • 既有能力 / APIformatApiError、removeRun/removePost、Pager
    • Spec 段落§4 流程 F、§5.1 error scope

Outputs

程式變更(預期路徑)

路徑 動作 說明
apps/web/src/pages/ScoutPage.tsx edit 串接 run delete、mutation reload、有效頁收斂與非破壞錯誤顯示。
apps/web/src/lib/i18n/messages.ts edit 增加 running conflict、not found、source unavailable 文案。
apps/web/src/pages/ScoutPage.test.tsx edit 覆蓋 409、不存在與最後頁刪除。

行為變更

  • 刪除失敗保留目前資料;成功才更新 selection/page。

API / 契約(若有)

  • 409 不重試刪除503 不呈現空批次成功。

Out of scope

  • 不新增取消 run 按鈕,不修改 gateway error envelope。

Acceptance

  • Spec #14/#15 與 error states 全通過。
  • 指令:
cd apps/web && npm test -- src/pages/ScoutPage.test.tsx

Notes

錯誤文案不顯示 provider 名稱、token 或內部 stack。