fix(composer): keep message input visible after dictation (#2194)
The voice overlay transition could retain stale native opacity after the app was backgrounded, leaving the mounted composer transparent. Derive both surfaces directly from voice state so they cannot disagree after resume.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
computeCanStartDictation,
|
||||
resolveComposerSurfacePresentation,
|
||||
runAlternateSendAction,
|
||||
runDefaultSendAction,
|
||||
stopRealtimeVoice,
|
||||
@@ -9,6 +10,22 @@ import {
|
||||
const connected = { isConnected: true } as never;
|
||||
const disconnected = { isConnected: false } as never;
|
||||
|
||||
describe("composer surface presentation", () => {
|
||||
it("shows only the input when no voice overlay is active", () => {
|
||||
expect(resolveComposerSurfacePresentation(false)).toEqual({
|
||||
input: { opacity: 1, pointerEvents: "auto" },
|
||||
overlay: { opacity: 0, pointerEvents: "none" },
|
||||
});
|
||||
});
|
||||
|
||||
it("shows only the voice overlay while voice UI is active", () => {
|
||||
expect(resolveComposerSurfacePresentation(true)).toEqual({
|
||||
input: { opacity: 0, pointerEvents: "none" },
|
||||
overlay: { opacity: 1, pointerEvents: "auto" },
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("computeCanStartDictation", () => {
|
||||
it("returns false when socket is disconnected", () => {
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user