Follow-up from the final review of claude/reply-to-adf-quoting. Not reachable today; filed so it is a deliberate design choice rather than a latent surprise.
Mechanism
ADFContent.RawAttrs holds a node’s attrs exactly as received and wins over the typed Attrs struct on marshal, so nodes fetched from Jira round-trip losslessly.
resolveInContent (internal/api/mention_resolve.go) mutates the typed Attrs when resolving a mention, so it must clear RawAttrs — otherwise the mutation is silently discarded. It does.
The consequence: a resolved mention falls back to the typed struct, which models only id, text, and accessLevel. A mention node carrying localId or userType loses them.
The unresolved path has no such issue — the node becomes type: "text", which must not carry mention attrs at all.
Not reachable today
All ResolveMentions call sites (internal/api/jira.go:1674, internal/cmd/issue/field_util.go:119) operate on documents freshly built by MarkdownToADF, which never populates RawAttrs. A future caller resolving mentions in a fetched document — say comment edit --append, or a description round-trip — would hit it.
Suggested fix
Patch the single key in place instead of discarding the raw form: unmarshal RawAttrs into map[string]json.RawMessage, overwrite "id", re-marshal. That keeps the resolved account id and every unmodelled attribute.
Related: #68, #69, #70.
Follow-up from the final review of
claude/reply-to-adf-quoting. Not reachable today; filed so it is a deliberate design choice rather than a latent surprise.Mechanism
ADFContent.RawAttrsholds a node’sattrsexactly as received and wins over the typedAttrsstruct on marshal, so nodes fetched from Jira round-trip losslessly.resolveInContent(internal/api/mention_resolve.go) mutates the typedAttrswhen resolving a mention, so it must clearRawAttrs— otherwise the mutation is silently discarded. It does.The consequence: a resolved mention falls back to the typed struct, which models only
id,text, andaccessLevel. A mention node carryinglocalIdoruserTypeloses them.The unresolved path has no such issue — the node becomes
type: "text", which must not carry mention attrs at all.Not reachable today
All
ResolveMentionscall sites (internal/api/jira.go:1674,internal/cmd/issue/field_util.go:119) operate on documents freshly built byMarkdownToADF, which never populatesRawAttrs. A future caller resolving mentions in a fetched document — saycomment edit --append, or a description round-trip — would hit it.Suggested fix
Patch the single key in place instead of discarding the raw form: unmarshal
RawAttrsintomap[string]json.RawMessage, overwrite"id", re-marshal. That keeps the resolved account id and every unmodelled attribute.Related: #68, #69, #70.