feat: add message/channel paginator stack with thread minimal-init and state stores#1795
Open
MartinCupela wants to merge 35 commits into
Open
feat: add message/channel paginator stack with thread minimal-init and state stores#1795MartinCupela wants to merge 35 commits into
MartinCupela wants to merge 35 commits into
Conversation
Support setting paginator items directly, optional request retries, offline DB in ChannelPaginator, identification of pagination restart based on query shape change.
…has_unread, last_updated
…n other matching paginators
…n other matching paginators
…eat/message-paginator # Conflicts: # src/channel.ts # src/client.ts
… and message.updated
…or itemOrderComparator
….messages.deleted and message.deleted events
…eflect reaction events
Resolve all 7 textual conflicts + hidden semantic conflicts from folding PR #1674 into current master (release-v10). Types pass; 3462/3469 unit tests pass. Notable resolutions: - member.added/removed: keep master fix #1761 (drop PR's reintroduced member_count double-count). - UserGroupPaginator (#1743): ported to the new paginators/BasePaginator<T,Q>. - client.ts / textComposer types / pagination barrel: unioned, dead code dropped. Known remaining failures tracked in specs/.../decisions.md (own_capabilities design decision + 3 items needing diagnosis). WIP checkpoint; not pushed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- own_capabilities (Option B): keep reactive getter/setter but return undefined until loaded, preserving #1732 unread on uninitialized channels; update PR's 'undefined ID no options' expectation. - UserGroupPaginator: stable query shape + apply forward cursor in query() so pages accumulate (new base resets list on query-shape change). - orchestrator test: expect item:undefined on notification.removed_from_channel (master #1788 evicts channel from activeChannels). - messageComposer config test: add master's trackUploadProgress + commands. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Size Change: +96.3 kB (+23.54%) 🚨 Total Size: 505 kB 📦 View Changed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is a broader SDK architecture update, not just a message pagination introduction.
In addition to the new paginator stack, it introduces minimal
Threadinitialization (without initial server thread payload), reactiveStateStore-based state inChannelState, new orchestration/event-pipeline utilities.What’s included
1) New pagination foundation + message pagination
src/pagination/paginators/*:BasePaginatorChannelPaginatorMessagePaginatorMessageReplyPaginatorReminderPaginatorMessagePaginatorintegration for channel and thread flows:2) Multi-list channel orchestration
ChannelPaginatorsOrchestratorfor managing multiple channel lists/paginators.EventHandlerPipelinefor composable/ordered event handling.3) Thread minimal-init support (no initial thread payload required)
Threadconstructor now supports initialization from:client + channel + parentMessage(with optionaldraft)threadData4) Reactive
ChannelStatestoresStateStore-backed reactive slices inChannelState:5) Message operations + local update flows
MessageOperationsandMessageOperationStatePolicy.6) Config/setup and request customization improvements
InstanceConfigurationService.ChannelandThread.Channelcustom mark-read request signature.Testing
Large test expansion and updates across:
Base,Channel,Message,MessageReply, compiler/index utilities)Todo