Skip to content

[Code Driven]: #2 – Closure Control Logic Movement and Backward Compatibility#43203

Open
pimpalemahesh wants to merge 6 commits intoproject-chip:masterfrom
pimpalemahesh:closure-control/code-movement
Open

[Code Driven]: #2 – Closure Control Logic Movement and Backward Compatibility#43203
pimpalemahesh wants to merge 6 commits intoproject-chip:masterfrom
pimpalemahesh:closure-control/code-movement

Conversation

@pimpalemahesh
Copy link
Contributor

Summary

This is the second PR in the migration of the Closure Control cluster to the code-driven structure.

Changes Included

Renamed files to follow the code-driven naming convention:

  • closure-control-cluster-delegate.h → ClosureControlClusterDelegate.h
  • closure-control-cluster-logic.h → ClosureControlClusterLogic.h
  • closure-control-server.h → ClosureControlServer.h
  • closure-control-cluster-objects.h → ClosureControlClusterObjects.h

Moved implementation code into the newly structured files.

Kept the original files to maintain backward compatibility where applicable.

Removed closure-control-cluster-matter-context.h Its contents were moved into ClosureControlClusterLogic.h since they are strictly logic-related.
This may introduce a minor backward compatibility impact.
However, this MatterContext is currently only used for marking attributes as dirty.
In a follow-up MR, NotifyAttributeChanged() will be used instead, making the previous approach unnecessary.

Related issues

NA

Testing

Successfully built the Closure app locally.
Run tests for closure app

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

See: Pull Request Guidelines

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively refactors the Closure Control cluster to a code-driven structure, which is a great improvement for maintainability and testability. The changes are well-organized, with file renames and code movement that align with the new architecture. I've found a critical copy-paste error that would prevent compilation and a minor documentation issue. Once these are addressed, this PR will be in excellent shape.

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

PR #43203: Size comparison from 3ba5c51 to c8485fe

Full report (27 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32)
platform target config section 3ba5c51 c8485fe change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108172 1108172 0 0.0
RAM 178674 178674 0 0.0
bl702 lighting-app bl702+eth FLASH 663248 663248 0 0.0
RAM 134689 134689 0 0.0
bl702+wifi FLASH 838954 838954 0 0.0
RAM 124213 124213 0 0.0
bl706+mfd+rpc+littlefs FLASH 1073182 1073182 0 0.0
RAM 117157 117157 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905796 905796 0 0.0
RAM 105748 105748 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 986248 986248 0 0.0
RAM 109644 109644 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 777436 777436 0 0.0
RAM 103280 103280 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786000 786000 0 0.0
RAM 108496 108496 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 731068 731068 0 0.0
RAM 97260 97260 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715596 715596 0 0.0
RAM 97460 97460 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556508 556508 0 0.0
RAM 204448 204448 0 0.0
lock CC3235SF_LAUNCHXL FLASH 590704 590704 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 969152 969144 -8 -0.0
RAM 125476 125476 0 0.0
BRD4338a FLASH 757708 757700 -8 -0.0
RAM 237712 237712 0 0.0
window-app BRD4187C FLASH 1066872 1066864 -8 -0.0
RAM 126700 126700 0 0.0
esp32 all-clusters-app c3devkit DRAM 98260 98260 0 0.0
FLASH 1590114 1590114 0 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955936 955936 0 0.0
RAM 162081 162081 0 0.0
nxp contact mcxw71+release FLASH 746432 746432 0 0.0
RAM 66912 66912 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701804 1701804 0 0.0
RAM 213852 213852 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602924 1602924 0 0.0
RAM 210740 210740 0 0.0
light cy8ckit_062s2_43012 FLASH 1468652 1468652 0 0.0
RAM 196936 196936 0 0.0
lock cy8ckit_062s2_43012 FLASH 1496788 1496788 0 0.0
RAM 224720 224720 0 0.0
qpg lighting-app qpg6200+debug FLASH 840292 840292 0 0.0
RAM 127764 127764 0 0.0
lock-app qpg6200+debug FLASH 778904 778904 0 0.0
RAM 118712 118712 0 0.0
realtek light-switch-app rtl8777g FLASH 704952 704952 0 0.0
RAM 113440 113440 0 0.0
lighting-app rtl8777g FLASH 750648 750648 0 0.0
RAM 114640 114640 0 0.0
stm32 light STM32WB5MM-DK FLASH 477256 477256 0 0.0
RAM 141280 141280 0 0.0

@pimpalemahesh pimpalemahesh force-pushed the closure-control/code-movement branch from c8485fe to dc1ea45 Compare February 18, 2026 14:10
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

PR #43203: Size comparison from 3ba5c51 to dc1ea45

Full report (27 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32)
platform target config section 3ba5c51 dc1ea45 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108172 1108172 0 0.0
RAM 178674 178674 0 0.0
bl702 lighting-app bl702+eth FLASH 663248 663248 0 0.0
RAM 134689 134689 0 0.0
bl702+wifi FLASH 838954 838954 0 0.0
RAM 124213 124213 0 0.0
bl706+mfd+rpc+littlefs FLASH 1073182 1073182 0 0.0
RAM 117157 117157 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905796 905796 0 0.0
RAM 105748 105748 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 986248 986248 0 0.0
RAM 109644 109644 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 777436 777436 0 0.0
RAM 103280 103280 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786000 786000 0 0.0
RAM 108496 108496 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 731068 731068 0 0.0
RAM 97260 97260 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715596 715596 0 0.0
RAM 97460 97460 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556508 556508 0 0.0
RAM 204448 204448 0 0.0
lock CC3235SF_LAUNCHXL FLASH 590704 590704 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 969152 969144 -8 -0.0
RAM 125476 125476 0 0.0
BRD4338a FLASH 757708 757700 -8 -0.0
RAM 237712 237712 0 0.0
window-app BRD4187C FLASH 1066872 1066864 -8 -0.0
RAM 126700 126700 0 0.0
esp32 all-clusters-app c3devkit DRAM 98260 98260 0 0.0
FLASH 1590114 1590114 0 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955936 955936 0 0.0
RAM 162081 162081 0 0.0
nxp contact mcxw71+release FLASH 746432 746432 0 0.0
RAM 66912 66912 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701804 1701804 0 0.0
RAM 213852 213852 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602924 1602924 0 0.0
RAM 210740 210740 0 0.0
light cy8ckit_062s2_43012 FLASH 1468652 1468652 0 0.0
RAM 196936 196936 0 0.0
lock cy8ckit_062s2_43012 FLASH 1496788 1496788 0 0.0
RAM 224720 224720 0 0.0
qpg lighting-app qpg6200+debug FLASH 840292 840292 0 0.0
RAM 127764 127764 0 0.0
lock-app qpg6200+debug FLASH 778904 778904 0 0.0
RAM 118712 118712 0 0.0
realtek light-switch-app rtl8777g FLASH 704952 704952 0 0.0
RAM 113440 113440 0 0.0
lighting-app rtl8777g FLASH 750648 750648 0 0.0
RAM 114640 114640 0 0.0
stm32 light STM32WB5MM-DK FLASH 477256 477256 0 0.0
RAM 141280 141280 0 0.0

@pimpalemahesh pimpalemahesh marked this pull request as ready for review February 18, 2026 15:25
@mergify mergify bot added the conflict label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments