Model the expanded to-do list read, to-do set previews and loose to-dos

Merged
JE
1d ago
+5782-191

Model the expanded to-do list read, the to-do set's list previews, and the loose to-do list.

What

  • GetTodolistOrGroup takes expanded. BC3's todolists#show casts params[:expanded] to a boolean, and todolists/_todolist.json.jbuilder then adds plain_text_description (when the list has a description) and remaining_todos, plus, for a to-do list but not a group, groups (each expanded the same way) and recently_completed_todos (the three most recent). All four are optional members on Todolist; groups is recursive (TodolistList), the way MyAssignment already nests. doc/api/sections/todolists.md does not document expanded; recorded in spec/api-gaps/todolist-expanded-read.md.
  • Todoset gains todolists and hill_chart_url. todolists is a new TodosetTodolist preview shape (id, title, description, completed, completed_ratio, url, app_url). Its description is required and nullable, through jsonAdd as Todolist.color does. hill_chart_url is sent only where hill charts are active or enabled.
  • app_todoslists_url. BC3 spells the key with an extra "s", in the jbuilder and in its own doc example. The spec modelled app_todolists_url, which has never arrived. The spec now models app_todoslists_url and keeps app_todolists_url as @deprecated, so it is not a removal. The real fix is a rename upstream in BC3.
  • ListTodosetTodos: GET /{accountId}/buckets/{bucketId}/todosets/{todosetId}/todos.json, loose to-dos, with Link pagination and X-Total-Count. todos#index serves it with the same status/completed parameters as ListTodos. BC3 #12359 documented the create form on this route (CreateTodosetTodo) but not the list.
  • Person-id sites follow groups. The TypeScript, Python and Ruby person-id site tables were built by a walk that stopped at the first re-entry of a schema, so they listed no sites inside a list's groups, where Go decodes every Person. The walk now enters a schema at most twice on one path. That is exactly the depth BC3 nests (a group is never expanded further), and the regenerated tables add only groups sites, on the operations that return a Todolist.
  • Go: TodolistsService.Get is unchanged. GetWithOptions(ctx, id, &TodolistGetOptions{Expanded: true}) is the expanded read, and TodosService.ListInTodoset lists loose to-dos (it shares List's pagination and status check). The merge-safe Update/Edit still read unexpanded. Todoset gains AppTodoslistsURL, Todolists and HillChartURL, and AppTodolistsURL is marked Deprecated.

Departures from the brief

  • No expanded on GetTodoset. Only todolists#show reads the flag. todosets#show ignores it, and its todolists previews arrive on every read, so they are plain optional members.
  • Not here: can_move, can_share_publicly, archived_todos_count and archived_todolists_count on the to-do set are in #1137. repetition_schedule on a repeating to-do waits for RecurrenceSchedule in #1138.

Gates

  • spec/bc3-route-allowlist.yml lists GET /buckets/:id/todosets/:id/todos under sdk_routes_absent_from_bc3_docs, with the route, controller and view as evidence.
  • scripts/check-deprecation-parity asserts the app_todolists_url deprecation in all seven SDKs. scripts/check-idempotency-parity's union and the Rust operation counts grow by one for ListTodosetTodos.

Breaking

Labelled breaking:

  • Rust: TodolistsService::get takes &GetTodolistOrGroupParams, like every generated read with query parameters (the pattern from #1100). Pass &GetTodolistOrGroupParams::default().
  • Go custom mocks: generated.ClientInterface's GetTodolistOrGroup/...WithResponse take *GetTodolistOrGroupParams, and ListTodosetTodos is new.

TypeScript, Ruby, Python, Kotlin and Swift take expanded as an optional argument. MIGRATING.md has an Unreleased section for all of it.

Verification

Each field was checked against bc3 master 8355de35dab (2026-12-03): app/controllers/todolists_controller.rb, app/views/api/todolists/_todolist.json.jbuilder, _todolist_children.json.jbuilder, app/presenters/todolist/presenter.rb, and app/views/api/todosets/_todoset.json.jbuilder. The contract has not changed since the revision spec/api-provenance.json pins, so there is no repin.

Tests

  • New fixtures: spec/fixtures/todolists/get-expanded.json (a list with remaining and recently completed to-dos and one expanded group). spec/fixtures/todosets/get.json now carries todolists (one preview with a null description), hill_chart_url and app_todoslists_url. manifest.yaml covers Todoset and TodosetTodolist, and adds the expanded list and its nested group to Todolist.
  • Every SDK (Go, TypeScript, Ruby, Python sync and async, Kotlin, Swift, Rust) tests:
    • the expanded read sends expanded=true and decodes the nested members, including a group's own remaining_todos;
    • the default read sends no expanded;
    • a 404 on the expanded read;
    • the to-do set's previews, hill_chart_url and app_todoslists_url;
    • ListTodosetTodos path and filters;
    • a ListTodosetTodos error.
  • Go also tests that an expanded [] stays a non-nil empty slice (the converters are enrolled in the empty-list sweep), that Update's and Edit's reads send no expanded, that ListInTodoset follows pagination and its gate carries the project and to-do set, and that an invalid status is a usage error.
  • TypeScript, Python and Ruby test that an out-of-range person id inside an expanded group fails the read as it does in Go.
  • Conformance: a ListTodosetTodos path case in conformance/tests/paths.json, dispatched in all seven runners.