From f40dae7a67745233a4e543663cc112b510234456 Mon Sep 17 00:00:00 2001 From: Edwin Date: Wed, 19 Aug 2026 19:23:48 -0700 Subject: [PATCH] fix(webui): align Playbook editor font scale --- crates/daemon/assets/index.html | 2 +- crates/e2e/tests/playbook_view.rs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/crates/daemon/assets/index.html b/crates/daemon/assets/index.html index 114ea956..15765007 100644 --- a/crates/daemon/assets/index.html +++ b/crates/daemon/assets/index.html @@ -3194,7 +3194,7 @@ border: 0; padding: 12px 14px; font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; - font-size: 14px; + font-size: 13px; line-height: 1.6; tab-size: 2; white-space: pre-wrap; diff --git a/crates/e2e/tests/playbook_view.rs b/crates/e2e/tests/playbook_view.rs index 2f96648f..8913e2e8 100644 --- a/crates/e2e/tests/playbook_view.rs +++ b/crates/e2e/tests/playbook_view.rs @@ -95,6 +95,8 @@ async fn web_playbook_view_full_parity() { }, async () => { setSession("s-prog", "shell"); await switchCurrentViewMode("playbook"); + const editorStyle = getComputedStyle(playbookInputEl); + const barStyle = getComputedStyle(playbookWrapEl.querySelector(".playbook-bar")); return { wrapVisible: !playbookWrapEl.hidden, transcriptHidden: transcriptEl.hidden, @@ -103,6 +105,9 @@ async fn web_playbook_view_full_parity() { playbookPressed: viewModePlaybookBtn.getAttribute("aria-pressed"), mode: state.mode, mounted: state.playbook.mountedId, + editorFontSize: editorStyle.fontSize, + surroundingFontSize: barStyle.fontSize, + editorFontFamily: editorStyle.fontFamily, }; }) "###, @@ -118,6 +123,16 @@ async fn web_playbook_view_full_parity() { assert_eq!(enter["playbookPressed"], "true", "{enter:?}"); assert_eq!(enter["mode"], "playbook", "{enter:?}"); assert_eq!(enter["mounted"], "s-prog", "{enter:?}"); + assert_eq!( + enter["editorFontSize"], enter["surroundingFontSize"], + "Playbook body text should match the surrounding WebUI scale: {enter:?}" + ); + assert!( + enter["editorFontFamily"] + .as_str() + .is_some_and(|family| family.contains("monospace")), + "Playbook body text should retain a monospace editor stack: {enter:?}" + ); // --- 2a. Inline code paints without delimiters; Backspace at its right // edge reveals the opening delimiter and editable text. ---------