Skip to content

Page the account-wide lists at 50 per page - #1102

Open
thehale wants to merge 7 commits into
mainfrom
api-fixed-page-size
Open

thehale wants to merge 7 commits into
mainfrom
api-fixed-page-size

Conversation

@thehale

@thehale thehale commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Written by @thehalebot

Six account-wide operations in the spec and every SDK assume Basecamp answers them whole. basecamp/bc3#14537 pages all six at 50 records on every page, with a Link: rel="next" header while more remain and X-Total-Count on every page. Five of them were unpaged, so once it ships every SDK would return page 1 as if it were the whole answer. The sixth, the overdue to-dos report, was paged by basecamp/bc3#14519 at 15, 30, 50 and then 100, and #1100 described those sizes. With this PR every SDK follows the pages of the five, and the overdue report's spec and notes describe 50 a page.

Why 50, not 100. This follows bc3#14537's reason. Every API collection that pages at one fixed size already uses 50, among them search, notifications, the activity timeline, bookmarks and bubble-ups, so clients already handle it. The cost per record is flat, about 3 KB and 4,400 allocations a to-do, so 100 would double each request's work: in bc3's measurement the overdue to-dos feed took 280–330 ms at 50 and 560–1,150 ms at 100. 50 halves that work for twice as many requests.

Merge order: merge after basecamp/bc3#14537, which pages these routes on Basecamp's side. basecamp/basecamp-mcp-server#385 and basecamp/basecamp-cli#1044 merge after this.

There is one commit per route, plus one that moves Go's person progress onto the wrapped-page follower the assigned report needed.

What changes for callers

Route Operation Shape Now
GET /todos/overdue.json GetEverythingOverdueTodos array link pagination, page
GET /cards/overdue.json GetEverythingOverdueCards array link pagination, page
GET /my/assignments/completed.json GetMyCompletedAssignments array link pagination, page
GET /reports/timesheet.json GetTimesheetReport array link pagination, page
GET /reports/todos/assigned/:id.json GetAssignedTodos object wrapped pagination over todos, page
GET /reports/todos/overdue.json GetOverdueTodos object of four arrays unchanged from #1100: page, no walk
  • Arrays carry the @basecampPagination(style: "link", maxPageSize: 50) trait, as the other paged lists do. Without page, each SDK still returns every record, one request per 50. A positive page returns that page alone.
  • The assigned to-dos report is the same shape as GetPersonProgress ({person, events}), so it takes the same trait with key: "todos". Each SDK walks todos and keeps the first page's person and grouped_by, which bc3 repeats on every page. Its three members are marked @required, as bc3's jbuilder writes all three unconditionally; the Rust generator refuses a wrapped key that may be absent.
  • The overdue report keeps Take a page on the overdue to-dos report #1100's surface. Only its doc, MIGRATING.md and the page-2 test fixtures change, from the geared sizes to 50.
  • Go: EverythingService.OverdueTodos and OverdueCards take page int32 and return *TodoListResult / *CardListResult. MyAssignmentsService.Completed takes page int32 and returns the new *MyAssignmentListResult. TimesheetService.Report returns *TimesheetListResult and honours Limit and Page, sharing one tail with ProjectReport and RecordingReport. ReportsService.AssignedTodos takes AssignedTodosOptions.Page and its response gains Meta.
  • Other SDKs: the generated methods return each SDK's paged list type (ListResult, Ruby's lazy ListEnumerator, Rust's first Page). Kotlin and Swift return a typed AssignedTodosResult where they returned JSON.
  • Breaking, pre-1.0: every signature above changes with no alias. MIGRATING.md has one Unreleased section covering all five, per SDK.

Invariants

  • Without page, a call returns every record across pages, in order. Go and TypeScript tests for each route serve page 1 with a rel="next" link and page 2 without one, and assert two requests and the ids of both pages in order with Meta{TotalCount, Truncated: false}. Python and Ruby cover the overdue feeds.
  • A positive page is one request for that page. A Go test per route asks for page 2, gets a link to page 3, and asserts one request to ?page=2 with Truncated: true.
  • The assigned report keeps its wrapper. The Go and TypeScript tests assert person and grouped_by from page 1 and the to-dos of both pages, with group_by carried into the followed URL.
  • Filters still reach the wire. The existing overdue filter tests and the timesheet params test pass with page added.
  • Every new public type is reachable from outside the package. TypeScript's index.ts re-exports the four new option types. Swift's PublicAPIConsumer builds GetAssignedTodosResponseContent with its three required members, beside GetPersonProgressResponseContent, now that the model has no zero-argument init.
  • Generated files match the spec. Regenerated with make generate at every commit (Swift through the swift:6.2 image, since this host has no Swift toolchain).
  • make check passes on Go, TypeScript, Python, Kotlin and Rust, rs-deny included now that main uses jiff. Its four Ruby steps (rb-test, the Ruby conformance runner and its tests, and the YARD half of check-deprecation-parity) didn't run locally, as this host has no Ruby 4, and Swift has no toolchain here; CI covers both.

Rejected Alternatives

Further Work

  • GetTimesheetReport sends from, to and person_id, which bc3's Reports::TimesheetsController never reads (it reads start_date, end_date, people_ids[] and bucket_ids[]). basecamp-mcp-server builds the request by hand for that reason. This PR leaves the params as they are.
  • basecamp/basecamp-mcp-server#385 pages the matching tools, pinned to this branch.

Copilot AI balanced review requested due to automatic review settings November 17, 2026 22:56
@github-actions github-actions Bot added typescript Pull requests that update TypeScript code ruby Pull requests that update the Ruby SDK go kotlin swift spec Changes to the Smithy spec or OpenAPI conformance Conformance test suite python Pull requests that update the Python SDK rust Rust SDK labels Nov 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new public options type is not re-exported from the package root, leaving consumers unable to import it through a supported package entry point.

No open issues 🎉

What changed in this PR

Updates the Smithy-driven SDKs for Basecamp’s account-wide lists moving to 50 records per page. Five operations gain pagination support; the grouped overdue report retains the explicit-page behavior introduced in #1100.

Changes:

  • Regenerates all seven SDKs with page parameters, paginated results, and assigned-report wrapper handling.
  • Shares Go pagination helpers across reports and person progress.
  • Updates migration guidance, pagination tests, and conformance adapters.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
typescript/​tests/​services/​reports.test.ts Tests timesheet and assigned-report pagination; updates overdue fixture.
typescript/​tests/​services/​my-assignments.test.ts Tests completed-assignment pagination and ordering.
typescript/​tests/​services/​everything.test.ts Tests overdue-feed pagination and metadata.
typescript/​src/​generated/​services/​timesheets.ts Returns paginated timesheet results.
typescript/​src/​generated/​services/​reports.ts Adds wrapped assigned-report pagination.
typescript/​src/​generated/​services/​my-assignments.ts Adds completed-assignment pagination options.
typescript/​src/​generated/​services/​everything.ts Paginates overdue cards and to-dos.
typescript/​src/​generated/​schema.d.ts Updates query parameters and required wrapper fields.
typescript/​src/​generated/​openapi-stripped.json Regenerates pagination contracts.
typescript/​src/​generated/​metadata.ts Records five new paginated operations.
swift/​Sources/​Basecamp/​Generated/​Services/​TimesheetsService.swift Returns paginated timesheet results.
swift/​Sources/​Basecamp/​Generated/​Services/​ReportsService.swift Adds typed, paginated assigned reports.
swift/​Sources/​Basecamp/​Generated/​Services/​MyAssignmentsService.swift Paginates completed assignments.
swift/​Sources/​Basecamp/​Generated/​Services/​EverythingService.swift Paginates overdue feeds.
swift/​Sources/​Basecamp/​Generated/​Models/​GetAssignedTodosResponseContent.swift Makes assigned-report fields required.
spec/​basecamp.smithy Defines pagination traits, parameters, and wrapper requirements.
spec/​api-gaps/​everything-aggregates.md Notes subsequent overdue-feed pagination.
rust/​basecamp-sdk/​tests/​guarantees.rs Updates the paginated-route count.
rust/​basecamp-sdk/​src/​generated/​types.rs Adds assigned-report item extraction and required fields.
rust/​basecamp-sdk/​src/​generated/​services/​timesheets.rs Returns a timesheet page.
rust/​basecamp-sdk/​src/​generated/​services/​reports.rs Returns assigned-report pages; updates overdue documentation.
rust/​basecamp-sdk/​src/​generated/​services/​my_assignments.rs Adds completed-assignment page parameters and results.
rust/​basecamp-sdk/​src/​generated/​services/​everything.rs Returns overdue-feed pages.
rust/​basecamp-sdk/​src/​generated/​routes.rs Marks five routes as Link-paginated.
ruby/​test/​basecamp/​services/​timesheet_service_test.rb Adapts fixtures and assertions to enumerated results.
ruby/​test/​basecamp/​services/​reports_service_test.rb Adapts assigned results and overdue fixtures.
ruby/​test/​basecamp/​services/​everything_service_test.rb Materializes lazy overdue results in filter test.
ruby/​lib/​basecamp/​generated/​types.rb Refreshes the generation timestamp only.
ruby/​lib/​basecamp/​generated/​services/​timesheets_service.rb Lazily paginates timesheet reports.
ruby/​lib/​basecamp/​generated/​services/​reports_service.rb Adds wrapped assigned-report pagination.
ruby/​lib/​basecamp/​generated/​services/​my_assignments_service.rb Lazily paginates completed assignments.
ruby/​lib/​basecamp/​generated/​services/​everything_service.rb Lazily paginates overdue feeds.
ruby/​lib/​basecamp/​generated/​metadata.json Records pagination metadata.
python/​tests/​services/​test_everything.py Tests overdue to-do Link following.
python/​src/​basecamp/​generated/​types.py Requires assigned-report wrapper fields.
python/​src/​basecamp/​generated/​services/​timesheets.py Adds synchronous and asynchronous report pagination.
python/​src/​basecamp/​generated/​services/​reports.py Adds wrapped pagination; updates overdue documentation.
python/​src/​basecamp/​generated/​services/​my_assignments.py Paginates completed assignments in both clients.
python/​src/​basecamp/​generated/​services/​everything.py Paginates overdue feeds in both clients.
openapi.json Regenerates pagination contracts from Smithy.
MIGRATING.md Documents changed signatures, results, and page behavior.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​sdk/​generated/​services/​Types.kt Adds page and item-cap options.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​sdk/​generated/​services/​timesheets.kt Returns paginated timesheet results.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​sdk/​generated/​services/​reports.kt Adds typed, paginated assigned reports.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​sdk/​generated/​services/​my-assignments.kt Paginates completed assignments.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​sdk/​generated/​services/​everything.kt Paginates overdue feeds.
kotlin/​sdk/​src/​commonMain/​kotlin/​com/​basecamp/​sdk/​generated/​options-param-order.json Records new pagination option ordering.
go/​pkg/​generated/​client.gen.go Regenerates page parameters and required response fields.
go/​pkg/​basecamp/​timesheet.go Shares pagination handling across timesheet reports.
go/​pkg/​basecamp/​timesheet_test.go Tests automatic and explicit-page report requests.
go/​pkg/​basecamp/​timeline.go Reuses the wrapped-page follower for person progress.
go/​pkg/​basecamp/​reports.go Paginates assigned to-dos and exposes metadata.
go/​pkg/​basecamp/​reports_test.go Tests assigned pagination and updates overdue fixtures.
go/​pkg/​basecamp/​my_assignments.go Adds paginated completed-assignment results.
go/​pkg/​basecamp/​my_assignments_test.go Tests completed-assignment page behavior.
go/​pkg/​basecamp/​everything.go Adds paginated overdue-feed results.
go/​pkg/​basecamp/​everything_test.go Tests page following, explicit pages, and filters.
go/​pkg/​basecamp/​client.go Shares page traversal for arrays and wrapped collections.
go/​pkg/​basecamp/​catalog/​catalog.json Regenerates operation pagination metadata and parameters.
conformance/​tests/​live-my-surface.json Updates overdue-feed descriptions only.
conformance/​runner/​typescript/​live-dispatch.ts Caps live samples for newly paginated feeds.
conformance/​runner/​rust/​src/​operations.rs Dispatches overdue feeds through list handling.
conformance/​runner/​ruby/​runner.rb Materializes overdue-feed enumerators.
conformance/​runner/​go/​main.go Adapts calls to new overdue-feed signatures.
behavior-model.json Records five new Link-paginated operations.

Review effort: Balanced

@thehale
thehale force-pushed the api-fixed-page-size branch 2 times, most recently from 04e3cce to 00c73a8 Compare November 20, 2026 00:54
Basecamp is moving GET /todos/overdue.json to 50 to-dos per page
(basecamp/bc3#14537). Every SDK now follows its Link header, so a caller
still gets every overdue to-do, and can ask for one page instead.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199
Basecamp is moving GET /cards/overdue.json to 50 cards per page
(basecamp/bc3#14537). Every SDK now follows its Link header, so a caller
still gets every overdue card, and can ask for one page instead.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199
Basecamp is moving GET /my/assignments/completed.json to 50 assignments
per page (basecamp/bc3#14537). Every SDK now follows its Link header, so
a caller still gets every completed assignment, and can ask for one page
instead.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199
Basecamp is moving GET /reports/timesheet.json to 50 entries per page
(basecamp/bc3#14537). Every SDK now follows its Link header, so a caller
still gets the whole report, and can ask for one page instead. In Go the
account-wide report now takes the same Limit and Page as the project
and recording reports.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199
@thehale
thehale force-pushed the api-fixed-page-size branch from 00c73a8 to 57f20bd Compare November 20, 2026 01:07
@thehale

thehale commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Written by @thehalebot

On Copilot's review: fixed. typescript/src/index.ts now re-exports the four new option types, each in the commit that adds it: EverythingOverdueTodosEverythingOptions, EverythingOverdueCardsEverythingOptions, MyCompletedAssignmentsMyAssignmentOptions and AssignedReportOptions. ReportTimesheetOptions was already exported. tsc --noEmit passes at 57f20bd.

thehale added a commit to basecamp/basecamp-cli that referenced this pull request Nov 20, 2026
Basecamp answers the overdue to-dos and cards, completed assignments,
the timesheet report and the assigned to-dos report 50 records a page
(basecamp/bc3#14537), where each used to come whole. Once that ships,
basecamp-sdk v0.37.0 would hand those commands the first page as if it
were the whole list. They now read every page, so a list longer than 50
is still complete.

Pins basecamp-sdk to basecamp/basecamp-sdk#1102, which follows these
pages, until a release carries it, and re-syncs the MCP server's model
from it, so its five matching actions take a page. The new go.sum
changes the Nix vendorHash.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199
Basecamp is moving GET /reports/todos/assigned/:id.json to 50 to-dos per
page, repeating the person and grouping on every page
(basecamp/bc3#14537). Every SDK now follows its Link header and collects
the to-dos under the first page's person, so a caller still gets the
whole report, and can ask for one page instead.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199
Basecamp is moving the overdue to-dos report from 15, 30, 50 and then
100 to-dos a page to 50 on every page (basecamp/bc3#14537). The spec,
the upgrade notes and the page-2 test fixtures now describe 50-per-page
pages, so nobody reading them works out offsets from the old sizes.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199
PersonProgress kept its own copy of the Link-following loop for a
wrapped response. The assigned to-dos report needed the same walk, so
both now use followWrappedPagination, and a fix to the walk reaches
both.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199
@thehale
thehale force-pushed the api-fixed-page-size branch from 57f20bd to 1d0f5e0 Compare November 20, 2026 01:25
thehale added a commit to basecamp/basecamp-cli that referenced this pull request Nov 20, 2026
Basecamp answers the overdue to-dos and cards, completed assignments,
the timesheet report and the assigned to-dos report 50 records a page
(basecamp/bc3#14537), where each used to come whole. Once that ships,
basecamp-sdk v0.37.0 would hand those commands the first page as if it
were the whole list. They now read every page, so a list longer than 50
is still complete.

Pins basecamp-sdk to basecamp/basecamp-sdk#1102, which follows these
pages, until a release carries it, and re-syncs the MCP server's model
from it, so its five matching actions take a page. The new go.sum
changes the Nix vendorHash.

https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10516396199

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conformance Conformance test suite go kotlin python Pull requests that update the Python SDK ruby Pull requests that update the Ruby SDK rust Rust SDK spec Changes to the Smithy spec or OpenAPI swift typescript Pull requests that update TypeScript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants