Repository navigation
refactor(llc, core)!: route hide, show and delete channel through the generated client - #3045
Conversation
… generated client Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elete fails Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d they pass on Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor/channel_response_mapper #3045 +/- ##
====================================================================
+ Coverage 78.66% 78.67% +0.01%
====================================================================
Files 481 484 +3
Lines 29380 29383 +3
====================================================================
+ Hits 23112 23118 +6
+ Misses 6268 6265 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…_channel_lifecycle_openapi_migration Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_channel_lifecycle_openapi_migration
…_channel_lifecycle_openapi_migration
… controller test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_channel_lifecycle_openapi_migration Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Linear: FLU-911
What
Moves hiding, showing and deleting a channel onto the OpenAPI-generated client.
StreamChatClient.hideChannel,showChannelanddeleteChannel, andChannel.hide,showanddelete, returnResult<HideChannelResponse>,Result<ShowChannelResponse>andResult<DeleteChannelResponse>instead of throwing.StreamChannelListController.deleteChannel(flutter_core) returns theResulttoo.ChannelsRepositorygains the three operations;channels_mapper.dartgains the envelope mappers. The deleted channel goes through the existingChannelResponsemapper.models/response/.DeleteChannelResponse.channelis nullable, as the spec declares it.StreamChatApi.channel.hideChannel,showChannelanddeleteChannelare removed.Resultand stay on the screen when the delete fails, as they did when it threw.DefaultApi.hideChannel(POST /api/v2/chat/channels/{type}/{id}/hide)StreamChatClient.hideChannelDefaultApi.showChannel(POST /api/v2/chat/channels/{type}/{id}/show)StreamChatClient.showChannelDefaultApi.deleteChannel(DELETE /api/v2/chat/channels/{type}/{id})StreamChatClient.deleteChannelHideChannelResponse/ShowChannelResponse/DeleteChannelResponseWhy
The calls take the API's envelopes rather than
EmptyResponse, so a field the API adds later reaches callers without another break. The v2 routes are the same backend handlers as v1, and none is gated or in beta.Notes
hard_deleteis not exposed: the server refuses it from a client-side token, and v10 never sent it.showChannelnow sends no body where v1 sent{}; the server accepts both.markReadfamily,markAllRead,markChannelsDelivered) are not part of this PR.Testing
stream_chatanalyze clean, full suite green (1,957 tests). flutter_core green (385), and the other packages and the sample app analyze clean.generate_plan.py --checkreports 0 problems.client_hide_channel_test.dart,client_show_channel_test.dartandclient_delete_channel_test.dart.clear_history), show and delete answer the same. The deleted channel maps identically to the v1 decode, andhard_deleteis refused on both.🤖 Generated with Claude Code