Skip to content

[PUB-1580] Add @experimental tags to LiveObjects methods #1996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

VeskeR
Copy link
Contributor

@VeskeR VeskeR commented Apr 9, 2025

Resolves PUB-1580

Summary by CodeRabbit

  • Documentation
    • Updated API documentation to mark several methods as experimental, highlighting that certain object management, batch, and live update functionalities may evolve in future releases without impacting current behavior.

Copy link

coderabbitai bot commented Apr 9, 2025

Walkthrough

The changes apply an @experimental annotation to multiple methods and interfaces in the ably.d.ts file. Specifically, methods in the Objects, BatchContext, BatchContextLiveMap, BatchContextLiveCounter, LiveObject, and OnLiveObjectLifecycleEventResponse interfaces are marked as experimental. The annotations are added solely in documentation comments without affecting the functionality or signature of the methods.

Changes

File Change Summary
ably.d.ts Added @experimental tag to methods in several interfaces:
- Objects: getRoot, createMap, createCounter, batch, on, off, offAll
- BatchContext: getRoot
- BatchContextLiveMap: get, size, set, remove
- BatchContextLiveCounter: value, increment, decrement
- LiveObject: subscribe, unsubscribe, unsubscribeAll
- OnLiveObjectLifecycleEventResponse: off

Possibly related PRs

Suggested reviewers

  • mschristensen
  • zknill
  • kaschula

Poem

I'm a coding bunny, hopping with delight,
Marking methods experimental, shining so bright.
Interfaces updated along every byte,
Skipping through code like carrots in sight.
With a twitch of my whiskers, I cheer this change outright!
🐰💻

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • PUB-1580: Cannot read properties of undefined (reading 'displayName')

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 84c1643 and fef0155.

📒 Files selected for processing (1)
  • ably.d.ts (24 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: test-browser (webkit)
  • GitHub Check: test-node (20.x)
  • GitHub Check: test-node (18.x)
  • GitHub Check: test-browser (firefox)
  • GitHub Check: test-node (16.x)
  • GitHub Check: test-npm-package
  • GitHub Check: test-browser (chromium)
🔇 Additional comments (13)
ably.d.ts (13)

2116-2177: Annotation Addition to Objects Interface Methods

The methods in the Objects interface—namely getRoot, createMap, createCounter, batch, on, off, and offAll—now include an @experimental tag in their documentation comments. This clearly signals to developers that these methods are experimental and may be subject to change in future releases. The annotations are consistent and well placed throughout the interface.


2219-2221: Annotation Addition in OnObjectsEventResponse

The off() method in the OnObjectsEventResponse interface now carries an @experimental annotation. This addition is consistent with the treatment of related experimental methods and provides clear communication regarding its provisional nature.


2232-2233: Annotation Addition in BatchContext

The getRoot method in the BatchContext interface is now marked with @experimental. This update accurately reflects that grouping operations via batch contexts is still under experimental review.


2248-2248: Annotation in BatchContextLiveMap.get Method

The get method in the BatchContextLiveMap interface is now annotated as @experimental. This helps developers identify that retrieval operations within a batch are experimental.


2266-2267: Annotation in BatchContextLiveMap.set Method

The set method in BatchContextLiveMap now includes the @experimental tag. This update is consistent with other experimental operations and alerts users that the API may change in future versions.


2278-2279: Annotation in BatchContextLiveMap.remove Method

The remove method within the BatchContextLiveMap interface is newly tagged with @experimental. This clear annotation will help developers check for potential adjustments as the API evolves.


2290-2291: Annotation in BatchContextLiveCounter.value Method

The value() method of the BatchContextLiveCounter is now annotated with @experimental. This communicates that even the basic counter retrieval is currently experimental.


2302-2303: Annotation in BatchContextLiveCounter.increment Method

The increment method in BatchContextLiveCounter now carries the @experimental annotation. This consistent update ensures that all counter modification methods are clearly flagged.


2310-2311: Annotation in BatchContextLiveCounter.decrement Method

Similarly, the decrement method in BatchContextLiveCounter is now marked as @experimental. This keeps the API consistent across all counter operations.


2330-2385: Annotations in LiveMap Interface Methods

All the key methods in the LiveMap interface—such as get, size, entries, keys, values, set, and remove—have been updated with an @experimental annotation. Grouping these annotations together provides a uniform signal that all operations on live maps are subject to change. This consistency is helpful for developers relying on these concurrent data structures.


2416-2439: Annotations in LiveCounter Interface Methods

The methods in the LiveCounter interface (value, increment, and decrement) now include the @experimental tag. This clearly labels these counter operations as experimental, ensuring that users are aware of their potentially volatile API status.


2469-2510: Annotations in LiveObject Interface Methods

Within the LiveObject interface, the methods related to update subscriptions—namely subscribe, unsubscribe, unsubscribeAll, as well as the lifecycle methods on, off, and offAll—have been annotated with @experimental. These changes are consistent throughout and serve as an important notice that the behaviors of these realtime updates might change in subsequent releases.


2541-2544: Annotation in OnLiveObjectLifecycleEventResponse

The off() method in the OnLiveObjectLifecycleEventResponse interface now has an @experimental annotation. This helps confirm the experimental status of lifecycle-based deregistration functionality.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@VeskeR VeskeR merged commit 41c0fa0 into integration/liveobjects Apr 15, 2025
8 of 14 checks passed
@VeskeR VeskeR deleted the PUB-1580/add-experimental-tags branch April 15, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants