Commit Graph
7 Commits
Author SHA1 Message Date
KremeCN 6dab84506e fix(app): preserve tab slot state and remove duplicate bottom insets
- Wrap tab crossfade slots in SaveableStateHolder to preserve slot-local state across tab switches

- Remove redundant navigationBarsPadding modifier on ABoxNavigationBar to prevent duplicated bottom spacing
2026-08-25 10:40:35 +08:00
KremeCN 0f91afcbae fix(app): persist active tab state and support bottom sheet scrolling
- Use rememberSaveable for activeTab in MainAppShell to survive configuration changes and process death
- Add vertical scrolling to AccountProviderBottomSheet to prevent overflow on small screens and landscape orientation
- Clean up unused imports and update KDoc in AccountProviderBottomSheet
2026-08-25 10:25:05 +08:00
KremeCN 0123c30867 refactor(app): remove duplicate provider navigation 2026-08-25 09:25:04 +08:00
KremeCN 38328c664a fix(app): keep session actions active from account sheet 2026-08-25 03:55:48 +08:00
KremeCN 25689164b2 feat(app): add authenticated app shell with top bar and bottom navigation 2026-08-25 03:29:26 +08:00
KremeCN 06ccfdf952 feat: add provider login flow (#4)
## Summary

- replace the former three-provider model with two pre-login choices:
  - **ABox**: authenticate through the vendor ABSDK on the current local network
  - **Local experience**: establish a production simulation session without credentials, network access, or ABSDK calls
- remove the compatible-backend product/server scope and safely ignore legacy persisted compatible-provider values
- bind one process-wide `AbsdkBridge` for ABox session, socket, temperature/humidity, and infrared operations
- add production `:runtime:simulation` implementations and route device operations by the active provider
- retain provider-scoped username preferences, Keystore-encrypted automatic-login credentials, token recovery, logout, and session isolation
- add regression coverage for authentication gating, profile/session alignment, provider switching cleanup, routing, and simulation behavior
- align requirement, plan, architecture, and protocol documentation with LAN ABSDK access

## Verification

```text
./gradlew check testDebugUnitTest test
BUILD SUCCESSFUL (220 actionable tasks)

./gradlew :android:app:assembleDebug :android:app:assembleRelease
BUILD SUCCESSFUL (217 actionable tasks)

./gradlew :android:app:compileDebugAndroidTestKotlin
BUILD SUCCESSFUL

git diff --check
passed
```

Emulator smoke validation:

- provider selection displays ABox and Local experience only
- Local experience enters the authenticated route without credentials
- Local experience also enters while emulator Wi-Fi/data are disabled
- Local Sign out and Switch provider return to provider selection
- ABox opens the credential form; empty submission stays on login with the required-fields error

## Known constraints and accepted risks

- The vendor JAR uses cleartext HTTP and hardcodes `a-box.com.cn`; Debug and Release intentionally share the same ABox capability under the approved no-Release-exception decision. `@CleartextAbsdkTransport`, `usesCleartextTraffic`, and the architecture/protocol documents explicitly record this risk. This does not provide confidentiality or integrity.
- Real authenticated ABox and read-only hardware smoke validation is deferred because the gateway is currently unavailable locally. This PR does not claim that current-environment validation completed.
- The mapping from the vendor JAR's hardcoded hostname to the LAN gateway remains an external network/deployment prerequisite. The ABSDK JAR and bridge path remain identical to the previously hardware-validated `feat/moler-infrared-control` branch.
- `FakeDeviceCatalog` remains a temporary debug-only placeholder until the device-catalog module provides the production ABox catalog. ABox catalog requests are not routed to Local experience simulation.

Reviewed-on: #4
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-25 01:59:00 +08:00
KremeCN 117f87f735 feat: establish Android project foundation 2026-08-22 22:06:50 +08:00