Skip to content

feat: 明細の単体編集と対象を固定した一括編集UIを追加 - #80

Open
Ries630 wants to merge 19 commits into
feature/74-transaction-edit-apifrom
feature/75-76-edit-ui
Open

Ries630 wants to merge 19 commits into
feature/74-transaction-edit-apifrom
feature/75-76-edit-ui

Conversation

@Ries630

@Ries630 Ries630 commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

明細詳細からの単体編集と、同一種別に絞った結果への一括編集を追加します。一括編集は変更不要な明細を除いて対象を固定し、変更前後を確認してから一件ずつ保存します。入力欄は選択した項目だけを開き、確認ボタンは下部に固定します。支出のカテゴリ変更時はジャンルも必須の変更対象として表示します。確認画面は日付・金額・店舗・品名で対象を示し、明細ごとの変更前後に集約します。

スタック #81 の 4/4。#79 に依存します。Closes #75。Closes #76。Refs #6。

#77〜#79 の API・共有排他・計画ストアを src/api/edits.ts と src/components/edit/ へ接続する最終層です。入力上限と編集可否は共通契約を使い、ブラウザには計画 ID だけを保存します。既定では編集は無効です。

単体・一括・一覧からの再開は、アプリが所有する共通の EditPlanRunner が管理します。シートを閉じると入力・確認状態を破棄し、保存開始後の送信は前景・オンラインの間続けます。一覧から停止・結果確認ができ、背景移行・通信断・認証切れでは次の送信を停止します。復帰や再読み込みだけでは再開せず、結果不明は再送前に明示的に照合します。設計理由は ADR-0038 を参照してください。

Workers の native fetch の呼び出し元を保持します。店舗変更時は、Zaim が連動して更新する place_uid だけを許容し、他項目の編集で非表示列が変化した場合は結果未確認として停止します。

ダイアログは右上の閉じる操作、スクロールする本文、下部の主要操作に統一しています。入力・確認・結果の遷移時は本文を先頭から表示します。

検証:

  • bun run check 成功(24 files / 326 tests)。
  • WebKit の iPhone 相当画面と架空データで、確認画面のキャンセルによる初期化、シート閉鎖後の継続、一覧からの停止・重複しない手動再開、背景移行・再接続・再読み込み後の自動送信防止を確認。
  • 単体編集の計画作成中に閉じても保存が続き、後から開いた別明細の画面と入力に干渉しないことを確認。
  • Runner の公開操作から、不明結果の保持と明示照合、二重開始の拒否、復元失敗時の ID 保持、追跡終了を検証。
  • 実データで個別項目の保存・復元と未変更項目の保持は確認済み。Runner と一括編集レイアウトの変更後の iPhone 実機確認は未実施。

実データ検証と本番の有効化は #72 で管理します。公開・復旧手順は ops/editing.md を参照してください。

Preview: https://d9058ba8-zaimviewer.ries.workers.dev (支出編集を有効化、Access 保護)。本番トラフィックは切り替えていません。

🤖 Generated with Codex

@Ries630 Ries630 added the enhancement New feature or request label Sep 5, 2026
@Ries630 Ries630 self-assigned this Sep 5, 2026
@Ries630 Ries630 changed the title feat: 明細の単体編集と確認済み対象の一括編集UIを追加 feat: 明細の単体編集と対象を固定した一括編集UIを追加 Sep 5, 2026
@Ries630 Ries630 added this to the v0.2 編集できる milestone Sep 5, 2026
@Ries630
Ries630 force-pushed the feature/75-76-edit-ui branch from 94b6a6f to c00c2e8 Compare September 6, 2026 00:46
@Ries630
Ries630 force-pushed the feature/75-76-edit-ui branch from c00c2e8 to 27c60f9 Compare September 6, 2026 05:03
@Ries630
Ries630 marked this pull request as ready for review September 6, 2026 05:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-06T05:47:19.472716Z 27c60f9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27c60f9ffd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/edit/EditPlanStatus.tsx Resolved
Comment thread src/components/edit/BulkEditSheet.tsx Resolved
Comment thread src/components/edit/EditFields.tsx Resolved
Comment thread src/components/edit/SingleEditForm.tsx Resolved
Ries630 added 7 commits September 6, 2026 14:53
既定のfetchをglobalThisへ束縛し、メモ保存前の再取得で発生するIllegal invocationを解消する。GET・PUT・POSTの呼び出し元を検証する回帰テストを追加する。

Assisted-By: OpenAI Codex 🤖
店舗変更に伴ってZaimが更新するplace_uidだけを照合対象から除外する。店舗以外の編集では従来どおり非表示列の変化を検出する。実行時と再照合時の回帰テスト、実機確認結果を追加する。

Assisted-By: OpenAI Codex 🤖

@Ries630 Ries630 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI関係の指摘が多数あります。

Comment thread src/components/edit/BulkEditSheet.tsx Resolved
Comment thread src/components/edit/BulkEditSheet.tsx Resolved
Comment thread src/components/edit/BulkEditSheet.tsx Resolved
Comment thread src/components/edit/BulkEditSheet.tsx Resolved
Comment thread src/components/edit/BulkEditSheet.tsx Resolved
Comment thread src/components/edit/BulkEditSheet.tsx Resolved
Comment thread src/components/edit/EditPlanStatus.tsx Resolved

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

シートを閉じても編集内容や確認画面などの状態が残っていますが、確認画面では閉じれないようにした方がいいと思います。

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しました(16209e4)。入力・確認状態はシートを閉じると破棄し、次回は新しいフォームから始まります。

保存開始後は、単体・一括・一覧からの再開をアプリ共通の EditPlanRunner が管理します。シートを閉じても前景・オンラインなら送信を続け、一覧から停止・結果確認できます。背景移行・通信断では次の送信を止め、復帰や再読み込みだけでは自動再開しません。結果未確認は、更新を再送する前に明示的に照合します。

WebKit の iPhone 相当画面と架空データで、確認中の閉鎖による初期化、閉鎖後の送信継続、一覧停止・手動再開、背景移行・再接続・再読み込み後の停止保持を確認しました。単体の計画作成中に閉じても保存が続き、後から開いた別明細の画面や入力に干渉しないことも確認済みです。復元失敗時は新しい確認用計画の作成を防ぎます。

bun run check は成功しています。設計は ADR-0038 に記録しました。

修正版 Preview(支出編集有効)。今回の変更後の iPhone 実機確認は未実施です。

🤖 Generated with Codex

Ries630 added 7 commits September 7, 2026 12:36
単体・一括・再開の送信と照合をアプリの共通Runnerへ移す。
シートを閉じると入力を破棄し、前景での送信と一覧での追跡は継続する。
停止・復元・未確認結果の保持と新規計画の開始可否を共有する。

Assisted-By: OpenAI Codex 🤖

@Ries630 Ries630 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

追加でUIの指摘が2件あります。

Comment thread src/components/edit/EditFields.tsx Resolved
Comment thread src/components/TransactionSheet.tsx Resolved
@Ries630

Ries630 commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

一括編集の確認画面のレイアウトが気になります。
確認画面のスクロール + 確認画面内の明細のスクロールで、スクロールが二重になっているのが微妙です。確認画面内の明細のスクロールは仕方ないと思いますが、確認画面のスクロールはできれば無くしたいです。

ダイアログの閉じるボタンの画面占有率が大きいのも気になります。基本的にダイアログ外の背景を押して閉じることが多いため、重要度も低いです。右上に❌ボタン程度でも十分かも。

ヘッダーと主要操作を固定し、本文だけをスクロールする。確認画面の重複説明を減らし、閉じる操作を共通の右上ボタンへ集約する。

Assisted-By: OpenAI Codex 🤖
@Ries630

Ries630 commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

レイアウトの指摘に対応しました(d6b1393)。

一括編集・単体編集の入力/確認/結果、明細詳細、絞り込みの閉じる操作を右上の×へ統一しました。タップ領域は44px以上を確保し、背景タップ・Escも維持しています。本文だけをスクロールさせ、主要操作は下部に固定しました。

一括編集の確認画面は見出しと対象件数に説明をまとめ、通常の警告表示と二重スクロールを除去しました。単体編集の画面遷移でもスクロール位置を先頭へ戻します。送信処理とダイアログの独立性は維持しています。

WebKitと架空データで、各画面の操作位置、閉鎖後の送信継続、長い確認内容のスクロール初期化を確認しました。架空50件でもスクロール領域が1か所で、保存ボタンが常時表示されることを確認しています。実データ50件の保存検証ではありません。

修正版 Preview(支出編集有効)。今回の変更後のiPhone実機確認は未実施です。

🤖 Generated with Codex

Comment thread src/components/edit/EditFields.tsx Resolved
Workerと共通の日付スキーマで検証し、入力欄に即時エラーを表示する。空欄や不正な日付では確認へ進めないようにする。

Assisted-By: OpenAI Codex 🤖
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

検索結果を固定して明細を逐次一括編集する 詳細ボトムシートから明細を単体編集する

1 participant