Skip to content

Update createEffect docs#734

Merged
DZakh merged 5 commits intomainfrom
nb/remove-experimental-tag
Nov 11, 2025
Merged

Update createEffect docs#734
DZakh merged 5 commits intomainfrom
nb/remove-experimental-tag

Conversation

@nikbhintade
Copy link
Member

@nikbhintade nikbhintade commented Nov 10, 2025

  • remove experimental_ tag
  • add docs about rateLimit
  • update existing snippets with rateLimit

Summary by CodeRabbit

  • New Features

    • Effect API promoted from experimental to stable.
    • Configurable rateLimit option added to control invocation frequency.
  • Documentation

    • New "Rate Limit" section with usage patterns and migration guidance from experimental to stable.
    • Examples updated to show stable effect usage, rateLimit configuration, and migration snippets.
    • Clarified caching guidance, including how to override context cache and example for avoiding cache on failures.
    • Added a Video example component to illustrate concepts.

@vercel
Copy link

vercel bot commented Nov 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
envio-docs Ready Ready Preview Comment Nov 11, 2025 6:51am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

Replaces experimental_createEffect with createEffect in docs for getMetadata and getBalance; adds a rateLimit option and new Rate Limit section, updates imports and persistence/cache guidance (including context.cache = false example), and inserts a Video component import. (≤50 words)

Changes

Cohort / File(s) Summary
Effect API examples & docs
docs/HyperIndex/Advanced/effect-api.md
Replaced experimental_createEffectcreateEffect in imports and examples for getMetadata and getBalance; added rateLimit option to both effects and introduced a dedicated "Rate Limit" section with migration guidance; expanded persistence/cache discussion (including context.cache = false) and added Video import; minor wording/example adjustments.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant DocExample as Docs (example)
  participant Effect as createEffect
  participant RateLimiter as RateLimit
  participant Cache as Context Cache
  participant Remote as Remote API

  rect rgb(230, 245, 255)
  DocExample->>Effect: call getMetadata()/getBalance()
  end

  alt rateLimit configured
    Effect->>RateLimiter: check/queue request
    RateLimiter-->>Effect: allow or throttle
  end

  alt allowed & caching enabled
    Effect->>Cache: check cache
    Cache-->>Effect: cached response? (hit/miss)
    alt miss
      Effect->>Remote: network request
      Remote-->>Effect: response
      Effect->>Cache: store response
    end
  else no cache or cache disabled
    Effect->>Remote: network request
    Remote-->>Effect: response
  end

  Effect-->>DocExample: return result (or error)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to accurate renaming in imports and examples (experimental_createEffectcreateEffect).
  • Verify rateLimit option spelling and structure in both example effects.
  • Confirm the context.cache = false example reflects actual runtime behavior and examples align with SDK semantics.

Possibly related PRs

  • Document effect cache #675 — Modifies the same effect examples (getMetadata, getBalance) and adds cache: true to effect calls; closely related to migration and option changes.

Suggested reviewers

  • DenhamPreen
  • moose-code

Poem

🐰 I hop through docs where effects now play,
createEffect hums and rate limits hold sway.
Caches tuck secrets, Video waves hello,
I nibble the diff and tidy the flow. 🥕

Pre-merge checks and finishing touches

✅ 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 'Update createEffect docs' is directly related to the main change—updating documentation for the createEffect API, removing the experimental tag, and adding rateLimit documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nb/remove-experimental-tag

📜 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 cb6a893 and b3ef000.

📒 Files selected for processing (1)
  • docs/HyperIndex/Advanced/effect-api.md (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/HyperIndex/Advanced/effect-api.md

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.

@nikbhintade nikbhintade requested a review from DZakh November 10, 2025 09:14
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: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52cf2f2 and 8163c6c.

📒 Files selected for processing (1)
  • docs/HyperIndex/Advanced/effect-api.md (4 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/HyperIndex/Advanced/effect-api.md

[grammar] ~50-~50: Ensure spelling is correct
Context: ...e effect - rateLimit (required) - the maxmimum calls allowed per timeframe, or false t...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (2)
docs/HyperIndex/Advanced/effect-api.md (2)

17-20: Successful graduation from experimental API.

The import and documentation have been cleanly updated from experimental_createEffect to createEffect, aligning with the PR objective to remove the experimental tag.


140-144: New Rate Limit documentation section is clear and well-placed.

The section succinctly explains the rateLimit option and provides a practical tip about overriding caching via context.cache. This complements the code examples effectively.

Copy link
Member

@DZakh DZakh left a comment

Choose a reason for hiding this comment

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

Nice. I really appreciate your help here 🙏🙏🙏

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

🧹 Nitpick comments (1)
docs/HyperIndex/Advanced/effect-api.md (1)

179-204: Rate Limit section is well-documented; consider adding use-case examples.

The new Rate Limit section clearly explains the feature and provides good code examples. For additional value, consider adding a concrete use-case example (e.g., when hitting external APIs to avoid throttling or rate-limit errors from downstream services).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8163c6c and a34ba91.

📒 Files selected for processing (1)
  • docs/HyperIndex/Advanced/effect-api.md (6 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/HyperIndex/Advanced/effect-api.md

[uncategorized] ~208-~208: Possible missing comma found.
Context: ...perimental_prefix and addrateLimit` option which now required. ```diff typescript...

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (2)
docs/HyperIndex/Advanced/effect-api.md (2)

17-45: LGTM: Migration from experimental to stable API is clean.

The transition from experimental_createEffect to createEffect is properly implemented across both getMetadata and getBalance examples, with rateLimit options correctly added as {calls, per} objects. Imports and function signatures are consistent and accurate.

Also applies to: 91-123


130-150: LGTM: Caching documentation with override example is clear.

The updated persistence section effectively explains how context.cache = false can override the effect-level cache setting, with a concrete code example demonstrating the pattern for error handling scenarios.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Member

@DZakh DZakh left a comment

Choose a reason for hiding this comment

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

🚀🚀🚀

@DZakh DZakh merged commit 68bee82 into main Nov 11, 2025
3 checks passed
@DZakh DZakh deleted the nb/remove-experimental-tag branch November 11, 2025 12:53
@coderabbitai coderabbitai bot mentioned this pull request Dec 19, 2025
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