From 497e419f83e2260856dad1834ca4e9b3580d7d84 Mon Sep 17 00:00:00 2001 From: Kpa-clawbot Date: Thu, 28 May 2026 21:08:03 -0700 Subject: [PATCH] fix(#1471 followup): re-inject Customizer/Search/Favorites mirrors when More sheet opens (#1476) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Problem:** Operator reports Customizer link missing from the bottom-nav More sheet on prod (v3.8.2). bottom-nav.js builds the sheet lazily on first More-click. mobile-page-actions.js calls addMissingMoreSheetItems() at DOMContentLoaded + retries 10×500ms — so if operator doesn't tap More within 5s of page load, mirrors never appear. **Root cause:** The earlier polish round (commit 70a570c6 within #1471) dropped the click-listener that re-attempted injection. Init-time retry alone isn't enough; bottom-nav builds the sheet ON DEMAND. **Fix:** Re-add the catch-all click delegate that fires addMissingMoreSheetItems on any More button click (with belt-and-suspenders 50ms + 250ms timeouts to handle slow builds). Hot-deploy candidate (JS-only). Co-authored-by: openclaw-bot --- public/mobile-page-actions.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/public/mobile-page-actions.js b/public/mobile-page-actions.js index e983f600..30a51836 100644 --- a/public/mobile-page-actions.js +++ b/public/mobile-page-actions.js @@ -75,6 +75,22 @@ window.addEventListener('hashchange', syncForRoute); window.addEventListener('resize', syncForRoute); + /* #1471 followup: also re-attempt sheet injection on More-button click, + * in case the page sat idle past the 5s retry window. The bottom-nav.js + * sheet is built lazily on first More-click, and addMissingMoreSheetItems + * may have given up before then. Catch-all delegate listener handles this + * AND survives any bottom-nav.js rebuild path. */ + document.addEventListener('click', function (e) { + var t = e.target; + if (!t) return; + // Trigger whether operator clicked More button or any descendant + var moreBtn = t.closest && t.closest('[data-bottom-nav-more], button'); + if (moreBtn && /more/i.test(moreBtn.textContent || '')) { + setTimeout(addMissingMoreSheetItems, 50); + setTimeout(addMissingMoreSheetItems, 250); // belt-and-suspenders for slow builds + } + }, true); + /* #1461 #7: on mobile, packets-list group-header expand is a UX dead-end * (we hid the chevron so there's no way to collapse). Intercept those * clicks and force them to the single-select code path instead — the