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.开发窗口运行时确认:展开回调随 preferences 重建,使一个项目的折叠更新传播到所有项目。
300ms 高度/透明度动画仍在,但同步渲染占用了大部分动画时间,表现为突然展开。
useProjectSidebarPreferences 继续作为视图、顺序和展开偏好的唯一 owner;单项目命令保持稳定引用,以函数式更新读取最新偏好。连续切换不同项目、全部展开/收起及 storage 事件后的单项操作保留其它项目、视图和顺序;刷新恢复持久化偏好。项目展开不选择任务或新建草稿。
点击项目 → 稳定 setExpanded → 唯一偏好 owner 的函数式更新
├─ 保存完整偏好
└─ 目标行 expanded 变化 → 原有高度/透明度动画
其它行参数不变 → 跳过内容渲染
SPT07 复用 new-task-rendering 的实际目录 Provider、偏好 hook 和项目组件,覆盖 44 项目、桌面/手机布局、Zai Light/Zai Dark。记录 React 提交、动画事件和逐帧高度/透明度;渲染范围与动画行为作为断言,耗时只留作证据。浏览器和 macOS Electron 独立 renderer 不代表完整 App、真实手机传输或 Windows/Linux 整机。
前次验证(2026-11-03):同一 44 项目夹具修复前四组均记录全量 44 行更新;修复后 Chromium 与 macOS Electron 的四组均仅目标 1 行更新,双向 300ms 动画仍有中间高度/透明度帧,连续反向操作及 storage 更新后的持久化正常。浏览器整文件 16/16、Electron 独立 renderer 4/4、完整 macOS App 项目交互 E2E 14/14 通过;后者覆盖批量展开/收起、刷新恢复、快速反向切换及相邻项目操作。证据见覆盖矩阵 SPT07。原有 SPT06 的“双旋转图标”断言已与当前侧栏旋转、消息区像素动画对齐;该过期断言在未改的基线上也失败。Windows/Linux 原生端及手机实机未验证。
额外的全局 conversation 覆盖审计未通过;未改的 staging 基线 681c5f2d5b 也报相同四项:background 与 dynamic-workflow 两份正式用例清单缺少 request ledger ID,以及覆盖表两处总数为 121、实际为 120。本次 pending 回归不修改这些正式用例及全局统计。
运行时确认:单项目展开只改变目录 Context 的 preferences,但顶部导航、列表标题和
WorkspaceHeaderTitleSection 都随之更新;session 标题的 props 并未变化。
DirectoryOwner 持有。session 标题复用不含展开偏好的项目选择投影,
只缩小订阅,不另建目录缓存;无 Provider 的嵌入场景仍返回空值。SPT07 增补上述零更新断言,并验证 session 标题改名、远端设备目录变化及导航操作仍生效。 覆盖桌面/手机布局、深浅主题;另在完整 Dev App 重放实际项目展开,区分夹具与真实链路证据。
展开命令 → DirectoryOwner.preferences → 项目列表与目标行
项目/设备变化 → 同一 owner 的项目选择投影 → session 标题
导航输入变化 → 顶部导航;视图变化 → 列表标题
本次回归:浏览器 SPT03/SPT07/RRI06 12/12、macOS Electron 独立 renderer 的 SPT07 4/4; 完整 Dev App 深浅主题共 8 次切换,三处额外 render 均为零。保留标题改名、设备目录变化与导航选中态正例。 整文件中的 SPT06 旧加载像素断言在原始 HEAD 对照同样失败,未记为通过;证据与平台边界见覆盖矩阵。
点击已有 session 时,文件预览回调随活动会话变化;侧栏未使用该回调却仍接收它, 项目文件操作又依赖整个 props,导致所有项目行的 memo 失效。每个单行 TaskList 还订阅整个 workspace 的 activeTaskId,使无关会话行重复执行。
不新建选中态缓存,不改变 Host 行集合、导航完成、未读 CAS、文件入口取消代际或 desktop-continuous / web-remote-replayable 边界。
点击 session → session store 唯一选中态 → 原/新选中行
导航 chrome 变化 → 侧栏父组件 → 文件操作实际依赖未变 → 项目内容跳过更新
真实文件回调变化 → 最新回调 → 原文件导航/连接链路
SPT08:44 项目,桌面/手机布局、深浅主题;草稿进入会话与 A/B 连续切换、 跨 workspace 的同名 task 隔离、最新文件入口、项目/任务 DOM 身份不变。 浏览器/独立 Electron 记录组件执行范围,完整 App 回放实际选择与文件入口。 渲染次数作为断言;耗时只作为观测,不以开发模式结果推导生产 FPS。
新建会话回归(SPT08):从已有会话点击新建,活动会话清空及草稿预热取得 session ID 是两个独立提交阶段。两阶段均不得更新无关项目内容;只允许原选中行取消选中。 保留草稿准备、项目归属、会话导航及文件操作取消语义,不通过隐藏更新或比较器忽略 props 修复。 首次从历史会话进入 workspace 后,新建会补全 tab 的 workspacePurpose;这类分类更新 同样不得传播到全列。导航点击从窗口 tab store 读取最新目标;远端同步菜单仅订阅 workspaceIdentity → localWorkspacePath 映射,真实映射变化仍更新同步目标。 会话行的连接解析也只订阅 workspacePath、workspaceIdentity、remoteSessionId、remoteTarget, 避免分类字段更新穿透单行 memo;远端身份与连接切换仍触发原解析逻辑。 完整 Dev App 需在至少 40 项目的现场分别记录点击和 Cmd/Ctrl+N 的 React commit、 草稿预热完成与列表 DOM 身份;独立浏览器夹具覆盖桌面/手机布局及深浅主题。
已有会话 → 点击新建 → 活动会话清空 → 草稿预热完成
└─ 仅原选中行更新
无用预览回调不进入侧栏;实际文件导航输入未变 → 项目内容零更新