cmux-next: a new workspace's sidebar row draws from the press, with no walk of every workspace
Merged
TE
18d ago+242+242+012345678901234567890123456789-43-43-01234567890123456789
Leo, 2026-10-18: on the nightly, a new workspace takes too long to show in the sidebar ("it scans the walk or whatever").
Cmd-N already queued a placeholder row for the new workspace at the press, but that row only reached the screen through the sidebar's rows pass. The pass runs a hop later and rebuilds every row of every workspace before it draws, so the delay grew with the number of workspaces and queued behind rebuilds the daemon had already started.
Now the placeholder row draws in the press's own turn:
PendingWorkspaceRowsredraws each window's sidebar (SidebarRedraws) in the turn a row comes or goes, over the rows already shown, and releases a selection waiting on that row. The later rows pass confirms the row in place.debug.new_workspacetimes each create from the press to the frame its row is first drawn, with the walks in between (SidebarNewRowTimer, built onSwitchFrameTimer).- perf-gate.py's
new_workspacesscenario makes 50 workspaces one at a time and blocks on any row that needed a walk between its create and its draw (walks0) or committed a frame late, then closes them. The window's own rows pass after the swap still runs; it isn't on the row's path. - Dead code goes:
WorkspaceSpawn.honoringand two unused App functions.
Row ordering (#21821) is a separate fix.
Testing
PendingWorkspaceRowsRedrawTestspassed on the fleet at 06bead4.- The
new_workspacesperf gate runs in the app scheme compile job, which this PR'sfull-cilabel turns on; its result is linked below once it runs.
Changelog
- Fixed: a new workspace's sidebar row shows on the next frame after Cmd-N, however many workspaces are open.
š¤ Generated with Claude Code