Skip to content

docs: 重複検知の仕様を確定させる - #72

Merged
hduehgw0 merged 5 commits into
mainfrom
docs/#71/settle-duplicate-detection-spec
Aug 2, 2026
Merged

docs: 重複検知の仕様を確定させる#72
hduehgw0 merged 5 commits into
mainfrom
docs/#71/settle-duplicate-detection-spec

Conversation

@hduehgw0

@hduehgw0 hduehgw0 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

関連 issue

resolve #71

やったこと

概要

重複検知の要件が登録しか想定しておらず、記述と実態も食い違っていたため、実装(#57)の前に仕様を確定させた。

変更点

  • 重複検知を登録・編集の両方で行うことを明記
  • 表記ゆれの吸収に小文字化を追加(requirements.md / data-model.md
  • 判定キーの区切りに入力に現れない文字を使うことを data-model.md に明記
  • 重複時の表示を「エラー+リンク」から既存ボトルを示すトースト+詳細への遷移に変更し、実現しない「本数の加算は詳細画面から行う」を削除
  • 保留表の項目名を「本数を足しますか?ダイアログ」→「重複時にその場で本数を加算する」に変え、理由を現状に合わせた
  • 05・06-重複検出.png を追跡し、モック枚数を 9 → 10 に更新

受け入れ条件(セルフチェック)

  • docs/requirements.md「5. スコープ」の重複ボトルの検知が、登録・編集の両方で検知することを示している
  • 重複時の表示が既存ボトルを示すトースト+詳細への遷移になっている(「本数の加算は詳細画面から行う」は削除)
  • 表記ゆれの吸収に小文字化が含まれている(requirements.mddata-model.md の両方)
  • docs/data-model.md が、判定キーの区切りに入力に現れない文字を使うことを示している
  • 保留表の理由・トリガーが現状と合っている
  • docs/ui-mockups/05・06-重複検出.png がリポジトリに追跡されている
  • モック枚数が実態(10 枚)と合っている

動作確認

  • pnpm lint が通る
  • pnpm format:check が通る
  • pnpm typecheck が通る
  • pnpm test が通る
  • モバイル幅で表示が崩れない(ドキュメントのみの変更のため対象外)

Issue 要件外の対応(あれば)

**CLAUDE.md の枚数も 9 → 10 に更新した。**受け入れ条件は requirements.md の 2 箇所だけを挙げていたが、CLAUDE.md の References にも枚数が書かれており、片方だけ直すと新しい食い違いが生まれるため。

備考

  • 編集でも重複は作れる(山崎 18年 の年数を 12 に変えると山崎 12年 と衝突する)のに、要件は登録しか書いていなかった。実装前に見つかったので、マイグレーションのやり直しは発生しない
  • **その場で本数を加算する案は見送った。**編集で衝突した場合の加算は 2 行の統合にあたり、片方のメモ・産地が失われるため。保留表に理由ごと記録している
  • 小文字化は toLowerCase() を使う(toLocaleLowerCase() はトルコ語ロケールで Iı になり Islayislay が別物になる)

Summary by CodeRabbit

  • Documentation
    • 重複検知で表記ゆれを吸収するため、NFKC変換・空白除去・小文字化の仕様を明記しました。
    • 登録時に加え、編集時にも重複を検知する要件へ更新しました。
    • 重複時は既存ボトルの詳細へ移動できるトーストを表示し、本数は自動加算しません。
    • MVPの対象UIモックと完了基準を9枚から10枚へ更新しました。

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mycellar Ready Ready Preview Aug 2, 2026 12:46pm

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@hduehgw0, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c67220f4-58c8-4954-995b-b15940bcd161

📥 Commits

Reviewing files that changed from the base of the PR and between feabe8b and 49f0423.

📒 Files selected for processing (2)
  • docs/data-model.md
  • docs/requirements.md
📝 Walkthrough

Walkthrough

重複判定の正規化と複合キー仕様を明確化しました。登録・編集時の重複検知、既存ボトルへの遷移、UIモック10枚への更新を要件と完了基準に反映しました。

Changes

重複検知仕様とMVP基準

Layer / File(s) Summary
重複検知ルールとMVP基準
docs/data-model.md, docs/requirements.md, CLAUDE.md
複合キー生成にNFKC正規化、空白除去、小文字化、衝突しない区切り文字を追加しました。重複検知を登録・編集時に適用し、既存ボトルへ移動できるトーストを表示する仕様に更新しました。UIモック数を10枚に統一しました。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • Issue 70: 重複検知の編集時チェック、小文字化、既存ボトル処理に関連します。

Possibly related PRs

  • hduehgw0/mycellar#56: 同じ要件・データモデルの重複検知仕様を更新しています。
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive 文書要件は満たしていますが、PNG追跡要件は除外ファイルのため確認できません。 除外された docs/ui-mockups/05・06-重複検出.png の追跡状態を確認してください。除外ルールは !**/*.png です。
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed 変更はIssueの仕様確定と関連する参照枚数の整合性修正に限定されており、明らかな範囲外変更はありません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed タイトルは、重複検知の仕様を確定するというプルリクエストの主な変更を明確に示しています。
Description check ✅ Passed 説明には関連Issue、変更点、受け入れ条件、動作確認、要件外対応、備考が記載され、変更内容を十分に説明しています。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/#71/settle-duplicate-detection-spec

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/data-model.md`:
- Around line 43-45: Update the判定キー specification to define a collision-safe
deterministic encoding: either reject the delimiter in the shared server-side
schema or escape/length-prefix every field before joining. Explicitly state
whether空白除去 trims only outer whitespace or removes all whitespace, define the
exact canonical string forms for age and isLimited, and require POST and PATCH
to apply the same canonicalization.

In `@docs/requirements.md`:
- Around line 58-60: Update the MVP completion criterion in docs/requirements.md
so duplicate detection is explicitly verified during both bottle registration
and editing, including displaying the existing bottle and allowing navigation to
its detail view without adding quantity.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 48c14380-4009-4ed1-931a-c3cb0876d03f

📥 Commits

Reviewing files that changed from the base of the PR and between 1dadf33 and feabe8b.

⛔ Files ignored due to path filters (1)
  • docs/ui-mockups/05・06-重複検出.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • CLAUDE.md
  • docs/data-model.md
  • docs/requirements.md

Comment thread docs/data-model.md Outdated
Comment thread docs/requirements.md
@hduehgw0
hduehgw0 merged commit 828c7ed into main Aug 2, 2026
4 checks passed
@hduehgw0
hduehgw0 deleted the docs/#71/settle-duplicate-detection-spec branch August 2, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: 重複検知の仕様を確定させる

1 participant