cmux-next: a new workspace's sidebar row draws from the press, with no walk of every workspace

Merged
TE
18d ago
+242-43

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:

  • PendingWorkspaceRows redraws 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_workspace times each create from the press to the frame its row is first drawn, with the walks in between (SidebarNewRowTimer, built on SwitchFrameTimer).
  • perf-gate.py's new_workspaces scenario makes 50 workspaces one at a time and blocks on any row that needed a walk between its create and its draw (walks 0) 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.honoring and two unused App functions.

Row ordering (#21821) is a separate fix.

Testing

  • PendingWorkspaceRowsRedrawTests passed on the fleet at 06bead4.
  • The new_workspaces perf gate runs in the app scheme compile job, which this PR's full-ci label 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