From 3b69c98cca2ddffc20b7e108da089a1b05951c72 Mon Sep 17 00:00:00 2001 From: naps62-yolo Date: Wed, 24 Jun 2026 15:55:25 +0000 Subject: [PATCH] =?UTF-8?q?fix(maestro):=20render=20=E2=98=B0=20on=20mobil?= =?UTF-8?q?e=20empty=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The welcome/empty-tab branch returned before renderMobile, so with the tab bar collapsed there was no ☰ — leaving mobile users stuck with no way to open the sidebar drawer. Float the same ☰ over the welcome view. Co-Authored-By: Claude Opus 4.8 (1M context) --- web/src/multiview.ts | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/web/src/multiview.ts b/web/src/multiview.ts index 522d2ce..ff9cdeb 100644 --- a/web/src/multiview.ts +++ b/web/src/multiview.ts @@ -338,6 +338,18 @@ export function createMultiView(opts: MultiViewOptions): MultiView { render(); } + // The floating ☰ that stands in for the collapsed tab bar on mobile (single + // tab), keeping the sidebar drawer reachable from the welcome + pane views. + function makeMobileFab(): HTMLButtonElement { + const fab = document.createElement("button"); + fab.type = "button"; + fab.className = "mv-mobile-fab"; + fab.title = "Sessions"; + fab.textContent = "☰"; + fab.addEventListener("click", () => opts.onToggleSidebar?.()); + return fab; + } + // ---- top-level render ---- function render(): void { @@ -351,6 +363,7 @@ export function createMultiView(opts: MultiViewOptions): MultiView { if (!tab.root) { pool.setVisible([]); pool.setFocus(null); + if (isMobile && layout.tabs.length === 1) canvas.appendChild(makeMobileFab()); canvas.appendChild(renderWelcome()); sidebar.setHighlights({ open: openSessions(layout), focused: null, colors: colorMap() }); persist(); @@ -385,15 +398,7 @@ export function createMultiView(opts: MultiViewOptions): MultiView { // With a single tab the tab bar (and its ☰) is hidden — float a ☰ so the // sidebar drawer stays reachable. - if (layout.tabs.length === 1) { - const fab = document.createElement("button"); - fab.type = "button"; - fab.className = "mv-mobile-fab"; - fab.title = "Sessions"; - fab.textContent = "☰"; - fab.addEventListener("click", () => opts.onToggleSidebar?.()); - wrap.appendChild(fab); - } + if (layout.tabs.length === 1) wrap.appendChild(makeMobileFab()); if (ls.length > 1) { const bar = document.createElement("div");