Skip to content

feat: Listモデルがドメインイベントを発行するようにした - #1822

Open
laminne wants to merge 5 commits into
mainfrom
feat/1661-timeline-events
Open

feat: Listモデルがドメインイベントを発行するようにした#1822
laminne wants to merge 5 commits into
mainfrom
feat/1661-timeline-events

Conversation

@laminne

@laminne laminne commented Sep 3, 2026

Copy link
Copy Markdown
Member

related #1661

What does this PR do?

Additional information

  • リストの削除は未実装なので除外

- pkg/internal/event/type.tsにEventMeta<Actor>型を追加
- List.new()/addMember()/removeMember()でドメインイベントを生成し#eventsに積むよう変更
- List.reconstruct()はバリデーションのみ行い、イベントを生成しないよう修正
- List#pullEvents()で破壊的にイベントを取り出せるようにした
- createList.ts/appendMember.tsサービスをmeta(idGenerator/actor/occurredAt)対応に更新
- InMemoryListRepository#removeListMemberをList.reconstruct経由の更新に変更

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BnQ8xnYtRtJ68NVBEibKw7
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 47.31%. Comparing base (2e9efca) to head (eb08607).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
pkg/timeline/model/list.ts 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1822      +/-   ##
==========================================
+ Coverage   46.14%   47.31%   +1.17%     
==========================================
  Files         168      168              
  Lines        5821     5875      +54     
  Branches      881      886       +5     
==========================================
+ Hits         2686     2780      +94     
+ Misses       3135     3095      -40     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@laminne
laminne marked this pull request as draft September 3, 2026 06:21
@laminne laminne changed the title feat: timelineのList集約にドメインイベント生成能力を追加 feat: Listモデルがドメインモデルを発行するようにした Sep 3, 2026
laminne and others added 2 commits September 4, 2026 20:14
- ドメインイベントのIDはEventMeta経由のSnowflakeIDGenerator DIをやめ、
  pkg/internal/event/idGenerator.tsのシングルトンgenerateEventID()を使う
- occurredAtはイベントファクトリ内でnew Date()により生成する
- 上記に追従してtimelineモジュールのservice層/mod.ts/テストから
  イベント生成専用だったidGenerator・clockのDI引数を削除

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XhMBrhrCBgiiMGeXDxcTVD
…ents

# Conflicts:
#	pkg/internal/event/idGenerator.ts
#	pkg/timeline/model/event/listEvents.ts
@laminne laminne changed the title feat: Listモデルがドメインモデルを発行するようにした feat: Listモデルがドメインイベントを発行するようにした Sep 6, 2026
@laminne
laminne marked this pull request as ready for review September 7, 2026 12:15
@laminne
laminne requested a review from MikuroXina September 7, 2026 12:15
Comment thread pkg/timeline/model/list.ts Outdated
@laminne
laminne enabled auto-merge September 8, 2026 04:47
@laminne
laminne force-pushed the feat/1661-timeline-events branch from 2a6955a to 46ce4a1 Compare September 8, 2026 11:11
@laminne
laminne force-pushed the feat/1661-timeline-events branch from 46ce4a1 to eb08607 Compare September 8, 2026 11:11
@laminne
laminne requested a review from MikuroXina September 9, 2026 01:36
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