From 23d7f44a96ba5697188cef0ff0dee64941a7568e Mon Sep 17 00:00:00 2001 From: "kaku.ki" Date: Tue, 5 May 2026 02:03:20 +0900 Subject: [PATCH] fix(windows): stabilize capsule visuals and audio meter --- openless-all/app/src/components/Capsule.tsx | 32 +++++++++++-------- .../app/src/lib/capsuleLayout.test.ts | 2 +- openless-all/app/src/lib/capsuleLayout.ts | 2 +- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/openless-all/app/src/components/Capsule.tsx b/openless-all/app/src/components/Capsule.tsx index 618e4681..9e6328f9 100644 --- a/openless-all/app/src/components/Capsule.tsx +++ b/openless-all/app/src/components/Capsule.tsx @@ -15,9 +15,14 @@ interface AudioBarsProps { function AudioBars({ level }: AudioBarsProps) { const envelope = [0.55, 0.85, 1.0, 0.85, 0.55]; - const base = 4; - const max = 18; + const base = 2; + const max = 24; const voice = Math.min(1, Math.max(0, level)); + const silenceGate = 0.012; + const responseCeiling = 0.34; + const gatedVoice = Math.min(1, Math.max(0, (voice - silenceGate) / (responseCeiling - silenceGate))); + const easedVoice = gatedVoice * gatedVoice * (3 - 2 * gatedVoice); + const visualVoice = Math.pow(easedVoice, 0.42); return (
@@ -108,6 +114,8 @@ interface CircleButtonProps { function CircleButton({ variant, enabled, onClick }: CircleButtonProps) { const { t } = useTranslation(); const isCancel = variant === 'cancel'; + const os = detectOS(); + const useBackdrop = os !== 'win' && isCancel; return (