发布

  • [OPIK-5903] [FE] fix: stabilize filters default to prevent trace panel crash (#6284)

    frostbyte_neo 发布于 2026-04-15 09:17:37 +00:00

    The inline filters = [] destructuring default in TraceDetailsPanel and
    TracesSpansTab produced a fresh array reference every render when the URL
    param was absent. When Ollie navigates with a narrow search payload, the
    stripped params cascade through simultaneous replaceIn write-backs; the
    unstable filters reference amplifies that into a re-render storm that
    exceeds React's nested-update limit, caught in a Tooltip-wrapped button's
    composed ref chain ("Maximum update depth exceeded" on the trace page).

    Replace the inline default with a module-level EMPTY_FILTERS constant so
    the fallback reference is stable across renders. setFilters still writes
    to the URL, so the constant is never mutated.

    Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com

    下载附件