Skip to content

feat: Waiting plugin addition#1110

Merged
abueide merged 6 commits intomasterfrom
waiting-plugin
Feb 18, 2026
Merged

feat: Waiting plugin addition#1110
abueide merged 6 commits intomasterfrom
waiting-plugin

Conversation

@sunitaprajapati89
Copy link
Contributor

add waiting plugin interface.

  • any plugin implement this interface will pause event processing when it's added to analytics
  • any plugin implement this interface can pause and resume event processing as needed

@abueide
Copy link
Contributor

abueide commented Feb 12, 2026

@claude
@copilot
can you implement the review comments in this PR?

Copy link

Copilot AI commented Feb 12, 2026

@abueide I've opened a new pull request, #1123, to work on those changes. Once the pull request is ready, I'll request review from you.

Implements WaitingPlugin functionality that allows plugins to pause event
processing until async operations complete (e.g., permissions, SDK initialization).

Key features:
- WaitingPlugin base class with pause/resume methods
- Automatic event buffering when paused
- Support for multiple waiting plugins
- 30-second timeout to prevent permanent blocking
- Works with both root-level and destination plugins

Implementation details:
- Add running state to storage (separate from enabled)
- Events queued when running=false
- Process pending events when all waiting plugins resume
- QueueFlushingPlugin respects running state

Includes comprehensive tests and documentation with real-world examples
(IDFA permissions, native SDK initialization, remote config loading).

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix strict-boolean-expressions error in QueueFlushingPlugin.ts
- Replace 'any' type with proper ClientWithInternals type in tests
- All linting errors resolved
@abueide abueide self-assigned this Feb 12, 2026
abueide and others added 3 commits February 18, 2026 09:54
Fix inverted condition in process() that was routing events to the
pipeline when paused and queuing them when running. Add 1000-event
cap on pendingEvents to match Kotlin SDK's StartupQueue behavior.
Add tests for event queuing, replay on resume, flush-while-paused,
timeout cancellation, resume idempotency, plugin removal, and cap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abueide abueide enabled auto-merge (squash) February 18, 2026 17:08
@abueide abueide merged commit 7a35888 into master Feb 18, 2026
5 checks passed
@abueide abueide deleted the waiting-plugin branch February 18, 2026 17:09
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.

5 participants

Comments