Skip to content

str: add missing note attachment and comment item fields - #363

Merged
mfederowicz merged 1 commit into
mainfrom
str-notes-comment-item-fields
Nov 19, 2026
Merged

mfederowicz merged 1 commit into
mainfrom
str-notes-comment-item-fields

Conversation

@mfederowicz

Copy link
Copy Markdown
Owner

Trakt's API contract (trakt/trakt-api#1082, merged 2026-11-19) describes two response shapes with more fields than our types had.

Added

  • Library: str.AttachedTo has WatchedAt, CollectedAt, RatedAt and Rating. str.CommentMediaItem has Person, Comment and User.

Fixed

  • users -a notes keeps the date and rating of the history, collection or rating entry a note is attached to. Before, attached_to held only type and id.
  • comments -a item keeps the person, comment or user a comment belongs to. Before, only type was exported.

The new AttachedTo fields are nil when a note is sent, so the POST /notes request body does not change. The rest of #1082 (comment activity, show certifications, hidden items, notes create body) already matches our types.

Tests: the encode/decode round-trip tests in str/ fail without the fix.

Live check by the maintainer on 2026-11-19: users -a notes exported 3 rating notes, each with rated_at and rating. comments -a item on a list comment still works. The history and collection fields and the person, comment and user items are covered by the mock tests only (no such data on the account, no CLI route lists them).

AI: Claude Code compared the contract with the types and wrote the code, tests and changelog entries.

@mfederowicz
mfederowicz merged commit 744357d into main Nov 19, 2026
6 checks passed
@mfederowicz
mfederowicz deleted the str-notes-comment-item-fields branch November 19, 2026 13:14
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.

1 participant