From ecc72e00f074cc3b8512565eaba093ab6395878a Mon Sep 17 00:00:00 2001 From: heznpc Date: Wed, 10 Jun 2026 16:32:24 +0900 Subject: [PATCH] fix(tutor): select-and-ask quote bar queried the light DOM for the shadow-rooted input wrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stage-2b sweep-up in #205 fixed text-selection.js's chat-input lookup but missed the .si18n-chat-input-wrap lookup 17 lines above — document.querySelector returns null now that the sidebar lives in the shadow root, so the quoted-text bar silently never rendered. Found by the post-batch max-effort review; now uses sb.$() like its sibling. Gates: 527 unit, full E2E 20/20, lint, prettier green. --- src/content/text-selection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/text-selection.js b/src/content/text-selection.js index 0dd1dd8..f3d137e 100644 --- a/src/content/text-selection.js +++ b/src/content/text-selection.js @@ -89,7 +89,7 @@ } function insertQuoteInChat(quoteText) { - const inputWrap = document.querySelector('.si18n-chat-input-wrap'); + const inputWrap = sb.$('.si18n-chat-input-wrap'); if (!inputWrap) return; inputWrap.parentNode.querySelector('.si18n-chat-quote')?.remove();