Skip to content

Docs for presence - #132

Open
katfang wants to merge 4 commits into
katfang.presence-libraryfrom
katfang.presence-docs
Open

Docs for presence#132
katfang wants to merge 4 commits into
katfang.presence-libraryfrom
katfang.presence-docs

Conversation

@katfang

@katfang katfang commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
  1. Docs for Presence
    • Pushed to the "top" the react library for presence, however standard service usage is below.
  2. Edits the React presence library so it doesn't rely on tailwind
  3. Added test on the TS side for connecting a subscriber (largely to confirm docs code). Unfortunately, it's not directly liftable into the docs, but did my best to leave bread crumbs as to what's happening.

@katfang
katfang requested a review from benh August 17, 2026 20:49

new Application({
servicers: [MyServicer],
libraries: [presenceLibrary()]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: missing comma after libraries: [presenceLibrary()]. Since ASI doesn't apply inside an object literal, copy-pasting this snippet produces a SyntaxError at initialize. The Python tab just above uses libraries=[presence_library()], and the two later TypeScript snippets in this file both have the comma, so this looks like a typo.

Suggested change
libraries: [presenceLibrary()]
libraries: [presenceLibrary()],

Comment on lines +165 to +166
* `presenceId` is the `string` ID of the `Presence` instance you want to track
the subscriber for.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: the prop is named id, not presenceId. Under a heading that lists the component's props (and next to subscriberId, which is a real prop name), a reader will write <Presence presenceId={...}> and fail type-checking.

The component declares its props as:

export const Presence: FC<{
id: string;
subscriberId: string;
children: ReactNode;
}> = ({ id, subscriberId, children }) => {
const presence = usePresence({ id });

The example further down in this doc correctly passes the local variable presenceId to the id prop.

Suggested change
* `presenceId` is the `string` ID of the `Presence` instance you want to track
the subscriber for.
* `id` is the `string` ID of the `Presence` instance you want to track
the subscriber for.

@katfang
katfang force-pushed the katfang.presence-docs branch from 5e4b9b4 to b6bcfaf Compare August 18, 2026 16:36
@github-actions

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@katfang
katfang force-pushed the katfang.presence-library branch from 541b312 to 7954b41 Compare August 18, 2026 19:39
katfang and others added 4 commits August 18, 2026 19:39
* Change MouseArrow to not implicitly rely on tailwind.
* Don't require children for MouseTracker
* Queue tests: comment fix
* OrderedMap docs: fix broken link
* Fixed authorizer examples.
* Test for subscriber connection in TS.
* Subscriber full example code in docs.
* Wording updates.
@katfang
katfang force-pushed the katfang.presence-docs branch from b6bcfaf to cdb6cd6 Compare August 18, 2026 19:39
@github-actions

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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