The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): text inside a clickable row of a native assistant message stays part of the control
emozilla98e329298074
diff --git a/apps/desktop/src/styles.css b/apps/desktop/src/styles.cssindex 9456303a121..7c4ad2966bd 100644--- a/apps/desktop/src/styles.css+++ b/apps/desktop/src/styles.css@@ -1468,9 +1468,6 @@ textarea,[contenteditable]:not([contenteditable='false']),[data-slot='aui_user-message-root'],[data-slot='aui_assistant-message-content'],-[data-slot='aui_assistant-message-content'] p,-[data-slot='aui_assistant-message-content'] pre,-[data-slot='aui_assistant-message-content'] code,[data-slot='aui_system-message-root'],[data-selectable-text='true'],[data-selectable-text='true'] * {@@ -1478,6 +1475,14 @@ textarea,user-select: text;}+/* The browser host makes paragraphs and code in an assistant message+ selectable even inside a clickable row, so a touch long-press selects them.+ Native Desktop keeps text inside a clickable row part of the control. */+html[data-hermes-desktop-host='browser'] [data-slot='aui_assistant-message-content'] :is(p, pre, code) {+ -webkit-user-select: text;+ user-select: text;+}+button,[role='button'] {-webkit-user-select: none;diff --git a/apps/desktop/src/touch-styles.test.ts b/apps/desktop/src/touch-styles.test.tsindex 0a12aa823c2..f1c62a335e9 100644--- a/apps/desktop/src/touch-styles.test.ts+++ b/apps/desktop/src/touch-styles.test.ts@@ -81,4 +81,18 @@ describe('touch styles', () => {expect(selector.startsWith(BROWSER_HOST), selector).toBe(true)}})++ // Text inside a clickable row of an assistant message (a button around a code+ // span) is part of the control in native Desktop, as on main: the rule that+ // makes paragraphs and code selectable even there is the browser host's.+ it('makes paragraphs and code inside clickable assistant rows selectable only in the browser-hosted Desktop', () => {+ const messageText = /\[data-slot='aui_assistant-message-content'\]\s+(?::is\([^)]*\b(?:p|pre|code)\b[^)]*\)|(?:p|pre|code)\b)/+ const selectors = ruleSelectors(STYLES).filter(selector => messageText.test(selector))++ expect(selectors.length).toBeGreaterThan(0)++ for (const selector of selectors) {+ expect(selector.startsWith(BROWSER_HOST), selector).toBe(true)+ }+ })})