feat(infrared): expand remote library and creation flow #13

Merged
KremeCN merged 1 commits from feat/redesign-infrared-add-remote into main 2026-08-28 09:23:07 +08:00
Owner

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
## 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
KremeCN added 1 commit 2026-08-28 09:22:34 +08:00
KremeCN merged commit ad0dd2cd5b into main 2026-08-28 09:23:07 +08:00
KremeCN deleted branch feat/redesign-infrared-add-remote 2026-08-28 09:23:07 +08:00
pr-agent-bot bot reviewed 2026-08-28 09:25:50 +08:00
pr-agent-bot bot left a comment

Inline comment

Inline comment
@@ -832,4 +1041,0 @@
DropdownMenuItem(
text = { Text(preset.displayName) },
onClick = {
selectedBrand = preset

验证绕过

选择任意空调预设时,requiresPresetTest 会被设为 false,详情页不会显示电源测试和设备响应确认,用户可直接创建码库遥控器。这绕过了 PR 声明的码库遥控器创建前验证要求;应为该类预设提供可测试指令,或在无法测试时禁止创建,而不是直接免除验证。

**验证绕过** 选择任意空调预设时,`requiresPresetTest` 会被设为 false,详情页不会显示电源测试和设备响应确认,用户可直接创建码库遥控器。这绕过了 PR 声明的码库遥控器创建前验证要求;应为该类预设提供可测试指令,或在无法测试时禁止创建,而不是直接免除验证。 <!-- pr-agent-dedup: af0443a57c44 --> <!-- pr-agent-key-issue-location: b294b29b478a -->
pr-agent-bot bot reviewed 2026-08-28 09:25:50 +08:00
pr-agent-bot bot left a comment

Inline comment

Inline comment
@@ -1027,5 +1027,5 @@
)
if (requiresPresetTest) {
PresetTestCard(
state = testState,
onTest = {

异步竞态

测试回调未与发起测试时的预设 ID 绑定。用户可在测试进行中返回并改选另一个预设;旧请求完成后仍会把共享的 testState 推进到待确认状态,随后新预设可被确认并创建,却从未实际测试。应捕获被测试的 ID,并在回调时校验当前选择,或在选择变化时取消旧请求。

**异步竞态** 测试回调未与发起测试时的预设 ID 绑定。用户可在测试进行中返回并改选另一个预设;旧请求完成后仍会把共享的 `testState` 推进到待确认状态,随后新预设可被确认并创建,却从未实际测试。应捕获被测试的 ID,并在回调时校验当前选择,或在选择变化时取消旧请求。 <!-- pr-agent-dedup: 924ce73f3822 --> <!-- pr-agent-key-issue-location: 6651a02c83c2 -->
pr-agent-bot bot reviewed 2026-08-28 09:25:51 +08:00
pr-agent-bot bot left a comment

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 No security concerns identified
## PR Reviewer Guide 🔍 Here are some key observations to aid the review process: <table> <tr><td>⏱️&nbsp;<strong>Estimated effort to review</strong>: 4 🔵🔵🔵🔵⚪</td></tr> <tr><td>🧪&nbsp;<strong>No relevant tests</strong></td></tr> <tr><td>🔒&nbsp;<strong>No security concerns identified</strong></td></tr> </table>
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Flagship/abox-mgr#13