From c09ad72ba75c5da2bdaccd5c12b7b12d874fa59f Mon Sep 17 00:00:00 2001 From: mortezaei Date: Thu, 20 Aug 2026 15:20:40 +0330 Subject: [PATCH] refactor: remove web bootstrap pending state and set ready status directly upon web_ready signal --- src/app/globals.css | 4 ---- src/app/layout.tsx | 14 +------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index f65629b..cdc3128 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -231,10 +231,6 @@ html:lang(ar) body, -webkit-overflow-scrolling: touch; } -html[data-web-bootstrap="pending"] .app-shell { - visibility: hidden; -} - @media (min-width: 640px) { .app-shell { width: 375px; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 39863b6..7f9c933 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -248,9 +248,6 @@ export default async function RootLayout({ }); var isWebView = !!(window.HabibApp && window.HabibApp.postMessage); - if (isWebView && !configApplied) { - root.dataset.webBootstrap = 'pending'; - } // 4. Queued web_ready Delivery Protocol // @@ -273,17 +270,8 @@ export default async function RootLayout({ if (!window.HabibApp || !window.HabibApp.postMessage) return false; window.__habibWebReadySent = true; - if (!configApplied) { - root.dataset.webBootstrap = 'pending'; - } + root.dataset.webBootstrap = 'ready'; window.HabibApp.postMessage(JSON.stringify({ action: 'web_ready' })); - - // Safety: release bootstrap-pending if initial_config never arrives - setTimeout(function() { - if (root.dataset.webBootstrap === 'pending') { - root.dataset.webBootstrap = 'ready'; - } - }, 2500); return true; }