feat(rpc): enrich MutationEvent with Title and Assignee fields

Add Title and Assignee fields to MutationEvent struct so activity feeds
can display meaningful context without extra lookups. Updated emitMutation
signature to accept these values and modified all callers:

- Create: passes issue.Title and issue.Assignee directly
- Update/Close: moved emitMutation after GetIssue to access enriched data
- Delete: uses existing issue lookup before deletion
- Dep/Label/Comment ops: passes empty strings (would require extra lookup)

Fixes bd-gqxd

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-23 16:39:33 -08:00
parent e0f1d43c2c
commit 3405f0c684
4 changed files with 34 additions and 22 deletions

View File

@@ -350,7 +350,7 @@ func (s *Server) handleCreate(req *Request) Response {
}
// Emit mutation event for event-driven daemon
s.emitMutation(MutationCreate, issue.ID)
s.emitMutation(MutationCreate, issue.ID, issue.Title, issue.Assignee)
data, _ := json.Marshal(issue)
return Response{
@@ -470,11 +470,13 @@ func (s *Server) handleUpdate(req *Request) Response {
s.emitRichMutation(MutationEvent{
Type: MutationStatus,
IssueID: updateArgs.ID,
Title: issue.Title,
Assignee: issue.Assignee,
OldStatus: string(issue.Status),
NewStatus: *updateArgs.Status,
})
} else {
s.emitMutation(MutationUpdate, updateArgs.ID)
s.emitMutation(MutationUpdate, updateArgs.ID, issue.Title, issue.Assignee)
}
}
@@ -544,6 +546,8 @@ func (s *Server) handleClose(req *Request) Response {
s.emitRichMutation(MutationEvent{
Type: MutationStatus,
IssueID: closeArgs.ID,
Title: issue.Title,
Assignee: issue.Assignee,
OldStatus: oldStatus,
NewStatus: "closed",
})
@@ -640,7 +644,7 @@ func (s *Server) handleDelete(req *Request) Response {
}
// Emit mutation event for event-driven daemon
s.emitMutation(MutationDelete, issueID)
s.emitMutation(MutationDelete, issueID, issue.Title, issue.Assignee)
deletedCount++
}
@@ -1421,7 +1425,7 @@ func (s *Server) handleGateCreate(req *Request) Response {
}
// Emit mutation event
s.emitMutation(MutationCreate, gate.ID)
s.emitMutation(MutationCreate, gate.ID, gate.Title, gate.Assignee)
data, _ := json.Marshal(GateCreateResult{ID: gate.ID})
return Response{
@@ -1702,7 +1706,7 @@ func (s *Server) handleGateWait(req *Request) Response {
}
// Emit mutation event
s.emitMutation(MutationUpdate, gateID)
s.emitMutation(MutationUpdate, gateID, gate.Title, gate.Assignee)
}
data, _ := json.Marshal(GateWaitResult{AddedCount: addedCount})