mirror of
https://github.com/block/buzz.git
synced 2026-11-11 20:01:09 +00:00
Add mobile Huddles voice MVP (#6056)
## Summary - add foreground mobile Huddles on Android and iOS with native Opus capture/playback, mute, speaker routing, participants, lifecycle, and minimized drawer UI - keep mobile Huddle cards and roster state live, including ended rooms, relay-resolved profiles, and agents - broadcast desktop agent TTS through the existing Huddle audio protocol ## Scope Foreground human-to-human voice MVP only. Agent setup/transcripts, background calling, recording, and advanced device controls remain out of scope. ## Validation - `just mobile-check` - `just mobile-test` — 1,500 passed - `just desktop-check` and `just desktop-test` — 4,957 passed - desktop typecheck, strict Clippy, and Tauri tests — 2,445 passed, 15 ignored - mobile worktree identity contract checks - physical Pixel/iPhone behavior reviewed during development --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: Kenny Lopez <klopez4212@gmail.com> Signed-off-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz> Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: Carl <3c4caeafb646d23867f1c4832e68211d77e2561946171625f75c3ce1a3f2670f@buzz.block.builderlab.xyz> Co-authored-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz> Co-authored-by: leader <71e9f2c44a6932b6772caaaccda1911d010463c3e2c6c40410b8329956046801@buzz.block.builderlab.xyz> Co-authored-by: Tom Brow <tomb@block.xyz> Co-authored-by: Mongo <9cfd347903944d5b85aa6c93d2ab67381b978a92a31914bca69998968752a1d7@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -14,6 +14,11 @@
|
||||
# mobile/android/worktree.properties (debug build type only)
|
||||
# In the main checkout it removes any stale override files. Release and
|
||||
# profile builds never read these overrides.
|
||||
#
|
||||
# Android-only test builds can opt into a more explicit side-by-side identity:
|
||||
# BUZZ_ANDROID_DEBUG_APP_NAME="Buzz Huddles"
|
||||
# BUZZ_ANDROID_DEBUG_ID_SUFFIX=".huddles_829c"
|
||||
# Both values are validated before the generated properties file is written.
|
||||
set -euo pipefail
|
||||
|
||||
# `just mobile-*` recipes unset these before invoking Flutter; do the same so
|
||||
@@ -71,7 +76,18 @@ case "$android_slug" in
|
||||
esac
|
||||
|
||||
ios_bundle_id="com.buzz.buzzMobile.${ios_slug}"
|
||||
android_suffix=".${android_slug}"
|
||||
android_app_name="${BUZZ_ANDROID_DEBUG_APP_NAME:-Buzz (${label})}"
|
||||
android_suffix="${BUZZ_ANDROID_DEBUG_ID_SUFFIX:-.${android_slug}}"
|
||||
|
||||
if [[ "$android_app_name" == *$'\n'* || "$android_app_name" == *$'\r'* ]] || \
|
||||
! printf '%s\n' "$android_app_name" | LC_ALL=C grep -Eq '^[A-Za-z0-9._() -]+$'; then
|
||||
echo "BUZZ_ANDROID_DEBUG_APP_NAME must contain only letters, numbers, spaces, ., _, -, or parentheses" >&2
|
||||
exit 2
|
||||
fi
|
||||
if [[ ! "$android_suffix" =~ ^\.[a-z][a-z0-9_]*$ ]]; then
|
||||
echo "BUZZ_ANDROID_DEBUG_ID_SUFFIX must match \\.[a-z][a-z0-9_]* (for example .huddles_829c)" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
cat > "$ios_overrides" <<XCCONFIG
|
||||
// Generated by scripts/mobile-worktree-overrides.sh — gitignored, do not edit.
|
||||
@@ -85,9 +101,10 @@ cat > "$android_props" <<PROPERTIES
|
||||
# Generated by scripts/mobile-worktree-overrides.sh — gitignored, do not edit.
|
||||
# Applies to the debug build type only (read by android/app/build.gradle.kts).
|
||||
label=${label}
|
||||
appName=${android_app_name}
|
||||
applicationIdSuffix=${android_suffix}
|
||||
PROPERTIES
|
||||
|
||||
# The printed identifiers are the generated defaults; on iOS a developer's
|
||||
# AppOverrides.xcconfig may override them per variable.
|
||||
echo "📱 Worktree ${worktree_name}: label \"${label}\" (iOS default ${ios_bundle_id}, Android suffix ${android_suffix})"
|
||||
echo "📱 Worktree ${worktree_name}: iOS label \"${label}\" (${ios_bundle_id}); Android label \"${android_app_name}\" (xyz.block.buzz.mobile${android_suffix})"
|
||||
|
||||
@@ -73,6 +73,9 @@ grep -q '^APP_DISPLAY_NAME = Buzz (Fix_Thing-2)$' "$ios" \
|
||||
grep -q '^label=Fix_Thing-2$' "$android" \
|
||||
&& pass "Android label carries the branch label" \
|
||||
|| fail "Android label wrong: $(cat "$android")"
|
||||
grep -q '^appName=Buzz (Fix_Thing-2)$' "$android" \
|
||||
&& pass "Android app name defaults to the branch-labelled name" \
|
||||
|| fail "Android app name wrong: $(cat "$android")"
|
||||
grep -q '^applicationIdSuffix=\.feature_work_1$' "$android" \
|
||||
&& pass "Android applicationIdSuffix keys to the worktree directory name" \
|
||||
|| fail "Android applicationIdSuffix wrong: $(cat "$android")"
|
||||
@@ -120,6 +123,32 @@ grep -q '^applicationIdSuffix=\.w_2fast$' "$wt2/mobile/android/worktree.properti
|
||||
&& pass "digit-leading worktree dir yields a valid Android package segment" \
|
||||
|| fail "digit-leading dir segment wrong: $(cat "$wt2/mobile/android/worktree.properties")"
|
||||
|
||||
# ── Explicit Android debug identity: readable and isolated ───────────────────
|
||||
BUZZ_ANDROID_DEBUG_APP_NAME="Buzz Huddles" \
|
||||
BUZZ_ANDROID_DEBUG_ID_SUFFIX=".huddles_829c" \
|
||||
"$wt/scripts/mobile-worktree-overrides.sh" > /dev/null
|
||||
grep -q '^appName=Buzz Huddles$' "$android" \
|
||||
&& pass "explicit Android debug app name is persisted" \
|
||||
|| fail "explicit Android debug app name wrong: $(cat "$android")"
|
||||
grep -q '^applicationIdSuffix=\.huddles_829c$' "$android" \
|
||||
&& pass "explicit Android debug suffix is persisted" \
|
||||
|| fail "explicit Android debug suffix wrong: $(cat "$android")"
|
||||
grep -q '^APP_DISPLAY_NAME = Buzz (' "$ios" \
|
||||
&& ! grep -q 'Buzz Huddles' "$ios" \
|
||||
&& pass "Android debug overrides do not change the iOS identity" \
|
||||
|| fail "Android debug overrides must not change iOS identity: $(cat "$ios")"
|
||||
|
||||
if BUZZ_ANDROID_DEBUG_ID_SUFFIX=".Huddles" "$wt/scripts/mobile-worktree-overrides.sh" >/dev/null 2>&1; then
|
||||
fail "invalid explicit Android debug suffix must be rejected"
|
||||
else
|
||||
pass "invalid explicit Android debug suffix is rejected"
|
||||
fi
|
||||
if BUZZ_ANDROID_DEBUG_APP_NAME=$'Buzz Huddles\nInjected' "$wt/scripts/mobile-worktree-overrides.sh" >/dev/null 2>&1; then
|
||||
fail "unsafe explicit Android debug app name must be rejected"
|
||||
else
|
||||
pass "unsafe explicit Android debug app name is rejected"
|
||||
fi
|
||||
|
||||
# ── Tracked build files: overrides are debug-only, release stays production ──
|
||||
debug_xcconfig="$repo_root/mobile/ios/Flutter/Debug.xcconfig"
|
||||
release_xcconfig="$repo_root/mobile/ios/Flutter/Release.xcconfig"
|
||||
@@ -158,6 +187,9 @@ grep -q 'resValue("string", "app_name", "Buzz")' "$gradle" \
|
||||
grep -q 'worktreeLabel.matches' "$gradle" \
|
||||
&& pass "Gradle validates the worktree label before use" \
|
||||
|| fail "Gradle must validate the worktree label against a safe pattern"
|
||||
grep -q 'worktreeAppName.matches' "$gradle" \
|
||||
&& pass "Gradle validates the explicit Android app name before use" \
|
||||
|| fail "Gradle must validate the explicit Android app name against a safe pattern"
|
||||
grep -q 'AppOverrides.properties' "$gradle" \
|
||||
&& grep -q 'debugAppName' "$gradle" \
|
||||
&& grep -q 'debugIdSuffix' "$gradle" \
|
||||
|
||||
Reference in New Issue
Block a user