Skip to content

fix: Event.removeExhibitMemberIdの未実装を修正#85

Merged
KinjiKawaguchi merged 4 commits intodevelopfrom
fix/remove-exhibit-member
Mar 14, 2026
Merged

fix: Event.removeExhibitMemberIdの未実装を修正#85
KinjiKawaguchi merged 4 commits intodevelopfrom
fix/remove-exhibit-member

Conversation

@KinjiKawaguchi
Copy link
Copy Markdown
Member

@KinjiKawaguchi KinjiKawaguchi commented Mar 12, 2026

Summary

  • Event.removeExhibitMemberIdのボディが空で、展示からのメンバー削除がno-opだった問題を修正
  • 該当Exhibitからメンバーを削除し、他のExhibitにも所属していなければEvent.memberIdsからも削除する
  • PR feat: Shared Kernel に Affiliation(所属) を追加 #81 のレビューで指摘された pre-existing issue への対応

Test plan

  • npx tsc --noEmit が通ること
  • npx biome check が通ること
  • 展示からメンバーを削除した際に、他の展示にも所属していなければイベントのメンバー一覧からも削除されること

🤖 Generated with Claude Code


Open with Devin

展示からメンバーを削除し、他の展示にも所属していなければ
イベントのメンバー一覧からも削除する。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 12, 2026 05:29

This comment was marked as resolved.

- Exhibit.hasMemberId()を追加しSet#hasベースで判定(Set→Array変換を回避)
- removeExhibitMemberIdからEvent.memberIdsの削除を除去(展示所属とイベント参加の責務を分離)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

Open in Devin Review

Comment on lines +141 to +143
public removeExhibitMemberId(exhibitId: string, memberId: string): void {
this.getExhibitOrThrow(exhibitId).removeMemberId(memberId);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: removeExhibitMemberId was previously a no-op — behavioral change for existing callers

The removeExhibitMemberId method previously had an empty body (Event.ts:138 old code), meaning RemoveMemberFromExhibit.ts:32 was calling it but nothing happened — members were never actually removed from exhibits. This PR fixes that, which is a behavioral change: previously the use case silently succeeded without modifying state, now it actually removes the member from the exhibit. This is clearly the intended fix, but it's worth noting as a non-trivial semantic change for any callers relying on the previous (broken) no-op behavior.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines 95 to 96
this.memberIds.delete(memberId);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚩 Exhibit.removeMemberId silently succeeds for non-existent members

The Exhibit.removeMemberId method at Exhibit.ts:94-96 calls Set.delete() which silently returns false if the member doesn't exist. This means Event.removeExhibitMemberId will succeed without error even if the specified memberId was never a member of the exhibit. Depending on domain requirements, it may be desirable to throw an exception if the member is not found. This is a pre-existing design choice rather than a bug introduced by this PR, but worth considering for domain invariant enforcement.

(Refers to lines 94-96)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@KinjiKawaguchi KinjiKawaguchi merged commit 05c565a into develop Mar 14, 2026
4 checks passed
@KinjiKawaguchi KinjiKawaguchi deleted the fix/remove-exhibit-member branch March 14, 2026 12:47
KinjiKawaguchi added a commit that referenced this pull request Mar 23, 2026
## Summary
- `Event.removeExhibitMemberId`のボディが空で、展示からのメンバー削除がno-opだった問題を修正
- 該当Exhibitからメンバーを削除し、他のExhibitにも所属していなければEvent.memberIdsからも削除する
- PR #81 のレビューで指摘された pre-existing issue への対応

🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/su-its/core/pull/85"
target="_blank">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
  </picture>
</a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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