Files
pad_scanner/CLAUDE.md
Misaka_Company 9eb1bde645 docs: add Flutter test proxy workaround to CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-21 09:06:25 +08:00

37 lines
1.1 KiB
Markdown

# pad_scanner CLAUDE.md
## Branch Strategy
- The main branch is `master`, always kept in a releasable state
- All new feature development must be done on a `dev` branch, created from `master`
- After verification, merge `dev` back into `master`
## App Installation Rules
**Always use `adb install -r` to install the app. Never use `flutter install`.**
`flutter install` uninstalls the old version first, which wipes app configuration (API URL, sound file paths, etc.). `adb install -r` performs an in-place upgrade that preserves all app data.
### Installation Steps
```bash
# 1. Build
flutter build apk --release
# 2. Install (in-place upgrade, preserves config)
adb install -r build/app/outputs/flutter-apk/app-release.apk
```
## Flutter Test Rules
Before running `flutter test`, temporarily remove proxy environment variables for the current shell. The Flutter tester uses a localhost WebSocket, and proxy settings can break that connection with `Invalid WebSocket upgrade request`.
### PowerShell
```powershell
$env:HTTP_PROXY=''
$env:HTTPS_PROXY=''
$env:NO_PROXY='localhost,127.0.0.1,::1'
flutter test
```