Skip to content

Comments

fix: convert UUID fields to strings in _extract_feedback_dict_from_step_row#2793

Merged
hayescode merged 1 commit intoChainlit:mainfrom
jarvisrjz:fix/feedback-uuid-serialization
Feb 24, 2026
Merged

fix: convert UUID fields to strings in _extract_feedback_dict_from_step_row#2793
hayescode merged 1 commit intoChainlit:mainfrom
jarvisrjz:fix/feedback-uuid-serialization

Conversation

@jarvisrjz
Copy link
Contributor

@jarvisrjz jarvisrjz commented Feb 19, 2026

Summary

asyncpg returns raw uuid.UUID objects from PostgreSQL. The sibling method
_convert_step_row_to_dict already wraps UUID fields with str(), but
_extract_feedback_dict_from_step_row was passing them through raw. This
caused TypeError: Object of type UUID is not JSON serializable when
resuming a thread via the sidebar.

Changes

  • Wrapped row["id"] and row["feedback_id"] with str() in
    _extract_feedback_dict_from_step_row to match the pattern used in
    _convert_step_row_to_dict.

Test plan

  • Verified the fix resolves the JSON serialization error when resuming
    threads with feedback in the PostgreSQL data layer.

Summary by cubic

Converted UUID fields to strings in _extract_feedback_dict_from_step_row to prevent JSON serialization errors when resuming threads from the sidebar. Wraps row['id'] and row['feedback_id'] with str() to match _convert_step_row_to_dict.

Written for commit 87091f5. Summary will update on new commits.

…ep_row

asyncpg returns raw uuid.UUID objects from PostgreSQL. The sibling method
_convert_step_row_to_dict already wraps UUID fields with str(), but
_extract_feedback_dict_from_step_row was passing them through raw. This
caused TypeError: Object of type UUID is not JSON serializable when
resuming a thread via the sidebar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working data layer Pertains to data layers. labels Feb 19, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@hayescode hayescode added this pull request to the merge queue Feb 24, 2026
Merged via the queue into Chainlit:main with commit 721b94a Feb 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working data layer Pertains to data layers. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants