Skip to content

docs(management): document TriggerClient for multi-target SDK usage#3694

Open
ericallam wants to merge 2 commits into
mainfrom
docs/trigger-client
Open

docs(management): document TriggerClient for multi-target SDK usage#3694
ericallam wants to merge 2 commits into
mainfrom
docs/trigger-client

Conversation

@ericallam
Copy link
Copy Markdown
Member

Summary

Docs follow-up for #3683 (TriggerClient for per-instance SDK configuration). Adds a dedicated reference page and threads the new pattern through the existing management + preview-branches docs.

What's in

New page docs/management/multiple-clients.mdx — when to use TriggerClient vs configure() vs auth.withAuth, env-var fallback rules, isolation contract, namespace surface, inheritContext opt-in, and a when-to-use-what table.

Updated pages

  • docs/management/authentication.mdx — rewrote the auth.withAuth section to reflect the now-ALS-backed semantics (the prior version warned about concurrency races and pointed at issue bug: global configure() silently ignores subsequent calls, parallel requests always use first caller's auth #3298 as a tracked fix; that fix landed in feat(sdk,core): add TriggerClient for per-instance SDK configuration #3683). Added tr_preview_* to the key prefix list. Reframed the multi-target use case to lead with TriggerClient, with auth.withAuth as the temporary-override helper.
  • docs/management/overview.mdx — added a Multiple clients in one process subsection.
  • docs/deployment/preview-branches.mdx — added a Triggering across multiple branches from one process example.
  • docs/triggering.mdx — one-liner pointing at the new page for cross-project triggering.
  • docs/docs.json — slotted management/multiple-clients into the Management API nav, right after authentication.

Paired with #3683.

Test plan

  • Mintlify preview renders cleanly
  • Code samples in each updated page run as documented
  • Cross-page links resolve (/management/multiple-clients, /management/authentication)

Adds a dedicated `Multiple SDK clients` page covering when to reach
for `new TriggerClient({...})` vs `configure()` vs `auth.withAuth`,
the env-var fallback rules, the isolation contract, and the curated
namespace surface.

Updates the existing management overview, authentication, preview
branches, and triggering pages to surface the new pattern. Refreshes
the `auth.withAuth` section: removes the stale concurrency warning
and the reference to issue #3298, since the fix landed alongside
TriggerClient. Adds the `tr_preview_*` key prefix to the example.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 21, 2026

⚠️ No Changeset found

Latest commit: 4d1c592

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 41b79498-c1a8-4d69-959c-fbf5ca5c676c

📥 Commits

Reviewing files that changed from the base of the PR and between 5b5e9af and 4d1c592.

📒 Files selected for processing (3)
  • docs/deployment/preview-branches.mdx
  • docs/management/multiple-clients.mdx
  • docs/management/overview.mdx
✅ Files skipped from review due to trivial changes (3)
  • docs/management/overview.mdx
  • docs/deployment/preview-branches.mdx
  • docs/management/multiple-clients.mdx
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (python)

Walkthrough

This PR adds documentation for using multiple TriggerClient instances from a single process. It introduces docs/management/multiple-clients.mdx covering client configuration, env-var precedence, ApiClientMissingError, available management APIs, unavailable task-scoped helpers, isolation semantics, and inheritContext. It updates authentication guidance (including tr_preview_ prefix and auth.withAuth AsyncLocalStorage scoping), integrates examples into the management overview, adds triggering and preview-branch guidance with a Promise.all example, and updates docs navigation to include the new page.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding documentation for TriggerClient multi-target SDK usage pattern.
Description check ✅ Passed The PR description provides comprehensive context including a clear summary, detailed breakdown of new and updated pages, and a test plan. However, the description template's required checklist items are not marked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/trigger-client

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.

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 21, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
trigger 🟢 Ready View Preview May 21, 2026, 4:04 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ericallam ericallam marked this pull request as ready for review May 21, 2026 16:04
coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Define `payload` and surface the `emailTask` type import so the
example snippets across overview, multiple-clients, and preview
branches docs run as pasted.
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

Comment thread docs/management/multiple-clients.mdx
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