Skip to content

Add collections and collection commands - #1

Closed
sburgos9 wants to merge 1 commit into
mainfrom
add-collections-commands
Closed

Add collections and collection commands#1
sburgos9 wants to merge 1 commit into
mainfrom
add-collections-commands

Conversation

@sburgos9

@sburgos9 sburgos9 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds hey collections — lists all collections via GET /collections.json (sorted by name; --limit/--all/--json)
  • Adds hey collection <id> — lists every thread in a collection
  • The collection detail view has no JSON API and renders only ~50 threads per page, so hey collection walks the full timeline via the "next page" pagination link, parsing both card__link (recent) and entry__collection-topic (older) anchors and de-duplicating across pages
  • Uses the existing OAuth auth; no session cookie required

Test plan

  • hey collections lists every collection, sorted by name
  • hey collection <id> returns all threads, not just the first page (85-thread collection fully enumerated; previously silently truncated to 50)
  • Smaller collections unchanged (11 and 2 threads)
  • Invalid id returns a usage error; unknown id returns not found
  • Unit tests added for the HTML parser and next-page extraction
  • make check passes (gofmt, goimports, vet, golangci-lint, unit tests, tidy)

🤖 Generated with Claude Code

`hey collections` lists all collections via GET /collections.json.

`hey collection <id>` lists every thread in a collection. The collection
detail view has no JSON API and renders only ~50 threads per page, so the
command walks the full timeline via the "next page" pagination link and
parses both card__link (recent) and entry__collection-topic (older)
anchors, de-duplicating across pages. Uses the existing OAuth auth; no
session cookie required.

Includes unit tests for the HTML parser and next-page extraction, and
regenerates the .surface baseline for the new commands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sburgos9
sburgos9 force-pushed the add-collections-commands branch from ce8ff99 to d7363a6 Compare July 24, 2026 21:14
@sburgos9

Copy link
Copy Markdown
Owner Author

Superseded by basecamp#140, which targets the upstream repo.

@sburgos9 sburgos9 closed this Jul 24, 2026
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