Commit Graph
3 Commits
Author SHA1 Message Date
tzh c9dc3e7a77 feat(scene): add scene editor, executor and fakes (phase 1)
Introduce the scene module skeleton that satisfies phase 1 exit conditions for
tzh's responsibility in project_plan.md section 6.5: scene list, editor and Fake-driven
execution that can be tested independently.

Domain layer (domain/):
- Scene, SceneAction (SocketPower / InfraredKey), SceneIcon, SceneColor
- SceneExecutionResult with per-action outcome aggregation
- SceneRepository port (observe/get/create/update/delete, provider-isolated)
- SceneExecutor port (sequential execution, per-action failure continues)

Fakes (testing/fakes/):
- FakeSceneRepository: in-memory, provider-isolated, seeds local-experience catalog
- FakeSceneExecutor: drives existing SocketGateway/InfraredGateway fakes,
  rejects concurrent execution of the same scene

Android app (android/app/):
- SceneListScreen / SceneListViewModel: list, empty state, delete confirm
- SceneEditorScreen / SceneEditorViewModel: name/icon/color, action add/remove/reorder
- SceneExecutionScreen / SceneExecutionViewModel: run, progress, per-action summary
- SceneRoutes + NavGraphBuilder extensions wired into ABoxManagerApp
- SceneModule (debug) binds FakeSceneRepository, FakeSceneExecutor and a
  LocalProfileId qualifier that feat/provider-login will retire later

Build (settings.gradle.kts):
- Apply foojay-resolver-convention so the JVM 17 toolchain is auto-provisioned

Resources: zh-rCN / en strings for all scene surfaces
Tests: 20 unit tests covering repository isolation, CRUD, executor ordering,
failure continuation and concurrent-execution rejection
2026-08-24 11:26:46 +08:00
KremeCN 6f7d3248b0 feat: add ABSDK 0630 bridge (#3)
## Summary

- add a pure Kotlin/JVM anti-corruption layer for ABSDK 0630
- serialize blocking SDK calls and enforce one provider-scoped session
- map `ABRet`, raw maps, SDK exceptions, and error codes into typed domain results
- implement session, socket, temperature/humidity, and infrared gateways
- document bytecode-confirmed protocol facts, SDK limitations, and unresolved behavior
- align JVM module bytecode with the Android Java 17 target

## Scope boundaries

- the bridge is not wired into the Android app in this PR; debug continues using Fakes
- `setHostInfo` is intentionally not called or implemented as a provider flow
- logout clears only the bridge-local session because the JAR exposes no logout or token setter
- no real credentials, network calls, or hardware were used in tests
- `docs/requirement_spec.md` and `docs/project_plan.md` are unchanged

## Verification

```text
gradlew.bat --stop
gradlew.bat clean :absdk-bridge:test :domain:test :testing:fakes:test :android:app:lintDebug :android:app:assembleDebug :android:app:assembleRelease build
```

Result: `BUILD SUCCESSFUL`

The public JAR API was also rechecked with `javap`, including the actual `getThStatus(String)` method, absence of a public logout API, `ABRet.getDicDatas()`, `IrInfo.getStatus()`, and `downloadIrCodes(List<IrInfo>)`.
Reviewed-on: #3
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-23 07:19:05 +08:00
KremeCN 117f87f735 feat: establish Android project foundation 2026-08-22 22:06:50 +08:00