Skip to content

fix(comment-list): expose immutable author evidence - #268

Merged
schpetbot merged 2 commits into
schpet:mainfrom
leonardsellem:fix/comment-authority-projection
Aug 31, 2026
Merged

schpetbot merged 2 commits into
schpet:mainfrom
leonardsellem:fix/comment-authority-projection

Conversation

@leonardsellem

Copy link
Copy Markdown
Contributor

Summary

  • include the native comment author ID in JSON output
  • include Linear editedAt so consumers can distinguish author edits from backend updatedAt drift
  • preserve the GraphQL field names and nesting

Verification

  • focused comment-list tests: 3 passed
  • full suite: 560 passed, 6 ignored
  • deno check
  • targeted deno lint
  • git diff --check

@schpetbot
schpetbot merged commit 1bce95b into schpet:main Aug 31, 2026
11 checks passed
schpetbot pushed a commit that referenced this pull request Aug 31, 2026
#268 adds `user.id` and `editedAt` to `issue comment list --json`, which is the
right shape -- the raw connection is passed straight through, so GraphQL field
names and nesting are preserved. This fills in the cases it stops short of.

`externalUser` did not get the same treatment as `user`, but it has the same
problem and the schema is explicit about why: ExternalUser.displayName "can
match the display name of an actual user". So a consumer could disambiguate two
workspace members from each other and still be unable to tell a member from an
external commenter with the same name. It now carries `id` too.

Integration-authored comments were the bigger gap. They have `user` and
`externalUser` both null, so they arrived in the JSON with no author
information at all -- the exact problem #268 sets out to fix, for a whole class
of comment it does not reach. Selecting `botActor` gives them `type` (non-null,
the reliable key, since ActorBot is not a Node and its `id` is nullable) plus
`subType`, `name` and `id`. `userDisplayName` is available but left out: it
names a person in an external system and is display-only, so it is not worth
the exposure to solve an identity problem the other fields already solve.

That also fixes a rendering bug we were one field away from: every GitHub,
Slack and workflow comment printed as `@Unknown`, because the query never asked
who the bot was. The author fallback was duplicated for root comments and
replies; it is now one helper, with botActor checked last so a comment carrying
both a user and a bot actor still renders the human, and every existing
snapshot stays byte-identical.

Finally, `--id` was forwarded to the API unvalidated. The repo already has
`isLinearUuid`, and CLAUDE.md asks for an immediate, actionable error when
user-supplied input is malformed rather than a raw GraphQL failure, so a
non-UUID is now rejected before the request with a message showing the expected
shape. The flag stays hidden, with a comment recording why it exists.
schpetbot pushed a commit that referenced this pull request Aug 31, 2026
#268 adds `user.id` and `editedAt` to `issue comment list --json`, which is the
right shape -- the raw connection is passed straight through, so GraphQL field
names and nesting are preserved. This fills in the cases it stops short of.

`externalUser` did not get the same treatment as `user`, but it has the same
problem and the schema is explicit about why: ExternalUser.displayName "can
match the display name of an actual user". So a consumer could disambiguate two
workspace members from each other and still be unable to tell a member from an
external commenter with the same name. It now carries `id` too.

Integration-authored comments were the bigger gap. They have `user` and
`externalUser` both null, so they arrived in the JSON with no author
information at all -- the exact problem #268 sets out to fix, for a whole class
of comment it does not reach. Selecting `botActor` gives them `type` (non-null,
the reliable key, since ActorBot is not a Node and its `id` is nullable) plus
`subType`, `name` and `id`. `userDisplayName` is available but left out: it
names a person in an external system and is display-only, so it is not worth
the exposure to solve an identity problem the other fields already solve.

That also fixes a rendering bug we were one field away from: every GitHub,
Slack and workflow comment printed as `@Unknown`, because the query never asked
who the bot was. The author fallback was duplicated for root comments and
replies; it is now one helper, with botActor checked last so a comment carrying
both a user and a bot actor still renders the human, and every existing
snapshot stays byte-identical.

Finally, `--id` was forwarded to the API unvalidated. The repo already has
`isLinearUuid`, and CLAUDE.md asks for an immediate, actionable error when
user-supplied input is malformed rather than a raw GraphQL failure, so a
non-UUID is now rejected before the request with a message showing the expected
shape. The flag stays hidden, with a comment recording why it exists.
@schpetbot

Copy link
Copy Markdown
Collaborator

Shipped in v2.6.0.

Thanks for this — issue comment list --json now carries stable author identity.

  • user.id and externalUser.id are exposed, so consumers can attribute a comment without relying on editable, collidable display names.
  • editedAt is included, which is set only when a comment's author revised it — updatedAt also moves for unrelated backend churn.
  • GraphQL field names and nesting are preserved, as in your PR.

#270 was a follow-up covering bot authors (botActor) and validating --id.

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