Skip to content

Model Availability UX Overhaul — StateBadge, ModelCard, unified download UI#1067

Draft
lokhor wants to merge 18 commits into
mainfrom
feature/model-availability-ux
Draft

Model Availability UX Overhaul — StateBadge, ModelCard, unified download UI#1067
lokhor wants to merge 18 commits into
mainfrom
feature/model-availability-ux

Conversation

@lokhor
Copy link
Copy Markdown
Collaborator

@lokhor lokhor commented Jun 2, 2026

Closes #1043, #1029, #1030, #1035, #1038, #1041

What

New :core:model-availability module providing a canonical 4-state model availability system (Ready / Preparing / ActionRequired / Unavailable) with StateBadge + ModelCard/ModelCardCompact composables, integrated across Settings, Chat, and Voice screens.

Changes (17 commits)

Core module

  • :core:model-availabilityModelAvailabilityState sealed class, DownloadStateMapper with truth-table tests, GatedModelStatus DataStore repository (scaffold), AvailabilitySummary, ModelAvailabilityStrings
  • :core:inferenceKernelModel.isDeprecated field, DownloadSource enum, cancelDownload isRequired guard, SentencePiece co-queue in init
  • :core:ui — extracted CollapsibleSectionHeader from MemoryScreen

Composable library

  • StateBadge — small pill showing availability state with color
  • ModelCard — full card with action button, lock icon, progress bar
  • ModelCardCompact — slim inline variant for onboarding/voice

Screen integration

  • ModelManagementScreen — HuggingFace row removed; uses ModelCard with state badges
  • ModelSettingsScreen — renamed private ModelCardModelSettingsCard; added StateBadge in card headers
  • SettingsScreen — HuggingFace row removed; model availability summary row added
  • ChatScreen — onboarding ModelProgressRowModelCardCompact
  • VoiceScreen — inline download composables (~400 lines) replaced with ModelCardCompact + Manage links

Docs

  • docs/agents/model-availability-ux-patterns.md
  • Subagent recovery pattern codified in .omp/AGENTS.md

Pre-merge gates

  • Device smoke test via ADB (no merge until verified)
  • Owner approval

Test results

  • :core:model-availability:test — pass
  • :core:inference:test — pass
  • :feature:settings:compileDebugKotlin — pass
  • :feature:chat:compileDebugKotlin — pass
  • :feature:chat:test — 1 pre-existing LatexConversionTest failure (unrelated)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Debug APK ready

Download app-debug.apk

Commit: 462695d - Build #2068

Updated on each push. Removed when PR is merged or closed.

- Replace 3-frame debounce open with fast-open/slow-close semantics:
  a single above-threshold frame immediately resets silence counter
  (opens gate in 80ms instead of 240ms)
- Keep 3-frame debounce for closing: only after 3 consecutive silent
  frames does the silence timer begin accumulating
- Lower silenceRmsThreshold 600→300 to catch quieter speech
- Reduce maxSilenceSkipSeconds 3.0→1.0 for more frequent periodic
  checks during gating
- Update alive logging, WakeWordSilenceGateTest

Oracle review confirmed: VAD gate was the root cause of inconsistent
wake word detection — the model confidence is binary (~0.0009 or ~0.9)
and failures occur when the gate starves the classifier of onset context.
@lokhor lokhor marked this pull request as ready for review June 2, 2026 10:23
@lokhor lokhor marked this pull request as draft June 2, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Epic: Model Availability UX overhaul

1 participant