Compare commits
2 Commits
4e8be6a684
...
f6bfd8cb10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6bfd8cb10 | ||
|
|
9db50af1e6 |
22
CLAUDE.md
22
CLAUDE.md
@@ -6,6 +6,28 @@
|
||||
- All new feature development must be done on a `dev` branch, created from `master`
|
||||
- After verification, merge `dev` back into `master`
|
||||
|
||||
## Pre-Commit Checks
|
||||
|
||||
Before committing Flutter app changes, run these checks:
|
||||
|
||||
```bash
|
||||
dart format --set-exit-if-changed .
|
||||
flutter analyze
|
||||
flutter test
|
||||
```
|
||||
|
||||
If `flutter test` fails with a localhost WebSocket/proxy error, follow the proxy cleanup steps in the Flutter Test Rules section below and run it again.
|
||||
|
||||
### Handling Check Failures
|
||||
|
||||
- If a check fails because of the current change, fix the issue before committing.
|
||||
- If `flutter analyze` reports any issue in files changed by the current task, fix it before committing.
|
||||
- If `flutter analyze` reports only unrelated pre-existing issues, do not fix them in the current commit. Report the file, line, and lint/error name, then handle them in a separate cleanup commit or task.
|
||||
- If a check fails because of unrelated pre-existing issues, do not include unrelated fixes in the same commit. Report the failing command and the existing issues, then handle them in a separate cleanup commit or task.
|
||||
- If formatting fails, format only files changed by the current task. Do not run a broad formatting cleanup unless that is the explicit task.
|
||||
- Treat `flutter test` failures as blocking unless the failure is clearly caused by the proxy issue described below and passes after rerunning with proxy variables cleared.
|
||||
- When committing or reporting completion, mention which checks were run and whether any remaining failures are unrelated pre-existing issues.
|
||||
|
||||
## App Installation Rules
|
||||
|
||||
**Always use `adb install -r` to install the app. Never use `flutter install`.**
|
||||
|
||||
@@ -19,14 +19,6 @@ extension _RegistrationOverviewPart on _RegistrationPageState {
|
||||
);
|
||||
}
|
||||
|
||||
/// Whether any scanned item already has a location binding (on_shelf or transferred).
|
||||
bool _hasAnyLocatedInScanned() {
|
||||
return registration_calculations.hasAnyLocatedInScanned(
|
||||
overview: _overview,
|
||||
zongpaiNos: _zongpaiNos,
|
||||
);
|
||||
}
|
||||
|
||||
Future<String?> _baseUrl() async {
|
||||
final configService = AppConfigService();
|
||||
final baseUrl = await configService.getString('api_url') ?? '';
|
||||
|
||||
@@ -67,16 +67,31 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
final configService = AppConfigService();
|
||||
final config = await configService.loadConfig();
|
||||
config['api_url'] = url;
|
||||
if (_successPath != null) config['sound_success'] = _successPath;
|
||||
else config.remove('sound_success');
|
||||
if (_failurePath != null) config['sound_failure'] = _failurePath;
|
||||
else config.remove('sound_failure');
|
||||
if (_beepPath != null) config['sound_beep'] = _beepPath;
|
||||
else config.remove('sound_beep');
|
||||
if (_errorPath != null) config['sound_error'] = _errorPath;
|
||||
else config.remove('sound_error');
|
||||
if (_alertPath != null) config['sound_alert'] = _alertPath;
|
||||
else config.remove('sound_alert');
|
||||
if (_successPath != null) {
|
||||
config['sound_success'] = _successPath;
|
||||
} else {
|
||||
config.remove('sound_success');
|
||||
}
|
||||
if (_failurePath != null) {
|
||||
config['sound_failure'] = _failurePath;
|
||||
} else {
|
||||
config.remove('sound_failure');
|
||||
}
|
||||
if (_beepPath != null) {
|
||||
config['sound_beep'] = _beepPath;
|
||||
} else {
|
||||
config.remove('sound_beep');
|
||||
}
|
||||
if (_errorPath != null) {
|
||||
config['sound_error'] = _errorPath;
|
||||
} else {
|
||||
config.remove('sound_error');
|
||||
}
|
||||
if (_alertPath != null) {
|
||||
config['sound_alert'] = _alertPath;
|
||||
} else {
|
||||
config.remove('sound_alert');
|
||||
}
|
||||
await configService.saveConfig(config);
|
||||
setState(() => _saving = false);
|
||||
if (mounted) {
|
||||
|
||||
Reference in New Issue
Block a user