Skip to content

web: Minified React error #185 (Maximum update depth exceeded) in ProviderModelPicker / LegendList #712

Description

@rynfar

Environment

  • Version: Pylon (Nightly) 0.0.33-nightly.20260920.216
  • Route / Path: /:projectId/:threadId (/d00c0848-4578-49ec-ab92-106a5becc809/e725324d-6d09-40c8-add5-96369ac6b97e)
  • Timestamp: 2026-09-21T16:57:59.487Z

Error Stack

Error: Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at fi (pylon-code://app/assets/dist-ZXBZjinf.js:26:27477)
    at ui (pylon-code://app/assets/dist-ZXBZjinf.js:26:27050)
    at Ko (pylon-code://app/assets/dist-ZXBZjinf.js:26:52165)
    at pylon-code://app/assets/dist-ZXBZjinf.js:26:52046
    at q (pylon-code://app/assets/ProviderModelPicker-DBOqiT6B.js:1:4473)
    at ln (pylon-code://app/assets/ProviderModelPicker-DBOqiT6B.js:1:17411)
    at un (pylon-code://app/assets/ProviderModelPicker-DBOqiT6B.js:1:17519)
    at Ca (pylon-code://app/assets/ProviderModelPicker-DBOqiT6B.js:1:72142)
    at Sa (pylon-code://app/assets/ProviderModelPicker-DBOqiT6B.js:1:70801)
    at xa (pylon-code://app/assets/ProviderModelPicker-DBOqiT6B.js:1:70039)

Analysis & Sourcemap Symbolication

React error #185 indicates that the maximum update depth was exceeded (more than 50 cascaded synchronous state updates within componentDidUpdate / useLayoutEffect).

Symbolication of the minified call stack in chunk ProviderModelPicker reveals that all inner frames originate from @legendapp/list's container measurement cycle inside ModelPickerContent:

  1. xa (@legendapp/list/react.mjs:4807): ContainerLayoutCoordinator layout effect calling flushItemSizeUpdates
  2. Sa (@legendapp/list/react.mjs:4848): applyItemSize / updateOneItemSize
  3. Ca (@legendapp/list/react.mjs:4937): measureContainersInLayoutEffect
  4. un (@legendapp/list/react.mjs:1094): setSize
  5. ln (@legendapp/list/react.mjs:1082): addTotalSize
  6. q (@legendapp/list/react.mjs:251): reactive state listener calling React setState during layout effect

Suspected Contributing Causes

  1. ContainerLayoutCoordinator measurement cycle in @legendapp/list:
    LegendList's Container has an unconstrained useLayoutEffect that calls scheduleContainerLayout(ctx, containerId) on render, bumping containerLayoutEpoch. This triggers ContainerLayoutCoordinator's useLayoutEffect, which measures containers via measureContainersInLayoutEffect, calls setSize, updates reactive signals, and triggers another React render in the same frame.
  2. Scroll fade / layout feedback oscillation:
    ModelPickerContent.tsx attaches onLayout={updateModelListScrollFades} and onScroll={updateModelListScrollFades} to LegendList. When updateModelListScrollFades toggles showTopScrollFade or showBottomScrollFade, it updates LegendList's className (getVirtualizedScrollFadeClassName). If the fade mask or scrollbar changes layout metrics by subpixels, it can trigger onLayout or container remeasurement, creating a feedback cycle between scroll fade state updates and LegendList container measurements.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions