diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index b9920120..74135109 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -18,6 +18,13 @@ agent or engineer to remove them without reconstructing context from chat. ## Recent Reductions +- 2026-06-15: `DEBT-0038` was narrowed again. The retained cloud + save-required warning path in `LegacyCloudServices::show_save_required_warning()` + now routes through a focused helper in `src/legacy_cloud_services.cpp` + instead of living inline in the retained service method; the remaining + cloud bridge debt stays concentrated in retained prompt/progress lifetime, + OpenGL context guarding, and the still-retained transfer-thread execution + model. - 2026-06-15: `DEBT-0038` was narrowed again. The retained cloud bulk-upload per-file execution loop in `LegacyCloudServices::upload_all_bulk_files()` now routes through a focused helper in `src/legacy_cloud_services.cpp` diff --git a/docs/modernization/roadmap.md b/docs/modernization/roadmap.md index eef1cca6..d9a0ac25 100644 --- a/docs/modernization/roadmap.md +++ b/docs/modernization/roadmap.md @@ -161,6 +161,12 @@ focused helper in `src/legacy_cloud_services.cpp`, so the remaining cloud bridge debt is further concentrated on retained prompt/progress lifetime, OpenGL context guarding, and the still-retained transfer-thread execution model. +The retained cloud save-required warning path in +`LegacyCloudServices::show_save_required_warning()` now also routes through a +focused helper in `src/legacy_cloud_services.cpp`, so the remaining cloud +bridge debt is further concentrated on retained prompt/progress lifetime, +OpenGL context guarding, and the still-retained transfer-thread execution +model. Recent 2026-06-13 retained preview reductions continue to narrow DEBT-0036: `NodeStrokePreview::draw_stroke_immediate()` now also routes diff --git a/docs/modernization/tasks.md b/docs/modernization/tasks.md index 5c5dd2df..d77bc846 100644 --- a/docs/modernization/tasks.md +++ b/docs/modernization/tasks.md @@ -908,6 +908,41 @@ Completed Task Log: | --- | --- | ---: | --- | --- | | 2026-06-15 | ADP-023 | no score movement | `MSBuild.exe out\build\windows-msvc-default\panopainter_app.vcxproj /p:Configuration=Debug /p:Platform=x64`; `ctest --preset desktop-fast --build-config Debug -R "pp_app_core_document_cloud" --output-on-failure` | `3d5340a3` | +### ADP-024 - Extract Cloud Save-Required Warning Helper + +Status: Done +Score: no score movement +Debt: `DEBT-0038` +Scope: `src/legacy_cloud_services.cpp` only + +Goal: + +Reduce the inline retained cloud save-required warning surface by extracting +the prompt path from `LegacyCloudServices::show_save_required_warning()` +into a focused helper while preserving current behavior. + +Done Checks: + +- The retained cloud save-required warning path no longer lives inline in + `LegacyCloudServices::show_save_required_warning()`. +- The retained save-required warning path now routes through a focused helper + in `src/legacy_cloud_services.cpp`. +- `DEBT-0038` and the roadmap note the reduced remaining cloud bridge + surface. + +Validation: + +```powershell +& 'C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\MSBuild.exe' out\build\windows-msvc-default\panopainter_app.vcxproj /p:Configuration=Debug /p:Platform=x64 +ctest --preset desktop-fast --build-config Debug -R "pp_app_core_document_cloud" --output-on-failure +``` + +Completed Task Log: + +| Date | Task | Score | Validation | Commit | +| --- | --- | ---: | --- | --- | +| 2026-06-15 | ADP-024 | no score movement | `MSBuild.exe out\build\windows-msvc-default\panopainter_app.vcxproj /p:Configuration=Debug /p:Platform=x64`; `ctest --preset desktop-fast --build-config Debug -R "pp_app_core_document_cloud" --output-on-failure` | `(pending)` | + Completed Task Log: | Date | Task | Score | Validation | Commit | diff --git a/src/legacy_cloud_services.cpp b/src/legacy_cloud_services.cpp index cfe29bf3..d694b7e8 100644 --- a/src/legacy_cloud_services.cpp +++ b/src/legacy_cloud_services.cpp @@ -256,6 +256,8 @@ void wire_cloud_browser_ok_button( }; } +void show_cloud_save_required_warning(App& app); + class LegacyCloudServices final : public pp::app::CloudServices { public: explicit LegacyCloudServices(App& app) noexcept @@ -265,8 +267,7 @@ public: void show_save_required_warning() override { - const auto plan = pp::app::plan_cloud_save_required_prompt(); - app_.message_box(plan.title, plan.message, plan.show_cancel); + show_cloud_save_required_warning(app_); } void prompt_publish(bool save_before_upload) override @@ -319,6 +320,12 @@ private: std::shared_ptr bulk_progress_; }; +void show_cloud_save_required_warning(App& app) +{ + const auto plan = pp::app::plan_cloud_save_required_prompt(); + app.message_box(plan.title, plan.message, plan.show_cancel); +} + } // namespace pp::foundation::Status execute_legacy_cloud_upload_plan(