Skip to content

feat(core, ui): add the scheduled message list and send long press - #3140

Draft
xsahil03x wants to merge 22 commits into
sahil/flu-954-scheduled-messages-llc-apifrom
sahil/flu-954-scheduled-messages-ui
Draft

xsahil03x wants to merge 22 commits into
sahil/flu-954-scheduled-messages-llc-apifrom
sahil/flu-954-scheduled-messages-ui

Conversation

@xsahil03x

@xsahil03x xsahil03x commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Linear: FLU-954

Second of three PRs for scheduled messages, stacked on #3138. Depends on GetStream/stream-core-flutter#210 (merged), whose ref this bumps.

What changed

  • stream_chat_flutter_core:
    • StreamScheduledMessageListController and StreamScheduledMessageListEventHandler, a paged list of the current user's scheduled messages (optionally for one channel or set of statuses), in the same order as a channel's scheduled messages. Like the draft and reminder lists, the handler keeps it current from the scheduled_message.* events and reloads it when the connection recovers; apps can override any handler.
    • StreamChannelListController.includeScheduledMessages, to load each channel's scheduled messages with the channel list.
  • stream_chat_flutter: onSendLongPress on StreamMessageComposer (receives the composer's controller, so the app can read and reset the message) and StreamChatMessageInput. It is offered only while the send button would send a new message, not while editing or running a command. The send button's tooltip still describes it to screen readers.
  • stream_core_flutter bumped to the merged StreamButton.onLongPress.
  • sample_app, behind a new "Scheduled Messages" setting:
    • Long-press send → presets (tomorrow 09:00 / 13:00, Monday 09:00) or a custom date and time, in a sheet that refuses past times and times beyond the channel's longest lead time. Commands can't be scheduled. The composer clears like a normal send and gets the message back if scheduling fails; a snackbar confirms with a View action, and failures are described by their reason.
    • A pill above the composer with the channel's scheduled count; the channel list loads them with the channels.
    • A Scheduled tab and a "Scheduled Messages" row on the contact and group info screens, following the Scheduled List design: rows by send time, each labelled "Send ", failed ones in place with their reason; edit (mentions and quote kept), reschedule, send now and delete.
Presets Custom time Too far Scheduled
Actions Edit

Why

The design asks for scheduling from the composer and a list to manage scheduled messages. The scheduling UI stays in the sample for now; the SDK only gains the composer hook and the core list controller, following how drafts and reminders are built.

Verification

  • Unit tests for the controller (load order matching the channel's, each event, channel and status filters, stale updates, events during a page load, errors, reload on reconnect, custom handler), the channel list flag, and the composer's long press (offered for a new message, not while editing, hands over the controller without sending). Core: 435 passing.
  • On an Android emulator: schedule from a preset and a custom time, the too-far state, the slash-command refusal, the pill, edit, send now (message arrives, list clears), delete, a scheduled message created elsewhere showing after a cold launch, and the Scheduled tab.

🤖 Generated with Claude Code

- stream_chat_flutter_core: StreamScheduledMessageListController and
  StreamScheduledMessageListEventHandler, a paged list of the current
  user's scheduled messages kept current by their events.
- stream_chat_flutter: onSendLongPress on StreamMessageComposer and
  StreamChatMessageInput, offered while the send button would send a
  new message. Bumps stream_core_flutter for StreamButton.onLongPress.
- sample_app: schedule a message by long-pressing send (presets or a
  custom time), a scheduled messages pill in the channel, and a list
  to edit, reschedule, send now or delete them, behind the "Scheduled
  Messages" setting.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.04950% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.38%. Comparing base (b909a53) to head (31d2e4e).

Files with missing lines Patch % Lines
...age_composer/message_composer_component_props.dart 71.42% 2 Missing ⚠️
.../src/stream_scheduled_message_list_controller.dart 97.22% 2 Missing ⚠️
...lib/src/message_input/stream_message_composer.dart 66.66% 1 Missing ⚠️
Additional details and impacted files
@@                             Coverage Diff                              @@
##           sahil/flu-954-scheduled-messages-llc-api    #3140      +/-   ##
============================================================================
+ Coverage                                     81.34%   81.38%   +0.04%     
============================================================================
  Files                                           458      460       +2     
  Lines                                         29882    29983     +101     
============================================================================
+ Hits                                          24307    24403      +96     
- Misses                                         5575     5580       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

xsahil03x and others added 17 commits November 2, 2026 22:25
StreamScheduledMessageListController orders every value it is given by
scheduled time, as StreamDraftListController does with its sort, so the
load, load more and update paths no longer sort on their own. Adds tests
for loading more, starting from a value, the update and delete events
and the event listener.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
StreamScheduledMessageListController passes its page size and cursor to
queryScheduledMessages as PaginationParams.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The schedule sheet's presets and time checks use clock.now() instead of
DateTime.now().

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
StreamScheduledMessageListController looks a scheduled message up once
with indexWhere when updating or deleting it, instead of scanning the
list twice.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…u-954-scheduled-messages-ui

# Conflicts:
#	packages/stream_chat_flutter_core/CHANGELOG.md
#	sample_app/lib/config/sample_app_config_screen.dart
… the text when scheduling fails

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@xsahil03x
xsahil03x marked this pull request as draft November 3, 2026 15:26
xsahil03x and others added 4 commits November 6, 2026 10:25
…mple

- Add StreamChannelListController.includeScheduledMessages.
- Order StreamScheduledMessageListController's items like the channel's
  scheduled messages, keep a server copy over one from this device, and keep
  events that arrive while a page loads.
- Sample: list scheduled messages by send time with failed ones in place and
  their reason inline, page through them, keep mentions and quotes when
  editing, refuse to schedule commands, and describe failures by reason.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ScheduledMessage has plain server timestamps again, so the list keeps
whichever copy changed last.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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