Skip to content

fix(discover): decode recommendations from the backend's nullable 'reason' - #81

Merged
windoze95 merged 1 commit into
mainfrom
fix/explore-reason-decode
Jul 10, 2026
Merged

fix(discover): decode recommendations from the backend's nullable 'reason'#81
windoze95 merged 1 commit into
mainfrom
fix/explore-reason-decode

Conversation

@windoze95

Copy link
Copy Markdown
Owner

The Recommendation model required a reasoning JSON key, but the backend serves the field as nullable reason (schemas/feed.py RecommendationOut). Every GET /api/discover response failed to decode with type 'Null' is not a subtype of type 'String', so the Explore tab rendered its error card instead of suggestions.

Maps the field with @JsonKey(name: 'reason') and defaults it to '' so a null reason can't break the whole payload. The Dart-side reasoning name (and all call sites/tests) are unchanged.

Found while generating store screenshots against the nullfeed-demo server, which mirrors the real backend's shape.

🤖 Generated with Claude Code

https://claude.ai/code/session_015UjT16Qz6fmtx8UYzE9pfY

…ason'

The model required a 'reasoning' JSON key, but the backend serves the
field as nullable 'reason' (schemas/feed.py RecommendationOut) — every
discover response threw "type 'Null' is not a subtype of type 'String'"
and the Explore tab showed the error card instead of suggestions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015UjT16Qz6fmtx8UYzE9pfY
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@windoze95
windoze95 merged commit d55e29d into main Jul 10, 2026
7 checks passed
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