Skip to content

refactor(desktop): drop calculator builtin adapter, make desktop core…#20

Merged
Charliechen114514 merged 1 commit into
mainfrom
refactor/calculator-pure-detached
Jul 1, 2026
Merged

refactor(desktop): drop calculator builtin adapter, make desktop core…#20
Charliechen114514 merged 1 commit into
mainfrom
refactor/calculator-pure-detached

Conversation

@Charliechen114514

Copy link
Copy Markdown
Member

… app-free

The desktop core held an in-process builtin adapter for calculator (CalculatorBuiltinPanel), making calculator the only user app with source inside the desktop layer -- a reverse desktop->apps coupling via CMake target_sources + include path + link. Externalize calculator to match the other four apps (noter/system_state/alarm_clock/calendar), which are already pure detached executables with zero code in desktop/.

Changes:

  • Delete desktop/ui/components/builtin_apps/calculator_builtin_panel.{h,cpp}
  • CFDesktopEntity.cpp: drop the calculator builtin include and its construction/registration block (About registration kept intact)
  • builtin_apps/CMakeLists.txt: drop the calculator adapter source, the target_sources of apps/calculator/calculator_panel.cpp, the apps/calculator include dir, and the cfdesktop_calculator_parser link
  • apps/calculator/app.json: launch_kind auto -> detached (clean direct launch, no Auto-fallback log on low tier)
  • top-level CMakeLists.txt: refresh the stale apps-before-desktop comment (the parser-lib coupling it justified is gone)

The builtin MECHANISM is fully preserved (IBuiltinPanel, BuiltinPanelRegistry, LaunchKind::BuiltinPanel, HardwareTier::prefer_inprocess_apps adjudication, About panel) for any future panel that needs in-process rendering. Only calculator's builtin adapter is retired.

Verified: desktop exe, libCFDesktop_shared.so, and libcfdesktop_builtin_apps.a contain zero CalculatorPanel symbols; AboutPanel still present in the .so; parser_test 15/15 and builtin_panel_registry_test 5/5 pass; full build green.

… app-free

The desktop core held an in-process builtin adapter for calculator
(CalculatorBuiltinPanel), making calculator the only user app with source
inside the desktop layer -- a reverse desktop->apps coupling via CMake
target_sources + include path + link. Externalize calculator to match the
other four apps (noter/system_state/alarm_clock/calendar), which are already
pure detached executables with zero code in desktop/.

Changes:
- Delete desktop/ui/components/builtin_apps/calculator_builtin_panel.{h,cpp}
- CFDesktopEntity.cpp: drop the calculator builtin include and its
  construction/registration block (About registration kept intact)
- builtin_apps/CMakeLists.txt: drop the calculator adapter source, the
  target_sources of apps/calculator/calculator_panel.cpp, the apps/calculator
  include dir, and the cfdesktop_calculator_parser link
- apps/calculator/app.json: launch_kind auto -> detached (clean direct launch,
  no Auto-fallback log on low tier)
- top-level CMakeLists.txt: refresh the stale apps-before-desktop comment
  (the parser-lib coupling it justified is gone)

The builtin MECHANISM is fully preserved (IBuiltinPanel, BuiltinPanelRegistry,
LaunchKind::BuiltinPanel, HardwareTier::prefer_inprocess_apps adjudication,
About panel) for any future panel that needs in-process rendering. Only
calculator's builtin adapter is retired.

Verified: desktop exe, libCFDesktop_shared.so, and libcfdesktop_builtin_apps.a
contain zero CalculatorPanel symbols; AboutPanel still present in the .so;
parser_test 15/15 and builtin_panel_registry_test 5/5 pass; full build green.
@Charliechen114514 Charliechen114514 merged commit 90a6cc4 into main Jul 1, 2026
6 checks passed
@Charliechen114514 Charliechen114514 deleted the refactor/calculator-pure-detached branch July 1, 2026 06:25
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.

1 participant