Model the expanded to-do list read, to-do set previews and loose to-dos
Merged
JE
1d ago+5782+5782+0123456789012345678901234567890123456789-191-191-012345678901234567890123456789
Model the expanded to-do list read, the to-do set's list previews, and the loose to-do list.
What
GetTodolistOrGrouptakesexpanded. BC3'stodolists#showcastsparams[:expanded]to a boolean, andtodolists/_todolist.json.jbuilderthen addsplain_text_description(when the list has a description) andremaining_todos, plus, for a to-do list but not a group,groups(each expanded the same way) andrecently_completed_todos(the three most recent). All four are optional members onTodolist;groupsis recursive (TodolistList), the wayMyAssignmentalready nests.doc/api/sections/todolists.mddoes not documentexpanded; recorded inspec/api-gaps/todolist-expanded-read.md.Todosetgainstodolistsandhill_chart_url.todolistsis a newTodosetTodolistpreview shape (id, title, description, completed, completed_ratio, url, app_url). Itsdescriptionis required and nullable, throughjsonAddasTodolist.colordoes.hill_chart_urlis 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 modelledapp_todolists_url, which has never arrived. The spec now modelsapp_todoslists_urland keepsapp_todolists_urlas@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 andX-Total-Count.todos#indexserves it with the samestatus/completedparameters asListTodos. 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'sgroups, where Go decodes everyPerson. 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 onlygroupssites, on the operations that return aTodolist. - Go:
TodolistsService.Getis unchanged.GetWithOptions(ctx, id, &TodolistGetOptions{Expanded: true})is the expanded read, andTodosService.ListInTodosetlists loose to-dos (it sharesList's pagination and status check). The merge-safeUpdate/Editstill read unexpanded.TodosetgainsAppTodoslistsURL,TodolistsandHillChartURL, andAppTodolistsURLis markedDeprecated.
Departures from the brief
- No
expandedonGetTodoset. Onlytodolists#showreads the flag.todosets#showignores it, and itstodolistspreviews arrive on every read, so they are plain optional members. - Not here:
can_move,can_share_publicly,archived_todos_countandarchived_todolists_counton the to-do set are in #1137.repetition_scheduleon a repeating to-do waits forRecurrenceSchedulein #1138.
Gates
spec/bc3-route-allowlist.ymllistsGET /buckets/:id/todosets/:id/todosundersdk_routes_absent_from_bc3_docs, with the route, controller and view as evidence.scripts/check-deprecation-parityasserts theapp_todolists_urldeprecation in all seven SDKs.scripts/check-idempotency-parity's union and the Rust operation counts grow by one forListTodosetTodos.
Breaking
Labelled breaking:
- Rust:
TodolistsService::gettakes&GetTodolistOrGroupParams, like every generated read with query parameters (the pattern from #1100). Pass&GetTodolistOrGroupParams::default(). - Go custom mocks:
generated.ClientInterface'sGetTodolistOrGroup/...WithResponsetake*GetTodolistOrGroupParams, andListTodosetTodosis 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.jsonnow carriestodolists(one preview with a null description),hill_chart_urlandapp_todoslists_url.manifest.yamlcoversTodosetandTodosetTodolist, and adds the expanded list and its nested group toTodolist. - Every SDK (Go, TypeScript, Ruby, Python sync and async, Kotlin, Swift, Rust) tests:
- the expanded read sends
expanded=trueand decodes the nested members, including a group's ownremaining_todos; - the default read sends no
expanded; - a 404 on the expanded read;
- the to-do set's previews,
hill_chart_urlandapp_todoslists_url; ListTodosetTodospath and filters;- a
ListTodosetTodoserror.
- the expanded read sends
- Go also tests that an expanded
[]stays a non-nil empty slice (the converters are enrolled in the empty-list sweep), thatUpdate's andEdit's reads send noexpanded, thatListInTodosetfollows 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
ListTodosetTodospath case inconformance/tests/paths.json, dispatched in all seven runners.