Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(mobile): 语音态占位文案改用普通态 placeholder 同色 (#1199)
Dash8fa43feef563
diff --git a/apps/mobile/app/sessions/[sessionId].tsx b/apps/mobile/app/sessions/[sessionId].tsxindex fb5b9d2250..221618800b 100644--- a/apps/mobile/app/sessions/[sessionId].tsx+++ b/apps/mobile/app/sessions/[sessionId].tsx@@ -9154,8 +9154,10 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({flexDirection: 'row',minHeight: COMPOSER_INPUT_LINE_HEIGHT,},+ // 语音态占位文案渲染的就是普通态 TextInput 的 placeholder,颜色必须同源+ // (placeholderTextColor 也是 textTertiary),否则一进语音态这行字会变色。voiceDraftListeningText: {- color: colors.statusReady,+ color: colors.textTertiary,...MOBILE_COMPOSER_DRAFT_TEXT_STYLE,},palettePanel: {diff --git a/apps/mobile/app/sessions/new.tsx b/apps/mobile/app/sessions/new.tsxindex cf59c2e4a0..9e087bea21 100644--- a/apps/mobile/app/sessions/new.tsx+++ b/apps/mobile/app/sessions/new.tsx@@ -3635,8 +3635,10 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({flexDirection: 'row',minHeight: MOBILE_COMPOSER_INPUT_LINE_HEIGHT,},+ // 语音态占位文案渲染的就是普通态 TextInput 的 placeholder,颜色必须同源+ // (placeholderTextColor 也是 textTertiary),否则一进语音态这行字会变色。voiceDraftListeningText: {- color: colors.statusReady,+ color: colors.textTertiary,...MOBILE_COMPOSER_DRAFT_TEXT_STYLE,},composerToolbarWrap: {diff --git a/apps/mobile/src/__tests__/newSession.test.ts b/apps/mobile/src/__tests__/newSession.test.tsindex 2bb7025028..ab303fdf24 100644--- a/apps/mobile/src/__tests__/newSession.test.ts+++ b/apps/mobile/src/__tests__/newSession.test.ts@@ -936,6 +936,11 @@ describe('new session composer surface', () => {expect(newSource).toContain('<Text style={styles.voiceDraftListeningText}>{composerListeningPlaceholder}</Text>');// 听写 mic 波形 caret 用正文色(对齐桌面 --chat-input-text,2026-07-28 用户定案),不用 statusReady 蓝绿。expect(newSource).toContain('<VoiceMicWaveCaret color={colors.textPrimary} testID="newSession.voiceMicCaret" />');+ // 语音态占位文案就是普通态 TextInput 的 placeholder,必须与 placeholderTextColor 同源,+ // 否则一进语音态这行字会变色(2026-07-31 用户定案:不再用 statusReady 蓝绿)。+ expect(newSource).toContain('placeholderTextColor={colors.textTertiary}');+ expect(newSource).toContain('voiceDraftListeningText: {\n color: colors.textTertiary,');+ expect(newSource).not.toContain('voiceDraftListeningText: {\n color: colors.statusReady,');expect(newSource).toContain('const voiceDraftShowsListeningPrompt = voiceIsListening && draft.firstMessage.length === 0;');expect(newSource).toContain('firstMessageInputRef.current?.setNativeProps({ selection: { start: end, end } });');expect(newSource).toContain('voiceDraftScrollRef.current?.scrollToEnd({ animated: false });');diff --git a/apps/mobile/src/__tests__/sessionComposerDesktopFirst.test.ts b/apps/mobile/src/__tests__/sessionComposerDesktopFirst.test.tsindex 497e04396b..f618b0f83c 100644--- a/apps/mobile/src/__tests__/sessionComposerDesktopFirst.test.ts+++ b/apps/mobile/src/__tests__/sessionComposerDesktopFirst.test.ts@@ -414,6 +414,11 @@ describe('mobile session composer desktop-first surface', () => {expect(source).toContain('top: voiceDraftCaretFrame.top');expect(source).not.toContain('voiceMicCaretInline');expect(source).not.toContain('<VoiceMicWaveCaret color={colors.statusReady} inline />');+ // 语音态占位文案就是普通态 TextInput 的 placeholder,必须与 placeholderTextColor 同源,+ // 否则一进语音态这行字会变色(2026-07-31 用户定案:不再用 statusReady 蓝绿)。+ expect(source).toContain('placeholderTextColor={colors.textTertiary}');+ expect(source).toContain('voiceDraftListeningText: {\n color: colors.textTertiary,');+ expect(source).not.toContain('voiceDraftListeningText: {\n color: colors.statusReady,');expect(source).toContain('finishVoiceRecordingRef.current?.();');expect(source).toContain('const voiceStopInFlightRef = useRef(false);');expect(voiceSource).toContain('|| voiceStopInFlightRef.current');