The 2026-06-27 DevTools trace for the big session branch shows that most of the selected main-thread time is DevTools/Inspector overhead (CpuProfiler::StartProfiling, V8Console::runTask, v8::Debugger::*). Project-attributed self time is much smaller, but the React Components track still shows repeated workspace-level render bursts.
Observed project-side symptoms:
DesktopWindowFrame re-renders large parts of the workspace shell in repeated bursts.ContextMenu / Popper / Tooltip work.Task row actions
TaskList callbacks stable across list-local state changes by reading mutable values through refs where the action only needs the latest value at invocation time.Task row menu cost
TaskListItemContextMenu and its file/provider-path loading limited to the opened context menu.Workspace shell props
resetKeys, render callbacks, and small object props that are passed into memoized/error-boundary children.Composer and toolbar props
Follow-up trace findings
p6 trace still shows repeated React scheduler long tasks after excluding DevTools profiler startup and inspector overhead.TaskListItem, ContextMenu, ContextMenuTrigger, MenuProvider, Popper, ControlHintTooltip, TaskRenameDialog, and ModelConfigSelect remain visible in repeated component render bursts.pnpm typecheck and pnpm lint before committing.The uploaded p9 DevTools trace shows the previous task-list/sidebar work is effective for the recorded scenario: task row and workspace task-section components are no longer the dominant React component costs. After discounting DevTools profiler startup and React DevTools timing overhead, the remaining user-visible delay is still main-thread React work during streaming.
Observed project-side hotspots:
FunctionCall time is dominated by react-dom_client.js scheduled work; layout and paint are not the bottleneck.RunTask blocks, so INP is delayed by streaming render pressure.ChatBottomDock still receives freshly-created prop objects and JSX children from ChatView on each render.ToolbarControls still receives an inline codingPlanUsageRemaining object and inline provider/usage callbacks; it also recreates portal children and thought-level callbacks during parent renders.ChatViewConversation recreates renderHistoryLoader and renderTurnGroup callbacks, which prevents ChatConversationContent from becoming a stable boundary when streaming updates are unrelated to old turn groups.Follow-up repair plan:
ChatBottomDock prop objects and JSX controls in ChatView, then make ChatBottomDock itself a memo boundary.codingPlanUsageRemaining in ChatInputToolbar.ToolbarControls and wrap the component with memo; keep the model menu deferred until open.ModelConfigSelect so unchanged model picker props do not rerender when context usage changes.ChatConversationContent with memo, preserving existing streaming, history loading, search, and remote-control behavior.The uploaded p10 trace was recorded on top of 834994d60. The previous changes are partially effective: ChatBottomDock no longer appears in the React Components track, and first-party localhost main-thread time is lower than p9. The remaining delay is still JavaScript/React work rather than browser layout or paint.
Observed remaining hotspots:
ToolbarControlsComponent still rerenders during streaming because model/config change callbacks are referentially unstable, and codingPlanUsageRemaining.entitlements is deeply equal but recreated.ModelConfigSelectComponent still rerenders because its onValueChange prop changes with the toolbar callback.WorkspaceSidebarFooter, WorkspaceSidebar, CommandCenterDialog, WebRemoteControlDialog, feedback dialogs, Radix dialog/tooltip/menu primitives) being re-executed during chat streaming. These are parent-render fanout costs, not layout/paint costs.Follow-up repair plan:
The uploaded p12 trace shows the p10 follow-up changes are effective for the old hotspots: TaskList*, WorkspaceSidebar*, ModelConfigSelectComponent, and ToolbarControlsComponent no longer dominate the React Components track. ChatBottomDockComponent is reduced to the expected inline-layout transitions. After discounting DevTools profiler startup, inspector events, and unattributed profiling-like long tasks, the remaining project-side delay is concentrated in chat content rendering and forced style/layout work.
Observed remaining hotspots:
MarkdownTable recreates scroll/resize observers whenever streaming markdown replaces children, then immediately reads scrollWidth / clientWidth. This shows up as repeated markdown-table.tsx callback time and contributes to UpdateLayoutTree / Layout.ChatViewSummaryPanel remains a hot component because summary arrays and variant callbacks cross the panel boundary with new references even when their visible content is unchanged.parts / toolCalls change. This is expected, but old turns and summary chrome should not be pulled into the same render burst.Follow-up repair plan:
MarkdownTable observers mounted for the table lifetime instead of keying the observer effect to children; store the latest measurement callback in refs and skip setMaskState when the resolved mask state is unchanged.ChatView, wrap ChatViewSummaryPanel with memo, and memoize small object/function props inside the panel that React DevTools reported as referentially unstable.The uploaded p13 trace was recorded on top of 8f858f9fb. The previous React render-stability fixes are effective: ChatViewSummaryPanel dropped from repeated render bursts to the expected two variant/layout renders, and the old ChatViewConversation / Collapsible / Tooltip fanout is no longer dominant. The remaining user-visible delay has moved from React component execution to browser style/layout work over a large DOM.
Observed remaining hotspots:
UpdateLayoutTree plus Layout, with about 13k elements recalculated and about 22k layout objects dirty.DOMStats reports about 13.8k elements, a single DIV with 1634 children, and a deep image path from file icons. This points to large visible chat/tool content still participating in layout.transition-all on the Git status action row. Chrome reports scrollbar-color as an unsupported animated property, which forces style/layout work.max-height; Chrome reports max-height as unsupported for compositor animation, so opening or resizing the panel can relayout the whole document.Follow-up repair plan:
transition-all on the Git action row with color-only transitions so hover/state changes do not animate scrollbar/layout-related properties.max-height from summary panel shell transitions. The panel may still snap between compact and expanded heights, but border/background/shadow transitions remain.contain: layout style boundaries around chat content and turn content. Avoid content-visibility:auto, contain:paint, and contain:size on turn shells so scroll height, message sizing, and visible table overflow semantics are unchanged.The live app was inspected through Electron CDP after reproducing the resize gesture: double-clicking the application edge blank area to shrink and grow the window. Deep DOM traversal, including open shadow roots, matched the trace-scale DOM count and found the current large container:
document > shadow(diffs-container) > DIV[data-gutter] has 1634 direct children.document > shadow(diffs-container) > DIV[data-content] has 1634 direct children and about 8.3k descendants.x=1737, width=486 while the viewport was 1745px wide, so only a narrow sliver was visible but the full @pierre/diffs DOM still participated in style/layout.FILE_VIEWER_CHUNK_BYTES = 128 * 1024 file preview chunk used when this trace was captured; changing chunk size or virtualizing @pierre/diffs would affect visible code navigation, comments, search, and scroll anchoring, so that was not the first repair.As of 2026-07-28, ordinary text preview no longer renders transport chunks as separate documents: files up to 256KB render once as a complete document, while larger files show a bounded-preview message. The heavy-content visibility gate remains necessary because an allowed complete document can still contain many rows.
Follow-up repair plan:
PreviewPaneContent only when its tab is active, the side pane is logically visible, and the side pane has enough viewport-intersecting inline width.scrollTop when the pane becomes visible again.