Commit Graph
23 Commits
Author SHA1 Message Date
KremeCN b79b5b86db feat(about): add link buttons and logo rounding 2026-08-28 11:13:23 +08:00
KremeCN 0144ea992c docs: reorganize project documentation (#15)
## Summary
- add a root README with project overview, setup, usage, architecture, security, and contribution guidance
- replace stale planning and requirement notes with current 1.0 project overview
- update architecture and hardware validation docs to match the implemented app
- remove obsolete UI branch notes and the old Java/XML AsyncTask example
- remove the superpowers documentation and move vendor ABSDK references into docs/vendor
- preserve vendor Markdown and XLS content byte-for-byte

## Verification
- Markdown relative links checked
- vendor files verified as 100% Git renames
- git diff --check passed
- no application tests run; documentation-only change

Reviewed-on: #15
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-28 10:57:47 +08:00
KremeCN 32c7d4f8cc feat(app): add About screen and mark 1.0 release (#14)
## Summary
- add an About entry to the account sheet and a full-screen About page
- show app, package, platform, product, and Flagship team information
- localize the new interface in English and Simplified Chinese
- set the release version to 1.0.0 with versionCode 1

## Verification
- debug APK build completed successfully after the About screen crash fix
- git diff --check passed

Reviewed-on: #14
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-28 09:47:57 +08:00
KremeCN ad0dd2cd5b feat(infrared): expand remote library and creation flow (#13)
## Summary

- replace the crowded add-remote dialog with a full-screen three-step flow
- make the first step explicitly choose between adding from the infrared library and creating through learning
- add a full-screen remote editor with read-only library configuration, editable custom layouts, and delete confirmation
- append newly created remotes to the bottom of the management list and right side of the remote switcher
- remove the fan emoji from the device type label
- add a curated CC0 Flipper-IRDB preset subset with real NEC/NECext protocol codes
- add projector, audio/receiver, set-top box, streaming device, and lighting categories
- require a test power command and explicit device-response confirmation before creating library remotes
- include source attribution and a repeatable converter for parsed NEC/NECext signals

## Compatibility scope

- imported formats: parsed NEC and NECext only
- excluded: raw pulse data and other protocols because the ABox irCode encoding contract is not publicly specified for them
- existing devices, remotes, and scenes are not migrated or renamed

## Verification

- ./gradlew.bat :android:app:assembleDebug --no-daemon
- converter reproduced

Reviewed-on: #13
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-28 09:23:06 +08:00
KremeCN 387ecacef5 feat(socket): update smart socket defaults (#12)
## Summary

- change the default socket device name from Zigbee插座控制器 to 智能插座
- update new default scenes, in-memory defaults, and Local Experience simulation data to use the new gateway name
- remove the duplicated Direct control section from the smart socket detail screen, keeping the main power control
- remove the unused direct-control strings

## Data behavior

- existing configured devices are not renamed
- existing persisted scenes are not migrated
- only newly created default content uses 智能插座

## Verification

- ./gradlew.bat :android:app:assembleDebug --no-daemon
- installed on mulator-5554
- confirmed the Local Experience device card shows 智能插座
- confirmed the socket detail screen has no Direct control section or duplicate ON/OFF buttons

Automated tests were not run.

Reviewed-on: #12
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-28 07:07:21 +08:00
KremeCN 4d4dd2893e feat(scene): complete automation runtime (#11)
## Summary

- persist scenes and trigger state in Room with a database migration and one-time default seeding
- execute enabled automatic scenes from real device readings with edge-triggered thresholds, conditions, hysteresis, and time occurrence deduplication
- schedule foreground polling and WorkManager background evaluation, including reconciliation after scene changes
- allow automatic commands to be run manually for testing while bypassing triggers and conditions
- send real system notifications with runtime permission handling and accurate failure reporting
- move Other Options & Appearance to the bottom of the command editor

## Verification

- ./gradlew.bat :android:app:assembleDebug --no-daemon
- installed and exercised on mulator-5554
- verified manual automatic-command execution and Activity records
- verified notification permission flow, posted notification, and successful Activity records

Automated tests were not run per the requested iteration workflow.

Reviewed-on: #11
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-28 06:39:31 +08:00
KremeCN 86b7e5849b feat(ui): complete ABox app experience redesign (#10)
## Summary

- rebuild the authenticated shell, device dashboard, device detail pages, scenes, activity timeline, account sheet, and settings experience
- redesign infrared remote management and controls, including custom remotes, learn-state handling, slot isolation, and safe default content
- add persisted theme controls with internal accent, color-style, and color-standard resolution while keeping dynamic color authoritative
- add ABox profile defaults for the three exact gateway device names, editable starter scenes, and custom infrared remotes
- persist real activity events for device commands, infrared actions, and scene execution
- stabilize navigation and back behavior, including duplicate top-back protection and removal of the unfinished predictive-back option
- update launcher icons and bilingual application name

## Verification

- `:android:app:assembleDebug`
- installed the debug APK on `emulator-5554`
- manually exercised device detail navigation, settings/theme navigation, infrared management, activity records, and repeated back actions

## Notes

- no automated test suite was run during the visual iteration cycle
- `docs/superpowers/**` and local reference repositories are excluded from this PR

Reviewed-on: #10
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-27 23:25:07 +08:00
KremeCN ed98c2be98 feat(app): add authenticated app shell with top bar and bottom navigation (#6)
### 概述 / Summary
实现认证后的主应用壳层(`MainAppShell`),包含胶囊顶栏(`ABoxTopPillBar`)与 Material 3 底部导航栏(`ABoxNavigationBar`),并为团队其他成员预留标准 Composable 插槽。

### 核心变更 / Changes
1. **设计系统 (`:android:core:designsystem`)**:
   - 新增 `ABoxTopPillBar`:展示提供方/空间信息、快捷 `+` 操作与用户头像徽标。
   - 新增 `ABoxUserAvatar`:支持用户名首字符与主题强调轮廓。
   - 新增 `ABoxNavigationBar` & `ABoxNavigationBarItem`:M3 胶囊指示器底部导航栏封装。
2. **应用壳层 (`:android:app`)**:
   - 新增 `MainTab`(`DEVICES`, `SCENES`, `ACTIVITY`),严格对齐需求与分工术语。
   - 新增 `MainAppShell`:承载顶栏、底栏、Tab 平滑切换,并开放 `devicesSlot`、`scenesSlot`、`activitySlot`。
   - 新增 `AccountProviderBottomSheet`:点击头像展示当前会话/提供方信息、支持切换提供方与退出登录。
3. **多语言与测试**:
   - 补充 `values` 与 `values-zh-rCN` 双语资源。
   - 新增 `MainTabTest` 单元测试并通过全量 `check` 与 `test`。

### 分工保护 / Boundaries
- 仅提供顶栏、底栏与主页面容器骨架;
- 设备列表、情景编排与设备控制详情的具体 UI 保持为插槽,供 alZerNest、tzh 和 Aurum 后续无缝填充。

Reviewed-on: #6
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-25 10:49:59 +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 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 e45de7fefe docs: define ABSDK device name identity 2026-08-22 22:29:25 +08:00
KremeCN ca0703a9a3 fix: make infrared downloads provider scoped 2026-08-22 22:21:34 +08:00
KremeCN cbc2dc7ec5 fix: redact passwords from credential strings 2026-08-22 22:14:47 +08:00
KremeCN 117f87f735 feat: establish Android project foundation 2026-08-22 22:06:50 +08:00
KremeCN 0b8c54bd21 docs: update package name to com.flagship.abox.manager 2026-08-22 17:12:49 +08:00
KremeCN 66334cf18e docs: add ABox Manager project plan 2026-08-22 16:04:45 +08:00
KremeCN 6f6f3755b5 docs: archive ABSDK Android sample 2026-08-22 15:48:16 +08:00
KremeCN 3c7c6002df docs: add LoginAsyncTaskDemo layout example 2026-08-22 14:19:11 +08:00
KremeCN 2954b56193 docs: document protected main branch workflow 2026-08-22 14:15:09 +08:00
KremeCN 519e865726 chore: add .gitignore 2026-08-22 14:03:57 +08:00
KremeCN 091103586a chore: add AGENTS.md rule hub with CLAUDE.md and .trae/rules/all.md entrypoints 2026-08-22 13:56:18 +08:00
KremeCN 4ba2508778 docs: add AsyncTask demo for ABSDK login 2026-08-22 12:13:24 +08:00
KremeCN 48f26e8ef8 chore: initial commit 2026-08-22 12:02:45 +08:00