Skip to content

feat: add optional onPollingStarted callback when making update calls#1345

Merged
nikosxenakis merged 13 commits intodfinity:mainfrom
hpeebles:request_accepted
Apr 23, 2026
Merged

feat: add optional onPollingStarted callback when making update calls#1345
nikosxenakis merged 13 commits intodfinity:mainfrom
hpeebles:request_accepted

Conversation

@hpeebles
Copy link
Copy Markdown
Contributor

@hpeebles hpeebles commented Apr 10, 2026

Description

This allows devs to specify an optional callback when submitting update calls, which will be invoked once their request has been accepted by the IC.

We use this within OpenChat to display the first message tick, signalling that the message has made its way to the backend.

How Has This Been Tested?

I have added tests which cover the various cases where the callback should either be invoked or not, and also we are using this successfully within OpenChat.

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@hpeebles hpeebles requested a review from a team as a code owner April 10, 2026 11:01
Comment thread packages/core/src/agent/agent/api.ts Outdated
Comment thread packages/core/src/agent/agent/http/index.ts Outdated
Comment thread packages/core/src/agent/agent/http/http-update.test.ts Outdated
@hpeebles hpeebles changed the title feat: add optional onRequestAccepted callback when making update calls feat: add optional onPollingStarted callback when making update calls Apr 23, 2026
nikosxenakis
nikosxenakis previously approved these changes Apr 23, 2026
Copy link
Copy Markdown
Contributor

@nikosxenakis nikosxenakis left a comment

Choose a reason for hiding this comment

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

Looks good, thank you.

@nikosxenakis
Copy link
Copy Markdown
Contributor

@hpeebles please resolve the conflict and I can merge the changes.

@github-actions github-actions Bot dismissed nikosxenakis’s stale review April 23, 2026 11:11

Review dismissed by automation script.

@nikosxenakis nikosxenakis merged commit 943e52e into dfinity:main Apr 23, 2026
26 checks passed
@hpeebles hpeebles deleted the request_accepted branch April 23, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants