diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index 687a1d7..52a5693 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -55,6 +55,12 @@ agent or engineer to remove them without reconstructing context from chat. - 2026-06-13: `PLT-005` was narrowed again. Linux rendered-frame title updates now route through `src/platform_linux/linux_platform_services.*`; the legacy platform adapter still owns the surrounding cross-platform dispatch shell. +- 2026-06-13: `PLT-006` was narrowed again. macOS cursor visibility now routes + through `src/platform_apple/apple_platform_services.*`; the legacy platform + adapter still owns the surrounding cross-platform dispatch shell. +- 2026-06-13: `PLT-006` was narrowed again. macOS cursor visibility now routes + through the Apple service boundary instead of the catch-all legacy adapter; + the Apple path still owns the OS-specific cursor toggle. - 2026-06-13: `DEBT-0036` was narrowed again. `NodeStrokePreview::draw_stroke_immediate()` now routes final composite execution and preview copy-back through a retained local wrapper, leaving the call site with only sequence wiring. diff --git a/docs/modernization/tasks.md b/docs/modernization/tasks.md index 4445b53..b3fda62 100644 --- a/docs/modernization/tasks.md +++ b/docs/modernization/tasks.md @@ -1328,6 +1328,40 @@ Completed Task Log: | --- | --- | ---: | --- | --- | | 2026-06-13 | PLT-005 | +1 platform alignment and package parity | `ctest --preset desktop-fast --build-config Debug -R pp_platform_api_tests --output-on-failure`; `cmake --build --preset windows-msvc-default --config Debug --target pp_platform_api_tests` | `1d50bcc7` | +### PLT-006 - Split Mac Cursor Visibility From Legacy Platform Adapter + +Status: Done +Score: +1 platform alignment and package parity +Debt: `DEBT-0015`, `DEBT-0017` +Scope: `src/platform_legacy/legacy_platform_services.cpp`, +`src/platform_apple/apple_platform_services.*` + +Goal: + +Move macOS cursor visibility handling out of the catch-all legacy platform +adapter into the Apple platform service boundary. Preserve cursor visibility +behavior and keep non-macOS behavior unchanged. + +Done Checks: + +- `src/platform_legacy/legacy_platform_services.cpp` no longer owns the macOS + cursor visibility branch. +- macOS cursor visibility still dispatches through the Apple service path. +- The debt log records the reduced macOS platform tail. + +Validation: + +```powershell +ctest --preset desktop-fast --build-config Debug -R pp_platform_api_tests --output-on-failure +cmake --build --preset windows-msvc-default --config Debug --target pp_platform_api_tests +``` + +Completed Task Log: + +| Date | Task | Score | Validation | Commit | +| --- | --- | ---: | --- | --- | +| 2026-06-13 | PLT-006 | +1 platform alignment and package parity | `ctest --preset desktop-fast --build-config Debug -R pp_platform_api_tests --output-on-failure`; `cmake --build --preset windows-msvc-default --config Debug --target pp_platform_api_tests` | `pending` | + ### STR-010 - Extract Remaining Draw Merge Composite Orchestration Status: Done diff --git a/src/platform_apple/apple_platform_services.cpp b/src/platform_apple/apple_platform_services.cpp index a055852..157978c 100644 --- a/src/platform_apple/apple_platform_services.cpp +++ b/src/platform_apple/apple_platform_services.cpp @@ -160,4 +160,13 @@ void AppleDocumentPlatformServices::share_file(std::string_view path) const #endif } +void AppleDocumentPlatformServices::set_cursor_visible(bool visible) const +{ +#if defined(__OSX__) + [App::I->osx_view show_cursor:visible]; +#else + (void)visible; +#endif +} + } diff --git a/src/platform_apple/apple_platform_services.h b/src/platform_apple/apple_platform_services.h index 2dbd11f..bcde797 100644 --- a/src/platform_apple/apple_platform_services.h +++ b/src/platform_apple/apple_platform_services.h @@ -37,6 +37,7 @@ public: [[nodiscard]] std::string format_working_directory_path(std::string_view path) const; void display_file(std::string_view path) const; void share_file(std::string_view path) const; + void set_cursor_visible(bool visible) const; private: PlatformFamily family_; diff --git a/src/platform_legacy/legacy_platform_services.cpp b/src/platform_legacy/legacy_platform_services.cpp index ebcc47b..b4899bd 100644 --- a/src/platform_legacy/legacy_platform_services.cpp +++ b/src/platform_legacy/legacy_platform_services.cpp @@ -276,11 +276,7 @@ public: void set_cursor_visible(bool visible) override { -#ifdef __OSX__ - [App::I->osx_view show_cursor:visible]; -#else - (void)visible; -#endif + active_apple_document_platform_services().set_cursor_visible(visible); } void set_virtual_keyboard_visible(bool visible) override