Introduce platform services interface
This commit is contained in:
@@ -10,7 +10,7 @@ Keep it updated as platform paths move to shared CMake targets.
|
||||
|
||||
| Platform/Target | Current Entrypoint | Notes |
|
||||
| --- | --- | --- |
|
||||
| Windows desktop | Root `CMakeLists.txt`, preset `windows-msvc-default`; target preset `windows-vs2026-x64` retained for VS 2026 | Raw `.sln/.vcxproj` files removed on 2026-05-31; local machine currently uses Visual Studio 17 2022; `PanoPainter` now links through `pp_platform_windows` and `panopainter_app`, with Windows/vendor link dependencies owned by the platform shell, runtime payload deployment in `cmake/PanoPainterRuntime.cmake`, tested app-level document-open routing plus open/close/save session decisions owned by `pp_app_core`, retained third-party source dependencies contained by `pp_legacy_vendor`, retained asset/file/serialization sources contained by `pp_legacy_assets_io`, retained paint/document/canvas sources contained by `pp_legacy_paint_document`, retained OpenGL runtime sources contained by `pp_legacy_renderer_gl` and folded into `pp_legacy_engine`, retained runtime shell sources contained by `pp_legacy_engine`, retained base UI controls contained by `pp_legacy_ui_core` and folded into `pp_legacy_app`, app orchestration/version metadata owned by `panopainter_app`, and app-specific modal/dialog/panel/canvas workflow nodes owned by `pp_panopainter_ui` |
|
||||
| Windows desktop | Root `CMakeLists.txt`, preset `windows-msvc-default`; target preset `windows-vs2026-x64` retained for VS 2026 | Raw `.sln/.vcxproj` files removed on 2026-05-31; local machine currently uses Visual Studio 17 2022; `PanoPainter` now links through `pp_platform_windows` and `panopainter_app`, with Windows/vendor link dependencies owned by the platform shell, runtime payload deployment in `cmake/PanoPainterRuntime.cmake`, tested app-level document-open routing plus open/close/save session decisions owned by `pp_app_core`, SDK-free clipboard/cursor/virtual-keyboard service contracts owned by `pp_platform_api`, retained third-party source dependencies contained by `pp_legacy_vendor`, retained asset/file/serialization sources contained by `pp_legacy_assets_io`, retained paint/document/canvas sources contained by `pp_legacy_paint_document`, retained OpenGL runtime sources contained by `pp_legacy_renderer_gl` and folded into `pp_legacy_engine`, retained runtime shell sources contained by `pp_legacy_engine`, retained base UI controls contained by `pp_legacy_ui_core` and folded into `pp_legacy_app`, app orchestration/version metadata owned by `panopainter_app`, and app-specific modal/dialog/panel/canvas workflow nodes owned by `pp_panopainter_ui` |
|
||||
| Windows AppX | `PanoPainterPackage/Package.appxmanifest`, `.wapproj` referenced by solution | Distribution packaging |
|
||||
| macOS | `PanoPainter-OSX/` project files and `Info.plist` | Uses `NSOpenGLView` today |
|
||||
| iOS | `PanoPainter/Info.plist`, related Apple sources | Uses OpenGL ES today |
|
||||
@@ -444,6 +444,10 @@ Known local toolchain state:
|
||||
`pp_app_core` clipboard text planning as JSON, including empty text writes;
|
||||
live clipboard get/set requests consume the same contracts before retained
|
||||
platform clipboard bridges.
|
||||
- `pp_platform_api` exposes the SDK-free `PlatformServices` interface for
|
||||
clipboard text, cursor visibility, and virtual-keyboard visibility; live
|
||||
app execution now reaches retained platform bridges through the
|
||||
debt-tracked legacy adapter in `app_events.cpp`.
|
||||
- `pano_cli plan-cloud-upload` exposes `pp_app_core` cloud upload availability,
|
||||
new-document warning, publish prompt, and save-before-upload planning as JSON;
|
||||
the live cloud upload command consumes the same start contract before
|
||||
@@ -480,6 +484,9 @@ Known local toolchain state:
|
||||
show/hide planning before platform keyboard callbacks, plus cursor visibility
|
||||
planning before platform cursor callbacks, plus clipboard read/write
|
||||
planning before platform clipboard callbacks.
|
||||
- `pp_platform_api_tests` covers service dispatch for clipboard read/write,
|
||||
empty clipboard writes, cursor visibility, and virtual-keyboard visibility
|
||||
without platform SDK headers or a window.
|
||||
- `pp_app_core_document_cloud_tests` covers cloud upload no-canvas,
|
||||
new-document warning, clean publish prompt, and dirty save-before-upload
|
||||
decisions, plus cloud browse no-canvas/show-browser and selected-download
|
||||
|
||||
@@ -65,10 +65,10 @@ and validation command.
|
||||
|
||||
| Capability | Current Area | Target Owner | Required Tests |
|
||||
| --- | --- | --- | --- |
|
||||
| Mouse/keyboard/touch/gestures/cursor | `App`, platform entrypoints | `pp_app_core`, `pp_platform_*`, app | Cursor visibility decision tests, synthetic event playback |
|
||||
| Mouse/keyboard/touch/gestures/cursor | `App`, platform entrypoints | `pp_app_core`, `pp_platform_api`, `pp_platform_*`, app | Cursor visibility decision tests, platform service dispatch tests, synthetic event playback |
|
||||
| Wacom pressure | `WacomTablet` | `pp_platform_windows` | Adapter smoke with fallback |
|
||||
| Clipboard/file picker/share/display | `App` platform methods | `pp_app_core`, `pp_platform_*` | Clipboard read/write, share saved-path, picked-path, and display-file decision tests, platform smoke or mocked service |
|
||||
| Virtual keyboard | `App`, platform entrypoints | `pp_app_core`, `pp_platform_*` | Keyboard visibility decision tests, platform smoke |
|
||||
| Clipboard/file picker/share/display | `App` platform methods | `pp_app_core`, `pp_platform_api`, `pp_platform_*` | Clipboard read/write, share saved-path, picked-path, and display-file decision tests, platform service dispatch tests, platform smoke or mocked service |
|
||||
| Virtual keyboard | `App`, platform entrypoints | `pp_app_core`, `pp_platform_api`, `pp_platform_*` | Keyboard visibility decision tests, platform service dispatch tests, platform smoke |
|
||||
| OpenVR desktop | `HMD`, `Vive`, `app_vr` | `pp_platform_vr`, app | Compile gate and mocked pose tests |
|
||||
| Quest/OVR | Android Quest files | `pp_platform_android_quest` | Compile/package gate |
|
||||
| Focus/Wave | Android Focus files | `pp_platform_android_wave` | Compile/package gate |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Modernization Debt Log
|
||||
|
||||
Status: live
|
||||
Last updated: 2026-06-02
|
||||
Last updated: 2026-06-03
|
||||
|
||||
Every shortcut, temporary adapter, retained vendored dependency, skipped
|
||||
platform gate, compatibility shim, or incomplete automation path must be
|
||||
@@ -35,6 +35,7 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
| DEBT-0014 | Open | Modernization | `windows-clangcl-asan` now configures as a headless Ninja/clang-cl preset and uses the release MSVC runtime required by ASan, but local builds still fail because installed clang-cl 18.1.8 is paired with VS 2026-preview STL headers that require Clang 20 or newer | Sanitizer validation should be local and repeatable, but this machine's compiler/header pairing is incompatible | `cmake --fresh --preset windows-clangcl-asan`; `cmake --build --preset windows-clangcl-asan --target pp_foundation` | Install/use Clang 20+ with the VS 2026 STL, or point the preset at a compatible VS 2022 toolchain, then make `platform-build.ps1 -Presets windows-clangcl-asan` pass for the headless matrix |
|
||||
| DEBT-0015 | Open | Modernization | Cursor visibility requests now consume pure `pp_app_core` planning through `pano_cli plan-cursor-visibility`, but live cursor execution still reaches retained Win32/macOS platform bridges from `App::show_cursor` and `App::hide_cursor` | Keep canvas cursor behavior stable while platform shells are extracted incrementally | `pp_app_core_document_platform_io_tests`; `pano_cli plan-cursor-visibility --visible`; `ctest --preset desktop-fast --build-config Debug` | Cursor visibility execution is owned by `pp_platform_*` services and live app code depends on an injected platform interface instead of direct singleton/platform calls |
|
||||
| DEBT-0016 | Open | Modernization | Clipboard get/set requests now consume pure `pp_app_core` planning through `pano_cli plan-clipboard-read` and `pano_cli plan-clipboard-write`, but live clipboard execution still reaches retained Win32/Apple/Android platform bridges from `App::clipboard_get_text` and `App::clipboard_set_text` | Keep picker/color text clipboard behavior stable while platform shells are extracted incrementally | `pp_app_core_document_platform_io_tests`; `pano_cli plan-clipboard-write --text #ff00aa`; `ctest --preset desktop-fast --build-config Debug` | Clipboard execution is owned by `pp_platform_*` services and live app code depends on an injected platform interface instead of direct singleton/platform calls |
|
||||
| DEBT-0017 | Open | Modernization | `App::clipboard_get_text`, `App::clipboard_set_text`, `App::show_cursor`, `App::hide_cursor`, `App::showKeyboard`, and `App::hideKeyboard` now call the SDK-free `pp::platform::PlatformServices` interface, but the live implementation is still a legacy adapter in `app_events.cpp` that forwards to retained Win32/Apple/Android bridge functions | Preserve behavior while moving platform execution behind a testable service boundary before platform shell implementations are injected | `pp_platform_api_tests`; `pp_app_core_document_platform_io_tests`; `ctest --preset desktop-fast --build-config Debug`; `powershell -ExecutionPolicy Bypass -File scripts\automation\package-smoke.ps1 -Preset windows-msvc-default -Configuration Debug` | Replace the `app_events.cpp` legacy adapter with injected `pp_platform_*` service implementations owned by each platform shell |
|
||||
|
||||
## Closed Debt
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# PanoPainter Modernization Roadmap
|
||||
|
||||
Status: live
|
||||
Last updated: 2026-06-02
|
||||
Last updated: 2026-06-03
|
||||
|
||||
This is the living roadmap for modernizing PanoPainter into independently
|
||||
testable C++23 components while retaining all existing functionality. Keep this
|
||||
@@ -87,6 +87,8 @@ Intended responsibilities:
|
||||
- `pp_ui_core`: `Node`, layout, generic controls, text/image primitives.
|
||||
- `pp_panopainter_ui`: panels, dialogs, `NodeCanvas`, and app-specific
|
||||
workflows.
|
||||
- `pp_platform_api`: SDK-free service interfaces for clipboard, cursor,
|
||||
virtual keyboard, file pickers, sharing, and future platform automation.
|
||||
- `pp_platform_*`: Windows, macOS/iOS, Android, Linux, and WebGL shells.
|
||||
- `panopainter_app`: composition root only.
|
||||
|
||||
@@ -466,6 +468,11 @@ cursor bridges continue.
|
||||
`pano_cli plan-clipboard-read` and `pano_cli plan-clipboard-write` expose the
|
||||
app-core clipboard text decisions used by live clipboard get/set requests
|
||||
before retained platform clipboard bridges continue.
|
||||
`pp_platform_api` now owns a headless `PlatformServices` interface for
|
||||
clipboard text, cursor visibility, and virtual-keyboard visibility. Live app
|
||||
clipboard/cursor/keyboard execution routes through a debt-tracked legacy
|
||||
adapter in `app_events.cpp`, so behavior is preserved while later platform
|
||||
shell implementations can replace direct bridge calls.
|
||||
`pano_cli plan-cloud-upload` exposes the app-core cloud upload decision used by
|
||||
the live cloud upload command for missing-canvas, new-document warning, publish
|
||||
prompt, and dirty-document save-before-upload states before legacy UI, canvas,
|
||||
@@ -494,8 +501,9 @@ Implementation tasks:
|
||||
7. `pp_paint_renderer`
|
||||
8. `pp_ui_core`
|
||||
9. `pp_panopainter_ui`
|
||||
10. `pp_platform_*`
|
||||
11. `panopainter_app`
|
||||
10. `pp_platform_api`
|
||||
11. `pp_platform_*`
|
||||
12. `panopainter_app`
|
||||
- Remove renderer/platform dependencies from pure headers first, especially:
|
||||
- `Brush`
|
||||
- document/layer model
|
||||
@@ -975,6 +983,11 @@ Results:
|
||||
`pano_cli_plan_clipboard_write_smoke`, and
|
||||
`pano_cli_plan_clipboard_write_empty_smoke` passed and expose app-core
|
||||
clipboard decisions as JSON, including empty write text.
|
||||
- `pp_platform_api_tests` passed, covering the SDK-free `PlatformServices`
|
||||
interface for clipboard read/write, empty clipboard writes, cursor
|
||||
visibility dispatch, and virtual-keyboard visibility dispatch. The live app
|
||||
now consumes this interface through the legacy platform adapter for
|
||||
clipboard/cursor/keyboard execution.
|
||||
- `panopainter_validate_shaders` passed, validating 25 shader programs and 7
|
||||
shader includes for stage markers and include graph integrity.
|
||||
- `pp_renderer_gl_capabilities_tests` passed on default MSVC, vcpkg-headless,
|
||||
|
||||
Reference in New Issue
Block a user