Isolate platform SDK includes from app header

This commit is contained in:
2026-06-04 18:58:02 +02:00
parent 08d8c1e82c
commit 63ea626cef
5 changed files with 30 additions and 8 deletions

View File

@@ -583,6 +583,12 @@ Known local toolchain state:
while non-Windows platforms still reach retained platform bridges through
the debt-tracked adapter isolated in
`src/platform_legacy/legacy_platform_services.*`.
- `src/app.h` now forward-declares retained platform handles instead of
including Objective-C, Android, or GLFW SDK headers. The full platform SDK
headers needed by retained non-Windows bridges are included in
`src/platform_legacy/legacy_platform_services.cpp`, keeping central app
header consumers lighter while `DEBT-0055` tracks removal of those handles
from `App`.
- `pp_platform_api` also owns `plan_asset_file_load`, the SDK-free file-load
policy consumed by `LayoutManager` for XML layout reload decisions. The
helper preserves desktop mtime-based reload behavior and non-desktop

View File

@@ -72,6 +72,7 @@ agent or engineer to remove them without reconstructing context from chat.
| DEBT-0052 | Open | Modernization | Native UI/window state saving now dispatches through `PlatformServices`, but macOS execution still lives in `src/platform_legacy/legacy_platform_services.*` and forwards to the retained Objective-C app bridge | Preserve current Windows/macOS UI persistence while platform shells are extracted incrementally | `pp_platform_api_tests`; `ctest --preset desktop-fast --build-config Debug`; Windows app build; Apple package smoke once root Apple builds exist | UI/window state persistence is owned by injected platform services with no legacy adapter branch |
| DEBT-0053 | Open | Modernization | Prepared-file writable target selection and prepared-file export-dialog policy now dispatch through `PlatformServices`, but iOS/Web target selection still lives in `src/platform_legacy/legacy_platform_services.*` | Preserve mobile/Web export handoff behavior while platform shells are extracted incrementally | `pp_platform_api_tests`; `ctest --preset desktop-fast --build-config Debug`; Windows app build; Apple/Web package smoke once root package builds exist | Prepared-file target selection, export-dialog policy, and save/download handoff are owned by injected platform services with no legacy adapter branch |
| DEBT-0054 | Open | Modernization | Layout XML file read/reload decisions now consume `pp_platform_api::plan_asset_file_load`, but that helper still encodes the retained compile-time platform policy: Windows/macOS use `stat` mtime reload checks, while other platforms treat already-loaded layouts as successful no-op loads | Preserve current layout hot-reload and mobile/Web single-load behavior while removing platform guards from the shared `LayoutManager` parser | `pp_platform_api_tests`; `ctest --preset desktop-fast --build-config Debug -R pp_platform_api_tests`; Windows app build | Layout reload decisions are owned by injected platform storage/file-watch services or an asset manager boundary with platform-specific file watching removed from compile-time helpers |
| DEBT-0055 | Open | Modernization | `src/app.h` now forward-declares retained iOS/macOS/Android/Linux/Web platform handles instead of including platform SDK headers, and full SDK includes are isolated in `src/platform_legacy/legacy_platform_services.cpp`, but the `App` singleton still stores those platform handles directly | Reduce central header platform coupling incrementally without rewriting non-Windows platform entrypoints before Phase 6 | Windows app build; Apple/Android/Linux/Web package smoke once platform root builds are active | Platform handles are owned by injected `pp_platform_*` shell state or services, and `App` has no platform SDK handle fields or platform conditional members |
## Closed Debt

View File

@@ -658,6 +658,10 @@ Windows installs an injected `WindowsPlatformServices` implementation from
other platforms still route through the debt-tracked legacy fallback adapter
now isolated in `src/platform_legacy/legacy_platform_services.*`, so behavior
is preserved while their platform shell implementations are extracted.
The central `App` header now forward-declares retained platform handles instead
of including Objective-C, Android, or GLFW SDK headers; the full platform
headers live in the legacy platform adapter until those handles move out of
`App` during Phase 6.
Prepared-file save/download handoff is now also part of the service contract,
so iOS/Web export completion routes through `PlatformServices` after the app
writes the temporary/exported payload.