Skip to content

0.1.2-lazurio.5: opening the right panel crashes Chat with React #301 (too many re-renders) #135

Closed

Description

@immakermatty

What happens

In 0.1.2-lazurio.5, clicking Toggle right panel in Chat crashes the web app: "Something went wrong", Minified React error pingdotgg#301 (too many re-renders). The thread's panel state is persisted, so that thread then crashes on every load. Other threads work.

Reproduced on the Ring 0 reference Environment on 2026-10-27 and reported on a work Environment.

Affected versions

  • 0.1.2-lazurio.5 only.
  • Not affected: 0.1.2-lazurio.4, the preview 0.1.2-preview.20261026.1 (the same code as .4), and earlier versions. Their compiled ChatView memoizes the panel value.

Cause

f607827395 reads the thread's panel through a plain function, buddyRightPanelState(buddySurface, useRightPanelStore(...)).

  • The React Compiler treats a plain function's result as mutable, so it stops memoizing the panel's presence value built from it.
  • usePanelPresence sets state during render whenever that value changes identity. With a fresh object on every render, an open panel loops.

Recovering a stuck thread

Nothing is lost; the panel only closes and its tabs stay. On the crashing page, open the browser console and run:

const k="t3code:right-panel-state:v2",s=JSON.parse(localStorage.getItem(k));for(const p of Object.values(s.state.byThreadKey))p.isOpen=false;localStorage.setItem(k,JSON.stringify(s));location.reload()

Fix

#134 moves the Buddy seam into the store's selector, for the right panel and the terminal drawer. It ships as 0.1.2-lazurio.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions