Skip to content

Added channel helper docs#2711

Merged
atharvadeosthale merged 20 commits intomainfrom
realtime-channel-helper
Feb 13, 2026
Merged

Added channel helper docs#2711
atharvadeosthale merged 20 commits intomainfrom
realtime-channel-helper

Conversation

@ArnabChatterjee20k
Copy link
Contributor

@ArnabChatterjee20k ArnabChatterjee20k commented Jan 23, 2026

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • Documentation

    • Added Channel helper guidance across Realtime docs with cross-platform examples (Web, Flutter, Apple, Android), event filtering, single/multi-channel subscriptions, and updated subscribe/unsubscribe examples showing helper and raw-channel forms.
    • Published a blog post announcing Channel helpers with usage patterns and benefits.
  • Chores

    • Added new blog cover image to the asset cache.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Introduces Channel helper fluent API across realtime documentation examples (JS/TS, Flutter, Swift, Kotlin), replacing many raw-string channel identifiers with Channel.*() builders (e.g., Channel.account(), Channel.files(), Channel.tablesdb(...).table(...).row(...)). Adds a new "Channel helpers" section describing wildcard behavior, event filters (.create(), .update(), .delete()), and parity examples showing both helper-based and raw-string subscriptions. Updates subscribe/unsubscribe examples, channel overview, and multiple-channel samples. Adds a new blog post announcing Channel helpers and updates optimize-cache.json with a cover image entry.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (26 files):

⚔️ .optimize-cache.json (content)
⚔️ src/routes/docs/advanced/security/encryption/+page.markdoc (content)
⚔️ src/routes/docs/apis/realtime/+page.markdoc (content)
⚔️ src/routes/docs/products/databases/csv-imports/+page.markdoc (content)
⚔️ src/routes/docs/products/databases/legacy/type-generation/+page.markdoc (content)
⚔️ src/routes/docs/products/databases/tables/+page.markdoc (content)
⚔️ src/routes/docs/products/databases/type-generation/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/dart/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/deno/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/dotnet/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/go/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/kotlin/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/node/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/php/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/python/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/ruby/+page.markdoc (content)
⚔️ src/routes/docs/quick-starts/swift/+page.markdoc (content)
⚔️ src/routes/docs/tooling/command-line/tables/+page.markdoc (content)
⚔️ src/routes/docs/tutorials/android/step-6/+page.markdoc (content)
⚔️ src/routes/docs/tutorials/nextjs/step-6/+page.markdoc (content)
⚔️ src/routes/docs/tutorials/nuxt/step-6/+page.markdoc (content)
⚔️ src/routes/docs/tutorials/react-native/step-6/+page.markdoc (content)
⚔️ src/routes/docs/tutorials/react/step-6/+page.markdoc (content)
⚔️ src/routes/docs/tutorials/refine/step-5/+page.markdoc (content)
⚔️ src/routes/docs/tutorials/sveltekit/step-6/+page.markdoc (content)
⚔️ src/routes/docs/tutorials/vue/step-6/+page.markdoc (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Added channel helper docs' clearly and concisely summarizes the main change: documentation additions for channel helpers across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch realtime-channel-helper

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/routes/docs/apis/realtime/+page.markdoc (2)

60-66: Bug: Variable name mismatch in Swift example.

Line 62 references message.events!, but the closure parameter is named response. This will cause a compile error.

🐛 Proposed fix
 // Subscribe to files channel using Channel helper
 let subscription = realtime.subscribe(channels: [Channel.bucket().file().toString()]) { response in
-    if (message.events!.contains("buckets.*.files.*.create")) {
+    if (response.events!.contains("buckets.*.files.*.create")) {
         // Log when a new file is uploaded
         print(String(describing: response))
     }
 }

246-250: Missing semicolon in Dart example.

Dart statements should end with a semicolon. The listen() call is missing its terminating semicolon.

Proposed fix
 subscription.stream.listen((response) {
     // Callback will be executed on all account events.
     print(response);
-})
+});

Note: The same issue appears in other Flutter examples at lines 331 and 413.

🤖 Fix all issues with AI agents
In `@src/routes/docs/apis/realtime/`+page.markdoc:
- Around line 581-595: Fix the two typos in the table descriptions: change the
string "to a any team" to "to any team" for the teams entry (near the `teams` /
`Channel.team().toString()` block) and change "to a any membership" to "to any
membership" for the memberships entry (near the `memberships` /
`Channel.membership().toString()` block); update the plain text in +page.markdoc
so the descriptions read "Any create/update/delete events to any team" and "Any
create/update/delete events to any membership" respectively.
🧹 Nitpick comments (2)
src/routes/docs/apis/realtime/+page.markdoc (2)

189-194: Clarify when .toString() is required.

The documentation shows Channel.account() used directly (lines 110, 223) but chained calls like Channel.database(...).collection(...).document(...) always use .toString(). The guidance "when needed" may confuse developers.

Consider explicitly stating which helpers return strings directly versus which require .toString(), or standardize by always using .toString() for consistency.


611-617: Consider adding a code example for event filtering.

The event filtering methods (.create(), .update(), .delete()) are documented but not demonstrated in the code examples throughout the page. A brief example showing actual usage in a subscription call would help developers understand how to apply these filters.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@src/routes/docs/apis/realtime/`+page.markdoc:
- Around line 383-389: The example inconsistently awaits realtime.subscribe;
change the line using "const subscription = await realtime.subscribe(...)" to
remove the await so it reads "const subscription = realtime.subscribe(...)" to
match other examples (keep awaiting "subscription.close()" if close remains
async); locate "realtime.subscribe" and "subscription.close" in the snippet to
apply this change.
- Around line 592-594: The table entries use inconsistent identifier formatting:
change `executions.[ID]` to `executions.<ID>` and update the Channel call from
`Channel.execution(ID)` to `Channel.execution('<EXECUTION_ID>')` so both match
the angle-bracket and quoted-id style used elsewhere (update the entries
referencing executions.[ID] and Channel.execution(ID) in +page.markdoc
accordingly).
🧹 Nitpick comments (1)
src/routes/docs/apis/realtime/+page.markdoc (1)

140-142: Variable name docSubscription should be rowSubscription to align with updated terminology.

The variable docSubscription appears in Flutter (line 140), Apple (line 160), and Android (line 184) examples. Since the terminology has been updated from "documents" to "rows", these variables should reflect that.

Proposed fix (Flutter example, apply similarly to Apple and Android)
-final docSubscription = realtime.subscribe([
+final rowSubscription = realtime.subscribe([
     Channel.tablesdb('<DATABASE_ID>').table('<TABLE_ID>').row('<ROW_ID>')
 ]);

Based on learnings: "In appwrite/website, update terminology to use 'rows' and 'columns' instead of 'documents' and 'collections' across all documentation files."

@atharvadeosthale atharvadeosthale merged commit f02a256 into main Feb 13, 2026
6 checks passed
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.

4 participants