Fix daemon/direct mode inconsistency in graph commands (bd-fu83)

Commands relate, unrelate, duplicate, and supersede now properly
use RPC Update when daemonClient is available, instead of always
calling store.UpdateIssue() directly and bypassing the daemon.

Added RelatesTo, DuplicateOf, and SupersededBy fields to UpdateArgs
in the RPC protocol, and updated server_issues_epics.go to handle them.

🤖 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-18 01:34:14 -08:00
parent 5d7187f29b
commit 3ec517cc1b
4 changed files with 116 additions and 30 deletions

View File

@@ -99,6 +99,10 @@ type UpdateArgs struct {
Sender *string `json:"sender,omitempty"` // Who sent this (for messages)
Ephemeral *bool `json:"ephemeral,omitempty"` // Can be bulk-deleted when closed
RepliesTo *string `json:"replies_to,omitempty"` // Issue ID for conversation threading
// Graph link fields (bd-fu83)
RelatesTo *string `json:"relates_to,omitempty"` // JSON array of related issue IDs
DuplicateOf *string `json:"duplicate_of,omitempty"` // Canonical issue ID if duplicate
SupersededBy *string `json:"superseded_by,omitempty"` // Replacement issue ID if obsolete
}
// CloseArgs represents arguments for the close operation

View File

@@ -87,6 +87,16 @@ func updatesFromArgs(a UpdateArgs) map[string]interface{} {
if a.RepliesTo != nil {
u["replies_to"] = *a.RepliesTo
}
// Graph link fields (bd-fu83)
if a.RelatesTo != nil {
u["relates_to"] = *a.RelatesTo
}
if a.DuplicateOf != nil {
u["duplicate_of"] = *a.DuplicateOf
}
if a.SupersededBy != nil {
u["superseded_by"] = *a.SupersededBy
}
return u
}