From 55b5b7fd9d20f7959b38f12ffedcbee083ab8292 Mon Sep 17 00:00:00 2001 From: devmrko Date: Wed, 22 Jul 2026 16:26:44 +0900 Subject: [PATCH] refs #703: fix MCP detail contrast --- .../ai_web_agent_console/presentation.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ai-web-agent-console/ai_web_agent_console/presentation.py b/ai-web-agent-console/ai_web_agent_console/presentation.py index 56fac2e..626ca6c 100644 --- a/ai-web-agent-console/ai_web_agent_console/presentation.py +++ b/ai-web-agent-console/ai_web_agent_console/presentation.py @@ -35,6 +35,17 @@ def apply_console_theme(st: Any, profile: AppProfile) -> None: input, textarea, [data-baseweb="select"] > div, [data-testid="stSidebar"] button {{ background:#fff !important; border:1px solid var(--console-border) !important; border-radius:4px !important; box-shadow:none !important; }} + /* Streamlit JSON uses an independently styled code surface. Keep the + MCP detail payload readable even when the browser/system prefers a + dark code theme. */ + [data-testid="stJson"], [data-testid="stJson"] > div, + [data-testid="stJson"] .react-json-view, [data-testid="stJson"] pre {{ + background:#f8fafc !important; color:var(--console-text) !important; + border-color:var(--console-border) !important; color-scheme:light !important; }} + [data-testid="stJson"] *, [data-testid="stJson"] pre *, + [data-testid="stJson"] code {{ + background:transparent !important; color:var(--console-text) !important; + -webkit-text-fill-color:var(--console-text) !important; }} div[data-testid="stButton"] > button, div[data-testid="stFormSubmitButton"] > button {{ background:#fff !important; color:var(--console-text) !important; border:1px solid var(--console-border) !important;