Split apple clipboard helpers
This commit is contained in:
@@ -74,6 +74,10 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
- 2026-06-13: `PLT-008` was narrowed again. Apple clipboard get/set now routes
|
- 2026-06-13: `PLT-008` was narrowed again. Apple clipboard get/set now routes
|
||||||
through the Apple service boundary instead of the catch-all legacy adapter;
|
through the Apple service boundary instead of the catch-all legacy adapter;
|
||||||
the Apple path still owns the OS-specific clipboard calls.
|
the Apple path still owns the OS-specific clipboard calls.
|
||||||
|
- 2026-06-13: `PLT-009` was narrowed again. Apple clipboard helper methods now
|
||||||
|
route through `src/platform_apple/apple_platform_services.*` instead of the
|
||||||
|
catch-all legacy adapter; the Apple path still owns the OS-specific clipboard
|
||||||
|
calls.
|
||||||
- 2026-06-13: `DEBT-0036` was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
|
- 2026-06-13: `DEBT-0036` was narrowed again. `NodeStrokePreview::draw_stroke_immediate()`
|
||||||
now routes final composite execution and preview copy-back through a retained
|
now routes final composite execution and preview copy-back through a retained
|
||||||
local wrapper, leaving the call site with only sequence wiring.
|
local wrapper, leaving the call site with only sequence wiring.
|
||||||
|
|||||||
@@ -1430,6 +1430,34 @@ Completed Task Log:
|
|||||||
| --- | --- | ---: | --- | --- |
|
| --- | --- | ---: | --- | --- |
|
||||||
| 2026-06-13 | PLT-008 | +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` | `2ec48965` |
|
| 2026-06-13 | PLT-008 | +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` | `2ec48965` |
|
||||||
|
|
||||||
|
### PLT-009 - Split Apple Clipboard Helpers From Legacy Platform Adapter
|
||||||
|
|
||||||
|
Status: Ready
|
||||||
|
Score: +1 platform alignment and package parity
|
||||||
|
Debt: `DEBT-0016`, `DEBT-0017`, `DEBT-0051`
|
||||||
|
Scope: `src/platform_legacy/legacy_platform_services.cpp`,
|
||||||
|
`src/platform_apple/apple_platform_services.*`
|
||||||
|
|
||||||
|
Goal:
|
||||||
|
|
||||||
|
Move Apple clipboard helper methods out of the catch-all legacy platform
|
||||||
|
adapter into the Apple platform service boundary. Preserve clipboard behavior
|
||||||
|
and keep non-Apple behavior unchanged.
|
||||||
|
|
||||||
|
Done Checks:
|
||||||
|
|
||||||
|
- `src/platform_legacy/legacy_platform_services.cpp` no longer owns the Apple
|
||||||
|
clipboard helper branch.
|
||||||
|
- Apple clipboard get/set still dispatches through the Apple service path.
|
||||||
|
- The debt log records the reduced Apple 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
|
||||||
|
```
|
||||||
|
|
||||||
### STR-010 - Extract Remaining Draw Merge Composite Orchestration
|
### STR-010 - Extract Remaining Draw Merge Composite Orchestration
|
||||||
|
|
||||||
Status: Done
|
Status: Done
|
||||||
|
|||||||
@@ -52,6 +52,30 @@ std::vector<std::string> AppleDocumentPlatformServices::document_browse_roots(
|
|||||||
return platform_document_browse_roots(family_, work_path, data_path);
|
return platform_document_browse_roots(family_, work_path, data_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string AppleDocumentPlatformServices::clipboard_text() const
|
||||||
|
{
|
||||||
|
#if defined(__IOS__)
|
||||||
|
return [App::I->ios_view clipboard_get_string];
|
||||||
|
#elif defined(__OSX__)
|
||||||
|
return [App::I->osx_view clipboard_get_string];
|
||||||
|
#else
|
||||||
|
return {};
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AppleDocumentPlatformServices::set_clipboard_text(std::string_view text) const
|
||||||
|
{
|
||||||
|
const std::string value(text);
|
||||||
|
#if defined(__IOS__)
|
||||||
|
return [App::I->ios_view clipboard_set_string:value];
|
||||||
|
#elif defined(__OSX__)
|
||||||
|
return [App::I->osx_view clipboard_set_string:value];
|
||||||
|
#else
|
||||||
|
(void)value;
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void AppleDocumentPlatformServices::pick_image(PickedPathCallback callback) const
|
void AppleDocumentPlatformServices::pick_image(PickedPathCallback callback) const
|
||||||
{
|
{
|
||||||
if (family_ == PlatformFamily::ios)
|
if (family_ == PlatformFamily::ios)
|
||||||
@@ -130,31 +154,6 @@ std::string AppleDocumentPlatformServices::format_working_directory_path(std::st
|
|||||||
return std::string(path);
|
return std::string(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string AppleDocumentPlatformServices::clipboard_text() const
|
|
||||||
{
|
|
||||||
const std::string empty;
|
|
||||||
#if defined(__IOS__)
|
|
||||||
return [App::I->ios_view clipboard_get_string];
|
|
||||||
#elif defined(__OSX__)
|
|
||||||
return [App::I->osx_view clipboard_get_string];
|
|
||||||
#else
|
|
||||||
return empty;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AppleDocumentPlatformServices::set_clipboard_text(std::string_view text) const
|
|
||||||
{
|
|
||||||
const std::string value(text);
|
|
||||||
#if defined(__IOS__)
|
|
||||||
return [App::I->ios_view clipboard_set_string:value];
|
|
||||||
#elif defined(__OSX__)
|
|
||||||
return [App::I->osx_view clipboard_set_string:value];
|
|
||||||
#else
|
|
||||||
(void)value;
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void AppleDocumentPlatformServices::display_file(std::string_view path) const
|
void AppleDocumentPlatformServices::display_file(std::string_view path) const
|
||||||
{
|
{
|
||||||
const std::string value(path);
|
const std::string value(path);
|
||||||
|
|||||||
Reference in New Issue
Block a user