Skip to content

Conversation

@robzolkos
Copy link
Owner

Summary

  • Add pins API support: card pin, card unpin, and pin list commands with unit tests, e2e tests, and README documentation
  • Fix notification read/unread: CLI was hitting wrong endpoints (/read.json, /unread.json) instead of the correct POST/DELETE /reading.json
  • Fix HTTP client error handling: Check HTTP status codes before attempting JSON parse, so non-JSON error responses (e.g. HTML 401 pages) return proper error codes
  • Fix e2e test isolation: Tests expecting missing --board to fail were leaking the default board from global config; auth login test checked wrong config path; pagination assertion removed for single-page results

Test plan

  • All unit tests pass (go test ./internal/...)
  • All 57 e2e tests pass (previously 7 were failing)
  • Pin lifecycle verified: pin card → appears in list → unpin → removed from list
  • Notification read/unread verified against live API
  • Invalid token returns proper AUTH_ERROR exit code

Adds card pin/unpin subcommands and a top-level pin list command
to support the new pins API endpoints.
The API uses POST/DELETE on /reading.json, not /read.json and
/unread.json. Also handle nil response data from 204 No Content.
When the API returns non-JSON error responses (e.g. HTML 401 pages),
the JSON parse error was masking the proper HTTP status error. Moving
the status check first ensures correct error codes are returned.
Tests for missing --board and auth login checked wrong config path or
leaked the default board from the global config file. Use temp HOME to
isolate, check both config paths, and drop pagination assertion for
single-page results.
@robzolkos robzolkos merged commit 86e68a7 into master Jan 27, 2026
1 check passed
@robzolkos robzolkos deleted the add-pins-api branch January 27, 2026 21:00
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