Extract cloud bulk progress helpers

This commit is contained in:
2026-06-15 21:09:53 +02:00
parent 0cec8e1bfd
commit df2c67838b
4 changed files with 68 additions and 6 deletions

View File

@@ -18,6 +18,13 @@ agent or engineer to remove them without reconstructing context from chat.
## Recent Reductions ## Recent Reductions
- 2026-06-15: `DEBT-0038` was narrowed again. The retained cloud bulk-upload
progress lifetime wiring in `LegacyCloudServices::begin_bulk_upload()` and
`end_bulk_upload()` now routes through focused helpers in
`src/legacy_cloud_services.cpp` instead of living inline in the retained
service methods; 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-browser - 2026-06-15: `DEBT-0038` was narrowed again. The retained cloud-browser
OK-button wiring in `LegacyCloudServices::show_browser()` now routes through OK-button wiring in `LegacyCloudServices::show_browser()` now routes through
a focused helper in `src/legacy_cloud_services.cpp` instead of living a focused helper in `src/legacy_cloud_services.cpp` instead of living

View File

@@ -149,6 +149,12 @@ The retained cloud-browser OK-button wiring in
in `src/legacy_cloud_services.cpp`, so the remaining cloud bridge debt is in `src/legacy_cloud_services.cpp`, so the remaining cloud bridge debt is
further concentrated on retained prompt/progress lifetime, OpenGL context further concentrated on retained prompt/progress lifetime, OpenGL context
guarding, and the still-retained transfer-thread execution model. guarding, and the still-retained transfer-thread execution model.
The retained cloud bulk-upload progress lifetime wiring in
`LegacyCloudServices::begin_bulk_upload()` and `end_bulk_upload()` now also
routes through focused helpers 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: Recent 2026-06-13 retained preview reductions continue to narrow DEBT-0036:
`NodeStrokePreview::draw_stroke_immediate()` now also routes `NodeStrokePreview::draw_stroke_immediate()` now also routes

View File

@@ -836,6 +836,43 @@ Completed Task Log:
| --- | --- | ---: | --- | --- | | --- | --- | ---: | --- | --- |
| 2026-06-15 | ADP-021 | 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` | `2ccd8344` | | 2026-06-15 | ADP-021 | 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` | `2ccd8344` |
### ADP-022 - Extract Cloud Bulk Progress Helpers
Status: Done
Score: no score movement
Debt: `DEBT-0038`
Scope: `src/legacy_cloud_services.cpp` only
Goal:
Reduce the inline retained cloud bulk-upload progress lifetime surface by
extracting progress dialog creation/teardown from
`LegacyCloudServices::begin_bulk_upload()` and `end_bulk_upload()` into
focused helpers while preserving current behavior.
Done Checks:
- The retained cloud bulk-upload progress creation/teardown no longer lives
inline in `LegacyCloudServices::begin_bulk_upload()` and
`LegacyCloudServices::end_bulk_upload()`.
- The retained bulk-progress lifetime path now routes through focused helpers
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-022 | 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: Completed Task Log:
| Date | Task | Score | Validation | Commit | | Date | Task | Score | Validation | Commit |

View File

@@ -209,6 +209,22 @@ void wire_cloud_publish_prompt_buttons(
pp::panopainter::close_legacy_dialog_node(*dialog); pp::panopainter::close_legacy_dialog_node(*dialog);
}; };
} }
std::shared_ptr<NodeProgressBar> create_cloud_bulk_upload_progress(
App& app,
int progress_total)
{
const auto progress_plan = pp::app::plan_cloud_bulk_upload_progress_dialog(progress_total);
return app.show_progress(progress_plan.title, progress_plan.total);
}
void close_cloud_bulk_upload_progress(std::shared_ptr<NodeProgressBar>& progress)
{
if (progress) {
pp::panopainter::close_legacy_dialog_node(*progress);
}
progress.reset();
}
#endif //WITH_CURL #endif //WITH_CURL
void wire_cloud_browser_ok_button( void wire_cloud_browser_ok_button(
@@ -252,8 +268,7 @@ public:
{ {
bulk_progress_.reset(); bulk_progress_.reset();
if (show_progress) { if (show_progress) {
const auto progress_plan = pp::app::plan_cloud_bulk_upload_progress_dialog(progress_total); bulk_progress_ = create_cloud_bulk_upload_progress(app_, progress_total);
bulk_progress_ = app_.show_progress(progress_plan.title, progress_plan.total);
} }
} }
@@ -274,10 +289,7 @@ public:
void end_bulk_upload() override void end_bulk_upload() override
{ {
if (bulk_progress_) { close_cloud_bulk_upload_progress(bulk_progress_);
pp::panopainter::close_legacy_dialog_node(*bulk_progress_);
}
bulk_progress_.reset();
} }
void show_browser() override void show_browser() override