From 046e97b0246fb6e18d762b9fc59bc4a00c07e02d Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Sat, 28 Nov 2026 17:05:05 +0000 Subject: [PATCH] pwa: drop manifest theme_color so Firefox chrome follows the phone theme Firefox for Android ignores meta theme-color entirely; its PWA window takes toolbar/status from manifest theme_color and the navigation bar (white/black) from background_color, so the cream value framed the dark app with light bands. With theme_color absent Firefox falls back to its own light/dark chrome. Chromium keeps the per-scheme meta tags and custom2.js sync. --- Dockerfile | 21 +++++++++++---------- __pycache__/patch_index.cpython-313.pyc | Bin 3671 -> 0 bytes patch_index.py | 15 ++++++++++++++- 3 files changed, 25 insertions(+), 11 deletions(-) delete mode 100644 __pycache__/patch_index.cpython-313.pyc diff --git a/Dockerfile b/Dockerfile index 5a3b4ff..0cd4671 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,16 +75,17 @@ RUN python3 /app/code/patch_index.py && \ rm -f /app/code/librechat/client/dist/assets/index.*.js.gz /app/code/librechat/client/dist/assets/index.*.js.br && \ echo "// coop-build-$(date +%s)" >> /app/code/librechat/client/dist/sw.js -# PWA chrome colors: LibreChat ships a teal theme_color (#009688) in the web -# manifest (the bright green bar Firefox PWAs draw across the top) and black -# background_color. Point both at the light page color — CREAM #faf8f5, the -# dashboard's page background (the manifest can only hold one value; custom2.js -# re-syncs the meta tags to the app's actual theme at runtime). The index.html -# meta gets a light + dark pair so browser/PWA chrome matches the phone theme -# natively. KEEP THESE THREE IN SYNC: this sed, custom.css's html:not(.dark) -# background, and custom2.js COOP_BG.light — the green wash #eaf3ea used to sit -# in all three and made the installed app read as green. -RUN sed -i 's|"theme_color": *"#009688"|"theme_color":"#faf8f5"|; s|"background_color": *"#000000"|"background_color":"#faf8f5"|' /app/code/librechat/client/dist/manifest.webmanifest && \ +# PWA chrome colors: background_color set to CREAM #faf8f5 (Chrome's splash +# screen). theme_color is REMOVED by patch_index.py, which runs above: Firefox +# for Android ignores and derives its PWA toolbar/status +# bar from the manifest theme_color plus a WHITE/BLACK navigation bar from +# background_color — a static cream value cannot follow the app's dark theme and +# leaves light bands around the dark app. With theme_color absent Firefox uses +# its own light/dark chrome. The index.html meta pair (applied below) still +# drives Chromium, and custom2.js re-syncs that meta to the resolved theme. +# Keep custom.css's html:not(.dark) background and custom2.js COOP_BG.light in +# step with this value. +RUN sed -i 's|"background_color": *"#000000"|"background_color":"#faf8f5"|' /app/code/librechat/client/dist/manifest.webmanifest && \ sed -i 's||\n |' /app/code/librechat/client/dist/index.html # Log ownership guard: a host-side daily job creates the next day's dated log diff --git a/__pycache__/patch_index.cpython-313.pyc b/__pycache__/patch_index.cpython-313.pyc deleted file mode 100644 index dfc3dd300a732ca694c47ffe058c278db2a76ee9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3671 zcmbVP&2!tv6<-h_36dr$QBowkj=iSU$h1Y$`ttZgRK{^^$93&Af*l{ssRja<6eJQr z7N97h&J2BOk{+U@%~Xf}0ZwKz&C$JinwiE&a_Ej}^pZ(WzDc7VI_;%z!4J`LoYcV# zh_~!}0Xm_mPIn$=8H|w46?-8^~$tU?|Jgo)wN@CV~jzdTuK?UzQf{nGw1(2))R^)r_`2-K^L%ErLvr&Mh~I+Tq`hqJM1LBa>nvOov3gK;Ds z=|q;|(otzt`guxl`LA{PV?V$@*40mR^^b%8i4^a88SiqFJ=|26n{IK_KFIH+n_sIY zKUC-F{PFLtX1_EcO`h>|d}EY-1@fEPv!32v7d%H$*5^ku>?Y9mgErTZ5-yK2{9%;m z{vVyhO!-S_(<|CCQ7o+JN!`GURMv8;R=_8)j15AQi)FQ#!zG!n5QCVfJ7`at&~kmFQpXIw8gG4)1iVGuGylhtw6bonYd}K7YXD{tTkMLS3_Dc{QsrXORG@b<6XR@?5h^Q|x=NB2HCG^3hQfBT zi3xq}da^J71fy}hs*;MKQ!ANQt&F0>&avO=sZmMR)I2e}Zzq-Ra8ebr*r6dEs+*=x z)q<*J;$@R06-siDA0z?wv8P_%<($J+?CBqC=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+|=mqhz5B+UAdYR|H@kK8W@&5zHOY<@S diff --git a/patch_index.py b/patch_index.py index 18292ae..71522ca 100644 --- a/patch_index.py +++ b/patch_index.py @@ -66,7 +66,20 @@ try: mf = _json.load(open(MPATH, encoding="utf-8")) mf["name"] = "Inference Co\u2011op" mf["short_name"] = "Inference" - mf["description"] = "Member-governed AI inference — private and renewable model choices." + mf["description"] = "Member-governed AI inference \u2014 private and renewable model choices." + # NO theme_color. Firefox for Android never implemented + # (the custom2.js sync therefore only reaches Chromium), and its PWA window + # takes the chrome colours from the manifest alone: + # android-components feature/pwa/ext/WebAppManifest.kt: toCustomTabConfig() + # sets toolbarColor = themeColor and navigationBarColor = WHITE/BLACK + # derived from background_color, but only when BOTH are present. + # A cream theme_color therefore paints a cream status/toolbar band and a + # pure-white navigation bar around the dark app, with no runtime override + # possible. With theme_color absent the config is null and Firefox uses its + # own light/dark toolbar surface, which follows the phone theme. + # Chromium still gets the per-scheme meta tags from the Dockerfile. + # background_color stays cream: Chrome's splash screen uses it. + mf.pop("theme_color", None) # Deterministic icon list: explicit any/maskable entries (no dual-purpose # values — some Firefox Android versions mishandle "any maskable"), and # the launcher-suitable sizes first. Each src carries a per-build version