Skip to content

fix: load projects with unknown view styles - #269

Merged
amix merged 1 commit into
mainfrom
amix/tolerate-unknown-view-style
Nov 3, 2026
Merged

amix merged 1 commit into
mainfrom
amix/tolerate-unknown-view-style

Conversation

@amix

@amix amix commented Nov 2, 2026

Copy link
Copy Markdown
Member

Context

  • Project.view_style is typed as Literal["list", "board", "calendar"], so a project with any other view style (e.g. an upcoming table layout) raises ParseError and fails the whole load, including a full page of get_projects().
  • The SDK should survive new view styles before the API starts sending them.

What was changed

  • Project.view_style is read as str and keeps unknown values exactly as sent.
  • ViewStyle (in models and types) and the values accepted by add_project / update_project are unchanged.
  • Tests load projects with table and an arbitrary future value; both fail with ParseError before this change.

Refs

  • Doist/Todoist#31065

🤖 Generated with Claude Code

`Project.view_style` was typed as the `ViewStyle` literal, so any value the
SDK didn't list (e.g. the upcoming `table` layout) raised `ParseError` and
failed the whole load. Read it as `str` and keep the value as sent. The
`ViewStyle` names and request-side validation are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@amix
amix marked this pull request as ready for review November 2, 2026 10:40
@amix
amix requested a review from a team as a code owner November 2, 2026 10:40
@amix
amix requested review from amleczko and removed request for a team November 2, 2026 10:40

@doistbot doistbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This PR updates fix: load projects with unknown view styles. No issues were flagged in the reviewed diff.

Share Feedback • Review Logs

@amix
amix merged commit b0a1370 into main Nov 3, 2026
6 checks passed
@amix
amix deleted the amix/tolerate-unknown-view-style branch November 3, 2026 04:47
@amix amix mentioned this pull request Nov 3, 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.

3 participants