Skip to content

Commit c5caf44

Browse files
authored
Review: UI fixes, search, pet care, chat, settings, and audits (#18)
## Summary Draft PR for branch \cursor-review-implement\ into \main\. ### Included work (existing commits only) - Audits, integration test harness, bootstrap, theme switching, and related project updates. - Attachments flow and chat UX, pet selectors, achievements/badges in settings, search fixes, and other UI/controller changes from the review pass. ### Notes - Opened as **draft** for review; no additional commits were made for this PR. ### How to verify - \ lutter analyze\ - Run on Android emulator and spot-check: Home, Search, Discovery, Pet Care, Chat, Settings, notifications. Made with [Cursor](https://cursor.com)
2 parents a10268d + b4c88ad commit c5caf44

126 files changed

Lines changed: 7445 additions & 2274 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
name: android-adb
3+
description: Android device control via raw ADB commands. Use for device/emulator discovery, USB or Wi-Fi connection, app launch/force-stop, tap/swipe/keyevent/text input, screenshots, UI hierarchy dump, and ADB troubleshooting.
4+
---
5+
6+
# Android ADB
7+
8+
Reference for controlling Android devices with raw `adb` commands.
9+
10+
## Execution Constraints
11+
12+
- Use `adb -s <serial>` whenever more than one device is connected.
13+
- Confirm screen resolution before coordinate actions: `adb -s SERIAL shell wm size`.
14+
- Ask for missing required inputs before executing (serial, package/activity, coordinates, APK path).
15+
- Surface actionable stderr on failure (authorization, cable/network, tcpip state).
16+
- Prefer ADB Keyboard broadcast for CJK and special character input when ADB Keyboard is installed.
17+
18+
## Device And Server
19+
20+
```bash
21+
# Start ADB server
22+
adb start-server
23+
24+
# Stop ADB server
25+
adb kill-server
26+
27+
# List devices
28+
adb devices -l
29+
30+
# Target a specific device (use when multiple devices are online)
31+
adb -s SERIAL <command>
32+
```
33+
34+
## Wi-Fi Connection
35+
36+
```bash
37+
# Enable tcpip (USB required first)
38+
adb -s SERIAL tcpip 5555
39+
40+
# Get device IP
41+
adb -s SERIAL shell ip route | grep src
42+
# or
43+
adb -s SERIAL shell ip addr show wlan0
44+
45+
# Connect over network
46+
adb connect <ip>:5555
47+
48+
# Disconnect
49+
adb disconnect <ip>:5555
50+
```
51+
52+
## Device State
53+
54+
```bash
55+
# Screen size
56+
adb -s SERIAL shell wm size
57+
58+
# Current foreground app (package/activity from mCurrentFocus)
59+
adb -s SERIAL shell dumpsys window | grep -E 'mCurrentFocus|mFocusedApp'
60+
61+
# Get home launcher package (for back-home detection)
62+
adb -s SERIAL shell cmd package resolve-activity --brief -c android.intent.category.HOME
63+
64+
# Raw shell command
65+
adb -s SERIAL shell <command>
66+
```
67+
68+
## App Lifecycle
69+
70+
```bash
71+
# Verify package installed
72+
adb -s SERIAL shell pm list packages | grep <package>
73+
74+
# Launch by package (via monkey)
75+
adb -s SERIAL shell monkey -p <package> -c android.intent.category.LAUNCHER 1
76+
77+
# Launch by activity
78+
adb -s SERIAL shell am start -W -n <package>/<activity>
79+
80+
# Launch by URI/scheme
81+
adb -s SERIAL shell am start -W -a android.intent.action.VIEW -d "<scheme://path>"
82+
83+
# Force-stop
84+
adb -s SERIAL shell am force-stop <package>
85+
```
86+
87+
## Input Actions
88+
89+
```bash
90+
# Tap
91+
adb -s SERIAL shell input tap X Y
92+
93+
# Double tap (two taps with short delay)
94+
adb -s SERIAL shell input tap X Y && sleep 0.1 && adb -s SERIAL shell input tap X Y
95+
96+
# Long press (swipe to same point with duration)
97+
adb -s SERIAL shell input swipe X Y X Y 3000
98+
99+
# Swipe
100+
adb -s SERIAL shell input swipe X1 Y1 X2 Y2 [duration_ms]
101+
102+
# Key event
103+
adb -s SERIAL shell input keyevent KEYCODE_BACK
104+
adb -s SERIAL shell input keyevent KEYCODE_HOME
105+
adb -s SERIAL shell input keyevent KEYCODE_ENTER
106+
107+
# Return to home (press BACK repeatedly, check foreground against home launcher)
108+
for i in $(seq 1 20); do
109+
adb -s SERIAL shell input keyevent KEYCODE_BACK
110+
sleep 0.5
111+
# Check if home reached by comparing current focus to home package
112+
CURRENT=$(adb -s SERIAL shell dumpsys window | grep mCurrentFocus)
113+
echo "Round $i: $CURRENT"
114+
done
115+
```
116+
117+
## Text Input
118+
119+
```bash
120+
# Plain text input (ASCII only, spaces escaped as %s)
121+
adb -s SERIAL shell input text "hello%sworld"
122+
123+
# Input via ADB Keyboard (supports CJK and special characters)
124+
# First ensure ADB Keyboard is active:
125+
adb -s SERIAL shell ime set com.android.adbkeyboard/.AdbIME
126+
# Then send text (base64 encoded):
127+
adb -s SERIAL shell am broadcast -a ADB_INPUT_B64 --es msg "$(echo -n 'your text' | base64)"
128+
129+
# Clear text via ADB Keyboard
130+
adb -s SERIAL shell am broadcast -a ADB_CLEAR_TEXT
131+
```
132+
133+
## Screenshot And UI Tree
134+
135+
```bash
136+
# Screenshot to local file
137+
adb -s SERIAL exec-out screencap -p > screenshot.png
138+
139+
# Screenshot to device then pull
140+
adb -s SERIAL shell screencap -p /sdcard/screen.png
141+
adb -s SERIAL pull /sdcard/screen.png ./screen.png
142+
143+
# Dump UI hierarchy XML
144+
adb -s SERIAL shell uiautomator dump /sdcard/window_dump.xml
145+
adb -s SERIAL pull /sdcard/window_dump.xml ./window_dump.xml
146+
```
147+
148+
## App Install And Uninstall
149+
150+
```bash
151+
# Install APK (replace existing)
152+
adb -s SERIAL install -r /path/to/app.apk
153+
154+
# Uninstall
155+
adb -s SERIAL uninstall <package>
156+
```
157+
158+
## Common Keycodes
159+
160+
| Keycode | Description |
161+
|---------|-------------|
162+
| `KEYCODE_BACK` | Back button |
163+
| `KEYCODE_HOME` | Home button |
164+
| `KEYCODE_ENTER` | Enter/confirm |
165+
| `KEYCODE_DEL` | Delete/backspace |
166+
| `KEYCODE_VOLUME_UP` | Volume up |
167+
| `KEYCODE_VOLUME_DOWN` | Volume down |
168+
| `KEYCODE_POWER` | Power button |
169+
| `KEYCODE_TAB` | Tab key |
170+
| `KEYCODE_ESCAPE` | Escape key |

.claude/skills/android-adb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.agents/skills/android-adb

.claude/skills/android-emulator-skill/scripts/emu_health_check.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
`<#
1+
<#
22
.SYNOPSIS
33
Android Emulator Testing Environment Health Check
44
@@ -109,7 +109,7 @@ if (Get-Command adb -ErrorAction SilentlyContinue) {
109109
if (-not [string]::IsNullOrWhiteSpace($env:ANDROID_HOME)) {
110110
$platformToolsPath = Join-Path $env:ANDROID_HOME 'platform-tools'
111111
if ((Test-Path (Join-Path $platformToolsPath 'adb.exe')) -or (Test-Path (Join-Path $platformToolsPath 'adb'))) {
112-
$env:PATH += ";$platformToolsPath"
112+
$env:PATH = $env:PATH + ';' + $platformToolsPath
113113
Check-Warning "ADB found in SDK but not in PATH. Adding it temporarily."
114114
Check-Passed "ADB is installed"
115115
} else {
@@ -138,7 +138,7 @@ if (Get-Command emulator -ErrorAction SilentlyContinue) {
138138
if (-not [string]::IsNullOrWhiteSpace($env:ANDROID_HOME)) {
139139
$emulatorPath = Join-Path $env:ANDROID_HOME 'emulator'
140140
if ((Test-Path (Join-Path $emulatorPath 'emulator.exe')) -or (Test-Path (Join-Path $emulatorPath 'emulator'))) {
141-
$env:PATH += ";$emulatorPath"
141+
$env:PATH = $env:PATH + ';' + $emulatorPath
142142
Check-Warning "Emulator found in SDK but not in PATH. Adding it temporarily."
143143
Check-Passed "Emulator is installed"
144144
} else {

.codex

Whitespace-only changes.

.gemini/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"appium-mcp": {
4+
"command": "npx",
5+
"args": [
6+
"-y",
7+
"appium-mcp@latest"
8+
]
9+
}
10+
}
11+
}

.github/workflows/ios-build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
build:
3838
runs-on: macos-latest
3939
timeout-minutes: 30
40+
env:
41+
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
42+
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
4043

4144
steps:
4245
- name: Checkout repository
@@ -195,7 +198,9 @@ jobs:
195198
flutter build ios --no-codesign --simulator
196199
else
197200
echo "Building Flutter iOS Release..."
198-
flutter build ios --release --no-codesign
201+
flutter build ios --release --no-codesign \
202+
--dart-define=SUPABASE_URL="$SUPABASE_URL" \
203+
--dart-define=SUPABASE_ANON_KEY="$SUPABASE_ANON_KEY"
199204
fi
200205
cd "$IOS_PATH"
201206
elif [ "$PROJECT_TYPE" = "reactnative" ] || [ "$PROJECT_TYPE" = "expo" ]; then

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ migrate_working_dir/
3232
.pub/
3333
/build/
3434
/coverage/
35+
config/dart_define.json
3536

3637
# Symbolication related
3738
app.*.symbols

.qwen/skills/android-adb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.agents/skills/android-adb

0 commit comments

Comments
 (0)