Skip to content

Conversation

@ENvironmentSet
Copy link
Collaborator

@ENvironmentSet ENvironmentSet commented Dec 12, 2025

errorHandle<`MyActivity`>(
  ErrorHandleComponent,
  {
    boundary: ({ children, renderFallback }) => { /* Your custom error boundary here */ }
  }
)

@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2025

🦋 Changeset detected

Latest commit: 43ce549

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stackflow/react Minor

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for custom error boundaries for structured activity components; fallback UI continues to render inside the chosen boundary.
    • When no error handler is provided, components now skip error-wrapping to avoid unnecessary overhead.
  • Chores

    • Included a minor version changeset for the package.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds customizable error boundaries for structured activity components: ErrorHandler now may include a boundary, the errorHandler factory accepts an options object to specify it, and the renderer uses the provided boundary (or a default) when error handling is present.

Changes

Cohort / File(s) Summary
Changeset documentation
.changeset/eager-emus-sort.md
Adds a changeset documenting a minor version bump for @stackflow/react and the addition of customizable error boundary support.
Type definitions
integrations/react/src/__internal__/StructuredActivityComponentType.tsx
Introduces CustomErrorBoundary type; extends ErrorHandler<P> to include optional boundary?: CustomErrorBoundary; updates errorHandler(...) to accept options?: { boundary?: CustomErrorBoundary } and return { component, boundary? }.
Renderer implementation
integrations/react/src/__internal__/PluginRenderer.tsx
Adjusts render flow: early-return when no errorHandler provided; when present, choose errorHandler.boundary or fallback to StructuredActivityComponentErrorBoundary, and wrap node with that boundary while delegating fallback rendering to errorHandler.component.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect StructuredActivityComponentType.tsx for correct exported types and backward-compatible signatures.
  • Review PluginRenderer.tsx control flow to ensure rendering, loading wrapper, and fallback still behave as intended when a custom boundary is supplied or absent.
  • Verify the CustomErrorBoundary component contract (props: children, renderFallback(error, reset)) matches usage sites.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a customizable error boundary option to structured activity components in the React integration.
Description check ✅ Passed The description provides a code example showing how to use the new error boundary customization feature, which is directly related to the changeset.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b3fc20b and 43ce549.

📒 Files selected for processing (1)
  • integrations/react/src/__internal__/StructuredActivityComponentType.tsx (1 hunks)

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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 12, 2025

commit: b3fc20b

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 12, 2025

Deploying stackflow-demo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 43ce549
Status:⚡️  Build in progress...

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 12, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
stackflow-docs 43ce549 Commit Preview URL Dec 12 2025, 12:25 PM

@ENvironmentSet ENvironmentSet enabled auto-merge (squash) December 12, 2025 12:23
@ENvironmentSet ENvironmentSet merged commit f159bd4 into main Dec 12, 2025
5 of 8 checks passed
@ENvironmentSet ENvironmentSet deleted the structured-activity-custom-error-boundary branch December 12, 2025 12:23
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.

3 participants