Skip to content

improve presence listener interface - #23

Merged
pdiffley merged 10 commits into
mainfrom
presence-listener-interface
May 15, 2026
Merged

improve presence listener interface#23
pdiffley merged 10 commits into
mainfrom
presence-listener-interface

Conversation

@pdiffley

Copy link
Copy Markdown
Contributor

No description provided.

pdiffley and others added 8 commits May 14, 2026 15:29
* added code to pass updated version to LongPollListner

* Extern kysely-ctl and jiti to fix dynamic require in parcel (#22)

* moved version and seen into listener

* format fix

* added oxc formatter for vscode

---------

Co-authored-by: Shane Friedman <smoores-gpg@friedmans.us>
@pdiffley
pdiffley requested a review from smoores-dev May 15, 2026 21:23
Comment thread packages/collab-client/src/index.ts Outdated
Comment on lines +66 to +67
let options = signal ? { signal } : {};
for await (const newCommits of this.listener.listen(editorState, options)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh right, forgot I left this in by accident. This can just be:

Suggested change
let options = signal ? { signal } : {};
for await (const newCommits of this.listener.listen(editorState, options)) {
for await (const newCommits of this.listener.listen(editorState, { signal )) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Typescript gets made at me when I do that

Argument of type '{ signal: AbortSignal | undefined; }' is not assignable to parameter of type '{ signal?: AbortSignal; }'.
  Types of property 'signal' are incompatible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, yeah. Just change the type of listener.listen to be AbortSignal | undefined

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread packages/demo/src/editor/Editor.tsx Outdated

import {
LongPollListener,
LongPollListener as CollabLongPollListner,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
LongPollListener as CollabLongPollListner,
LongPollListener as CollabLongPollListener,

@pdiffley
pdiffley merged commit 2affd6c into main May 15, 2026
2 checks passed
@pdiffley
pdiffley deleted the presence-listener-interface branch May 15, 2026 21:44
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.

2 participants