example: download progress on model-install screens + device-local LLM staging for the voice gate - #403
Merged
Merged
Conversation
…al LLM staging for the voice gate Model-install screens showed an indeterminate spinner during download, so a slow (or stalled) install was indistinguishable from a hang — surfaced while testing the voice loop on an iPhone, where the Matcha TTS bundle downloads slowly under iOS background URLSession. Wire the existing install-builder progress callbacks into a determinate indicator across all seven screens that installed without progress: - tts_screen, stt_screen, voice_screen (voice_screen also labels the 3 stages) - translate_screen, chat_screen (feed the existing LoadingWidget.progress) - embedding_test_screen, cosine_similarity_screen (additive progress card) voice_loop_test: install the LLM from a device-local file (no HF token) on Android (Firebase Test Lab --other-files) and iOS (devicectl-pushed), matching the desktop staged-model convention, so the gate runs token-free everywhere.
DenisovAV
force-pushed
the
feat/example-download-progress
branch
from
August 3, 2026 12:14
d86f0cd to
02f7b94
Compare
- chat_screen: render the error instead of a frozen percentage when init fails (the error banner lived in the initialized branch and was unreachable), and clear the percent in the catch. - embedding_test_screen: surface install failures instead of swallowing them, clear the percent, and hide the progress card when an error is set. - cosine_similarity_screen: clear the percent on failure so the progress card no longer contradicts the error card beside it. - loading_widget: drive a determinate indicator from progress, so the screens that route through it get a real ring, not a bare percentage. - stt / embedding / cosine: label the phase, since the model and the tokenizer download sequentially into one counter and the bar otherwise runs 0-100-0 while claiming 'model' throughout. - voice_loop_test: accept HUGGINGFACE_TOKEN as well as HF_TOKEN, and fail loudly when neither a staged model nor a token is available instead of silently taking the gated network path.
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.
What
1. Determinate download progress on every model-install screen.
These screens installed a model with an indeterminate spinner, so a slow (or stalled) download was indistinguishable from a hang. Surfaced while testing the voice loop on a physical iPhone: the Matcha TTS bundle (8 files, ~94 MB) crawls under iOS background URLSession, and with no progress the screen looked frozen. Each screen now wires the existing install-builder progress callbacks into a determinate indicator (falls back to indeterminate during the post-download graph-compile phase):
tts_screen,stt_screen,voice_screen— speech screens (voice_screenalso labels the three sequential stages: speech / voice / language model)translate_screen,chat_screen— feed the existingLoadingWidget(progress:)embedding_test_screen,cosine_similarity_screen— additive progress cardUses the builders' real callbacks:
installModel().withProgress(byte-level),installTts().withProgress(per-file across the bundle),installStt()/installEmbedder().withModelProgress + .withTokenizerProgress.2.
voice_loop_test: token-free device staging.The gate installs the LLM from a device-local file (no HF token) on Android (Firebase Test Lab
--other-files) and iOS (devicectl-pushed), matching the desktop staged-model convention — so it runs token-free on every platform.Notes
flutter analyzeclean (no new issues).