From bef8fbd3b67259a733dfa67e407f389612b671ff Mon Sep 17 00:00:00 2001 From: Isla-Liu Date: Wed, 8 Jul 2026 11:34:50 +0800 Subject: [PATCH] fix: align wakeup notice with message rail --- static/style.css | 3 ++- tests/test_process_wakeup_rendering.py | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/static/style.css b/static/style.css index 63cb9f2f1..160317113 100644 --- a/static/style.css +++ b/static/style.css @@ -2319,12 +2319,13 @@ .provider-error-details>summary{cursor:pointer;color:var(--muted);font-size:12px;font-weight:600;padding:8px 12px;} .provider-error-details>pre{margin:0;border:0;border-top:1px solid var(--border);border-radius:0;max-height:220px;} .process-wakeup-row{padding:6px 0;} - .process-wakeup-notice{margin-left:30px;max-width:680px;padding:8px 10px;border:1px solid var(--border);border-left:2px solid var(--accent-bg-strong);border-radius:9px;background:var(--surface-subtle,var(--hover-bg));color:var(--muted);} + .process-wakeup-notice{margin:8px 0 8px var(--msg-rail);max-width:min(var(--msg-max),760px);padding:8px 10px;border:1px solid var(--border);border-left:2px solid var(--accent-bg-strong);border-radius:9px;background:var(--surface-subtle,var(--hover-bg));color:var(--muted);} .process-wakeup-label{display:flex;align-items:center;gap:6px;margin-bottom:5px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent-text);} .process-wakeup-label svg{width:13px;height:13px;flex:0 0 auto;} .process-wakeup-row .msg-body.process-wakeup-body{padding-left:0;max-width:none;color:var(--muted);} .process-wakeup-row .msg-body pre.process-wakeup-text{margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--muted);font-family:var(--font-mono);font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;} .process-wakeup-row .msg-foot{padding-left:0;margin-top:5px;} + @media(max-width:700px){.process-wakeup-notice{margin-left:0;}} /* Keep original theme background — prevent prism-tomorrow from overriding --code-bg */ .msg-body pre[class*="language-"],.msg-body pre code[class*="language-"]{background:var(--code-bg) !important;} /* Fix #1463: Prism YAML grammar collapses newlines inside token spans — force pre */ diff --git a/tests/test_process_wakeup_rendering.py b/tests/test_process_wakeup_rendering.py index 403c4b760..051a3845b 100644 --- a/tests/test_process_wakeup_rendering.py +++ b/tests/test_process_wakeup_rendering.py @@ -199,3 +199,11 @@ def test_process_wakeup_uses_compact_status_row_not_normal_user_bubble(): assert ".process-wakeup-row" in STYLE_CSS assert ".process-wakeup-notice" in STYLE_CSS assert ".process-wakeup-text" in STYLE_CSS + notice_rule = STYLE_CSS[ + STYLE_CSS.index(".process-wakeup-notice{") : STYLE_CSS.index(".process-wakeup-label{") + ] + assert "margin:8px 0 8px var(--msg-rail)" in notice_rule + assert "max-width:min(var(--msg-max),760px)" in notice_rule + assert "margin-left:30px" not in notice_rule + assert "max-width:680px" not in notice_rule + assert "@media(max-width:700px){.process-wakeup-notice{margin-left:0;}}" in STYLE_CSS