fix(cmux-next sidebar): the icon rail keeps its 48px column (it shared .acpmux-rail with the session rail)

Merged
TE
15d ago
+35-4

Layout pass, running list (full list in cmuxterm-hq knowledge/layout-pass.md):

Summary

The chats sidebar's icon rail and the chat's session rail (summary/SessionRail.tsx) both used the class .acpmux-rail. Where summary.css loads after the sidebar's styles.css (the pane's dev.tsx entry, and the gallery), the session rail's rules won:

  • its flex: 0 0 clamp(240px, 26%, 340px) column;
  • under 560px, its absolute 300px overlay.

So the 48px icon rail drew 268 to 300px wide, and the chat list was squeezed to 32 to 80px. The sidebar's rail is now .acpmux-sidebar-rail: in the markup, its rule in styles.css, the prototype's .proto-history hide rule, and the gallery anchor. The session rail keeps .acpmux-rail.

Before / after

Gallery agent-pane.session-sidebar / baseline. Measured rail x and width: before, 32/268 at 300 and 220/300 at 520; after, 0/48 at both.

BeforeAfter
300, dark
520, light

(The "No matching chats" line in both shots is a separate bug, fixed by #23002.)

Test

cd webviews && bun test test/sidebar-rail-css.test.tsx loads both sheets into happy-dom, renders the sidebar, and reads the icon rail's computed style.

  • Base (red commit e9c4f500b6e): fails with ["stretch", "2px"] instead of ["center", "0px"] (the session rail's align-items and padding).
  • Head: passes.

Observed / Not run

  • Ran: the test above (red, then green). Also ran session-rail, chats-sidebar-empty, session-sidebar-preview and chat-rows-open-on-press (25 pass), oxfmt, oxlint, tsc (no errors in the changed files), check:{layers,type-scale,status-glyphs,system-blue,text-focus,dialog-keys,switch-fetches,browser-lanes} and prepush-gate.py. The stills come from the gallery dev server in Chromium.
  • Not run: the full bun run check (it's fleet-only on huge-blue; CI runs it) and the native app.

Changelog

Fixed: The chats sidebar's icon rail no longer stretches across the sidebar and squeezes the chat list.

Agent session: huge-blue

🤖 Generated with Claude Code