feat(maestro): mobile multi-view — tabs-only projection + sidebar drawer
ci / rust (push) Successful in 4m48s

Below 860px the split tree projects to a one-pane-at-a-time pill strip (no
splits/drag/resize — desktop only); the tree is untouched so widening restores
the splits. Only the visible pane's session stays live; the rest park. The
sidebar becomes an off-canvas drawer toggled by a ☰ in the tab bar, with a
backdrop; tapping a session opens it and closes the drawer. Re-renders on the
breakpoint crossing without losing sessions.

Closes #35. Part of epic #37.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 09:30:28 +00:00
co-authored by Claude Opus 4.8
parent d272210ecd
commit 851006cd2c
3 changed files with 201 additions and 7 deletions
+18 -1
View File
@@ -71,7 +71,23 @@ const sidebar = renderSidebar(store, {
const content = document.createElement("section");
content.className = "content";
shellEl.append(sidebar.el, content);
// Mobile (issue #35): the sidebar is an off-canvas drawer toggled by the ☰ in
// the tab bar; a backdrop covers the content while it's open, and tapping a
// session closes it. On desktop these are inert (CSS gates the drawer styling).
const backdrop = document.createElement("div");
backdrop.className = "mv-backdrop";
function closeDrawer(): void {
shellEl.classList.remove("drawer-open");
}
function toggleDrawer(): void {
shellEl.classList.toggle("drawer-open");
}
backdrop.addEventListener("click", closeDrawer);
sidebar.el.addEventListener("click", (e) => {
if ((e.target as HTMLElement).closest(".tree-leaf")) closeDrawer();
});
shellEl.append(sidebar.el, content, backdrop);
root.replaceChildren(renderTopbar(store), shellEl);
// The pool owns attach connections independently of the route: navigating away
@@ -172,6 +188,7 @@ mv = createMultiView({
onDisconnect: closePane,
renderWelcome,
onLayoutChange: scheduleSave,
onToggleSidebar: toggleDrawer,
});
let contentShowsMv = false;
function showMultiView(): void {