Skip to content

Add IFW_PLUS_PM combined controller type#1354

Merged
lihenggui merged 3 commits into
mainfrom
feature/combined-controller
Nov 4, 2025
Merged

Add IFW_PLUS_PM combined controller type#1354
lihenggui merged 3 commits into
mainfrom
feature/combined-controller

Conversation

@lihenggui

@lihenggui lihenggui commented Nov 4, 2025

Copy link
Copy Markdown
Owner

Summary

  • Add new controller type IFW_PLUS_PM that combines IFW and PM controllers for dual-layer component blocking
  • Implement CombinedController that uses both IFW and PM controllers simultaneously
  • Update Settings UI to include new controller option

Key Changes

  • Model Layer: Added IFW_PLUS_PM to ControllerType enum and proto
  • Controller Layer: Created CombinedController implementing IController interface
  • Dependency Injection: Added @CombinedControl qualifier and bindings
  • Domain Layer: Updated GetControllerUseCase to provide combined controller
  • Data Layer: Updated repositories and workers to handle new controller type
  • UI Layer: Added controller selection option in Settings

Control Logic

  • Disable: Blocks component using both IFW and PM controllers
  • Enable: Enables component using both IFW and PM controllers
  • State Check: Returns true (enabled) if EITHER controller reports enabled, false (disabled) only if BOTH are disabled

Testing

  • Build tested with ./gradlew assembleFossDebug
  • All compilation errors resolved
  • No changes to default controller type (remains IFW)

Closes #1282

Add new controller type that combines IFW and PM controllers for dual-layer component blocking.

Changes:
- Add IFW_PLUS_PM to ControllerType enum and proto
- Implement CombinedController that uses both IFW and PM controllers
- Update dependency injection to support combined controller
- Add controller type selection in Settings UI
- Update all repository and worker classes to handle new type

Component control logic:
- disable: Blocks using both IFW and PM
- enable: Enables using both IFW and PM
- State check: Returns enabled if EITHER controller reports enabled
@lihenggui lihenggui force-pushed the feature/combined-controller branch from 9047d0f to 5ed5207 Compare November 4, 2025 03:45
Allow callers to override the default controller type from user preferences.

Changes:
- Add optional controllerType parameter to controlComponent and batchControlComponent methods
- Update ComponentRepository interface
- Update LocalComponentRepository to use provided type or fall back to userData
- Update FakeComponentRepository and TestComponentRepository test implementations

When controllerType is provided, it overrides the user's default controller.
When null, behavior remains unchanged (uses userData.controllerType).
Add missing combinedController parameter and test case for IFW_PLUS_PM type.

Changes:
- Add combinedController instance to test class
- Pass combinedController to GetControllerUseCase constructor
- Add test case for IFW_PLUS_PM controller type
- Update sequential flow test to include IFW_PLUS_PM
@lihenggui lihenggui merged commit 5f54f5f into main Nov 4, 2025
4 checks passed
@lihenggui lihenggui deleted the feature/combined-controller branch November 4, 2025 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR]: IFW + PM Disable

1 participant