Skip to content

Conversation

@amadeus
Copy link
Member

@amadeus amadeus commented Jan 30, 2026

Basically File/FileDiff components can now opt out of the built in dom based error handling.

The prop to do so is disableErrorHandling: true

Fixes #290

@vercel
Copy link

vercel bot commented Jan 30, 2026

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

Project Deployment Actions Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Jan 30, 2026 8:25pm
pierrejs-docs Ready Ready Preview Jan 30, 2026 8:25pm
pierrejs-solid-diff-demo Ready Ready Preview Jan 30, 2026 8:25pm

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an opt-in feature to disable the built-in DOM-based error handling in the FileDiff and File components, allowing developers to handle rendering errors with custom error boundaries or other mechanisms.

Changes:

  • Added disableErrorHandling boolean option to FileDiff and File components
  • When enabled, rendering errors are rethrown instead of being caught and displayed in the DOM
  • Updated documentation in both VanillaAPI and ReactAPI constants files

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
packages/diffs/src/components/FileDiff.ts Added disableErrorHandling option to FileDiffOptions interface and implemented error rethrow logic in the render method
packages/diffs/src/components/File.ts Added disableErrorHandling option to FileOptions interface and implemented error rethrow logic in the render method
apps/docs/app/docs/VanillaAPI/constants.ts Added documentation examples for the new disableErrorHandling option in both FileDiff and File examples
apps/docs/app/docs/ReactAPI/constants.ts Added documentation examples for the new disableErrorHandling option in both DiffOptions and FileOptions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

amadeus and others added 4 commits January 30, 2026 12:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@amadeus amadeus merged commit dfbb326 into main Jan 30, 2026
9 checks passed
@amadeus amadeus deleted the amadeus/disable-error-handling branch January 30, 2026 20:39
amadeus added a commit that referenced this pull request Jan 30, 2026
* Add prop to disable error handling

* Add docs

* Update apps/docs/app/docs/VanillaAPI/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/docs/app/docs/ReactAPI/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/docs/app/docs/VanillaAPI/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/docs/app/docs/ReactAPI/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
amadeus added a commit that referenced this pull request Jan 30, 2026
* Add prop to disable error handling

* Add docs

* Update apps/docs/app/docs/VanillaAPI/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/docs/app/docs/ReactAPI/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/docs/app/docs/VanillaAPI/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/docs/app/docs/ReactAPI/constants.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@amadeus amadeus mentioned this pull request Jan 30, 2026
2 tasks
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.

Feature: Custom error handling

2 participants