Repository navigation
feat(ios): unify voice states in Dynamic Island and Live Activity - #608
Open
JosssphZhou wants to merge 1 commit into
Open
JosssphZhou wants to merge 1 commit into
JosssphZhou wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Target release: 0.4.8 (not intended for 0.4.7).
Unifies voice session status presentation across the Dynamic Island (compact, minimal, narrow, and expanded) and Lock Screen Live Activity using right-side visual differentiation with aligned bear poses and standard status words:
PokiActivityAttributes.ContentState.Voicefrom 3 states to 8 states (connecting,listening,hearing,thinking,working,speaking,failed,ended), plus optionalvoiceLevel(3 waveform amplitude tiers) andvoiceStep(e.g.3/4) fields.ActivityBear-listening.pngandActivityBear-speaking.pngassets (408×408, head-aligned toready) for compact, minimal, and expanded views.voiceFace(_:)presentation table (ActivityFace.swift):needsbear + 5 quiet grey dots (ellipsisminimal badge) + expandedConnecting/正在连接+Endbutton.readybear + low sky-blue 5-bar waveform (mic.fillminimal badge) + expandedListening/正在聆听+Endbutton.listeningbear + sky-blue 5-bar waveform scaled across 3 loudness tiers sampled from WebRTC microphone stats (mic.fillminimal badge) + expandedListening/正在聆听+Endbutton.thinkingbear + 3 white dots (ellipsisminimal badge) + expandedThinking/正在思考+Endbutton.phonebear + sky-blue step progress (e.g.3/4,iphoneminimal badge) + expandedWorking/正在操作+Endbutton.speakingbear + Poki brand-blue left-high 5-bar waveform (speaker.wave.2.fillminimal badge) + expandedResponding/正在回复+Endbutton.trippedbear + sky-bluekeyboardicon (no text in compact/minimal) + expanded sky-blueConnection failed/连接失败+Typebutton linking topoki://chat?type=1(dismisses voice error and focuses the message input), held for 3 seconds before dismissing.donebear + light grey checkmark (no text in compact/minimal) + expandedEnded/已结束(no action button), held for 3 seconds before dismissing.ActivityMotion.voice) respecting reduced motion and reduced luminance (Always-On Display).ActivityController.isCriticalso voice state changes dispatch immediately without coalescing delay, and adds simulator voice sequence demo support inActivityPreview.swift(#if DEBUG && targetEnvironment(simulator)).Motivation
During live voice calls in the background, the Dynamic Island previously only exposed three coarse states (
listening,thinking,speaking) with a static waveform icon, making it hard to distinguish connecting, waiting for speech, active user speech, thinking, phone tool operation, Poki responding, connection failure, and call completion at a glance. This 0.4.8 change implements the finalized right-side differentiation design across all Live Activity presentations.Test plan
Built and tested on a disposable iPhone 17 Simulator (iOS 27.2, 402×874 pt) using
xcodebuild build-for-testingand XCTest bundle injection:ActivityBearAssetsTests: 1 test executed, 0 failures (verifies 136 pt, 27 pt compact, and 22 pt minimal assets for all 11 bear poses including.listeningand.speaking).LiveActivityTests: 18 tests executed, 0 failures (verifies all 8 voice states in English and Simplified Chinese, loudness tiers, merged working-during-voice presentation, and zero clipping inside the 12.33 pt bottom Dynamic Island clip zone).VoiceModelTests: 46 tests executed, 1 skipped (pre-existing recorded-events test), 0 failures (verifies voice phase mapping,EndTalkIntentending and 3 s hold dismissal, connection loss failed hold and dismissal, microphone loudness polling, and active turn step counts).Screenshots or screen recording
Verified visually on the real system Dynamic Island (SpringBoard compact, long-press expanded, minimal preview, and Lock Screen card) across all 8 voice states in Simplified Chinese, plus continuous simulator screen recordings of both the full call lifecycle (connecting → listening → hearing with loudness tiers → thinking → working
1/4–3/4→ responding → interruption → ended → collapse) and the connection-failed lifecycle (connecting → failed keyboard icon → collapse after 3 s), compared side-by-side against the approved design specification and motion prototype.AI assistance: Other (Gemini). I have reviewed and understand these changes.