Skip to content

複数ソース対応#16

Merged
max747 merged 3 commits intomainfrom
feature/aggregate-multi-quests
Apr 1, 2026
Merged

複数ソース対応#16
max747 merged 3 commits intomainfrom
feature/aggregate-multi-quests

Conversation

@max747
Copy link
Copy Markdown
Member

@max747 max747 commented Apr 1, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Harvest 上で同一クエストが複数ページ ID に分割されるケースに対応するため、クエスト定義に「集計元ページIDの複数指定」を追加し、集計 Lambda 側でマージ集計できるようにするPRです。

Changes:

  • quests[].sourceQuestIds(省略可)を Quest 型と仕様書に追加
  • 集計 Lambda が sourceQuestIds から複数ページのレポートを取得し、重複排除してマージ
  • 管理画面で sourceQuestIds を編集・候補から「ソースとして追加」できるUIを追加し、Lambda 側のテストを追加

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
viewer/src/types.ts Quest 型に sourceQuestIds?: string[] を追加し、フロント側で新フィールドを許容
admin/src/types/index.ts 管理画面側 Quest 型に sourceQuestIds?: string[] を追加
admin/src/pages/EventFormPage.tsx sourceQuestIds の編集UIと、Harvest候補を「ソースに追加」する操作を追加
lambda/aggregator/handler.py sourceQuestIds に基づく複数ソース取得・重複排除・マージ処理を追加
lambda/aggregator/test_handler.py process_quest の複数ソース対応のユニットテストを追加
SPEC.md sourceQuestIds の仕様と、Harvestページ分割(1:N)の挙動を追記

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

max747 and others added 2 commits April 1, 2026 15:28
rid が空文字(falsy)の場合は seen_ids に追加しないよう修正。
重複排除の意図が明確になり、将来のロジック変更時の誤動作を防ぐ。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sourceExpanded / newSourceId / addAsSourceTarget が配列インデックスを
キーに持つため、クエスト削除でインデックスがずれる問題を修正。
removeQuest でインデックスを詰め直すことで対応。
また addAsSource に範囲外インデックスのガードを追加。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@max747 max747 merged commit 32ee305 into main Apr 1, 2026
1 check passed
@max747 max747 deleted the feature/aggregate-multi-quests branch April 1, 2026 06:41
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.

2 participants