Skip to content

fix: revert providers outside ErrorBoundary and upgrade findable-ui to v51.1.0#4787

Merged
NoopDog merged 1 commit intomainfrom
fran/4786-providers
Apr 28, 2026
Merged

fix: revert providers outside ErrorBoundary and upgrade findable-ui to v51.1.0#4787
NoopDog merged 1 commit intomainfrom
fran/4786-providers

Conversation

@frano-m
Copy link
Copy Markdown
Contributor

@frano-m frano-m commented Apr 28, 2026

Summary

Reverts the provider move from #4783 and upgrades findable-ui to v51.1.0, which fixes the infinite crash loop at the library level.

Why revert

PR #4783 moved ExploreStateProvider and DataDictionaryStateProvider inside the ErrorBoundary to catch reducer crashes. This fixed the crash loop but caused state loss when navigating to non-entity-list pages — the providers would unmount and lose explore state.

Why this works without the provider move

findable-ui v51.1.0 (PR #899) fixes the root cause at the library level:

  • parseFilterParam — safely validates filter URL params without throwing. Called from reducers above the ErrorBoundary, prevents the crash that caused the re-render loop.
  • useValidateFilterParam hook — runs inside ExploreView (inside the ErrorBoundary), validates the URL filter param directly, and throws DataExplorerError for invalid filters so the error page renders.
  • ErrorBoundary — fixes this.renderthis.reset typo.
  • useAsync.run() — clears stale error on new request.

Provider layout (restored to original)

ExploreStateProvider              ← outside ErrorBoundary (preserves state)
  DataDictionaryStateProvider     ← outside ErrorBoundary
    Main
      ErrorBoundary
        FileManifestStateProvider ← inside ErrorBoundary
          Component

Closes #4786

Reference

Test plan

  • Malformed JSON filter → error page, no loop
  • Wrong shape filter → error page, no loop
  • Valid shape, invalid values → API error page, no loop
  • Valid filters work normally
  • Navigation between entity list and detail pages preserves state
  • Unit tests pass
  • e2e tests pass

🤖 Generated with Claude Code

…o v51.1.0 (#4786)

Revert ExploreStateProvider and DataDictionaryStateProvider to their
original position outside the ErrorBoundary. Moving them inside (#4783)
caused state loss when navigating to non-entity-list pages.

Upgrade findable-ui to v51.1.0 which fixes the crash loop at the
library level:
- parseFilterParam safely validates filter URL params without throwing
- useValidateFilterParam hook surfaces invalid filter errors inside
  the ErrorBoundary

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
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 reverts the placement of ExploreStateProvider and DataDictionaryStateProvider to be outside the ErrorBoundary (to preserve state across navigation) and upgrades @databiosphere/findable-ui to v51.1.0, which includes upstream fixes to prevent the invalid-filter crash loop without requiring the provider move.

Changes:

  • Move ExploreStateProvider and DataDictionaryStateProvider back outside the ErrorBoundary in pages/_app.tsx.
  • Upgrade @databiosphere/findable-ui from ^51.0.0 to ^51.1.0 and update lockfile accordingly.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
pages/_app.tsx Restores provider layout so explore/data-dictionary state persists even when the error boundary renders.
package.json Bumps @databiosphere/findable-ui dependency to ^51.1.0.
package-lock.json Locks @databiosphere/findable-ui to 51.1.0 with updated tarball metadata.

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

@NoopDog NoopDog merged commit 922c8a5 into main Apr 28, 2026
7 checks passed
@frano-m frano-m deleted the fran/4786-providers branch April 29, 2026 08:04
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.

[AnVIL DX] Upgrade findable-ui with filter param validation fix

3 participants