Extract cloud publish thread launcher

This commit is contained in:
2026-06-15 21:44:56 +02:00
parent 56e0db2522
commit 9e731b4a71
4 changed files with 55 additions and 6 deletions

View File

@@ -18,6 +18,12 @@ 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 publish
detached-thread launch in `show_cloud_publish_prompt()` now routes through a
focused helper in `src/legacy_cloud_services.cpp` instead of living inline
in the retained prompt/setup body; 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 publish - 2026-06-15: `DEBT-0038` was narrowed again. The retained cloud publish
transfer-and-success body in `execute_cloud_publish_worker()` now routes transfer-and-success body in `execute_cloud_publish_worker()` now routes
through a focused helper in `src/legacy_cloud_services.cpp` instead of through a focused helper in `src/legacy_cloud_services.cpp` instead of

View File

@@ -207,6 +207,11 @@ The retained cloud publish transfer-and-success body in
`src/legacy_cloud_services.cpp`, so the remaining cloud bridge debt is `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 publish detached-thread launch in
`show_cloud_publish_prompt()` 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: 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

@@ -1234,6 +1234,39 @@ Completed Task Log:
| Date | Task | Score | Validation | Commit | | Date | Task | Score | Validation | Commit |
| --- | --- | ---: | --- | --- | | --- | --- | ---: | --- | --- |
| 2026-06-15 | ADP-032 | no score movement | `powershell -ExecutionPolicy Bypass -File scripts\\automation\\quiet-validate.ps1 -BuildTargets pano_cli -TestRegex "pp_app_core_document_cloud"` | `07f3ca81` | | 2026-06-15 | ADP-032 | no score movement | `powershell -ExecutionPolicy Bypass -File scripts\\automation\\quiet-validate.ps1 -BuildTargets pano_cli -TestRegex "pp_app_core_document_cloud"` | `07f3ca81` |
### ADP-033 - Extract Cloud Publish Thread Launcher
Status: Done
Score: no score movement
Debt: `DEBT-0038`
Scope: `src/legacy_cloud_services.cpp` only
Goal:
Reduce the inline retained cloud publish detached-thread launch surface by
extracting the launcher from `show_cloud_publish_prompt()` into a focused
helper while preserving current behavior.
Done Checks:
- The retained cloud publish detached-thread launch no longer lives inline in
`show_cloud_publish_prompt()`.
- The retained cloud publish detached-thread launch 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
powershell -ExecutionPolicy Bypass -File scripts\automation\quiet-validate.ps1 -BuildTargets pano_cli -TestRegex "pp_app_core_document_cloud"
```
Completed Task Log:
| Date | Task | Score | Validation | Commit |
| --- | --- | ---: | --- | --- |
| 2026-06-15 | ADP-007 | +1 legacy adapter retirement | `ctest --preset desktop-fast --build-config Debug -R "pp_app_core_app_dialog\|pp_ui_core_node_lifetime\|pp_ui_core_overlay_lifetime" --output-on-failure`; `ctest --preset desktop-fast --build-config Debug -R "pp_app_core_main_toolbar" --output-on-failure`; `MSBuild.exe out\build\windows-msvc-default\tests\pp_app_core_main_toolbar_tests.vcxproj /p:Configuration=Debug /p:Platform=x64`; `MSBuild.exe out\build\windows-msvc-default\panopainter_app.vcxproj /p:Configuration=Debug /p:Platform=x64` | `8db859cb` | | 2026-06-15 | ADP-007 | +1 legacy adapter retirement | `ctest --preset desktop-fast --build-config Debug -R "pp_app_core_app_dialog\|pp_ui_core_node_lifetime\|pp_ui_core_overlay_lifetime" --output-on-failure`; `ctest --preset desktop-fast --build-config Debug -R "pp_app_core_main_toolbar" --output-on-failure`; `MSBuild.exe out\build\windows-msvc-default\tests\pp_app_core_main_toolbar_tests.vcxproj /p:Configuration=Debug /p:Platform=x64`; `MSBuild.exe out\build\windows-msvc-default\panopainter_app.vcxproj /p:Configuration=Debug /p:Platform=x64` | `8db859cb` |
### RND-001 - Make Pure Equirectangular Export The Primary Success Path ### RND-001 - Make Pure Equirectangular Export The Primary Success Path

View File

@@ -248,12 +248,19 @@ void execute_cloud_publish_worker(App& app, bool save_before_upload)
execute_cloud_publish_transfer_and_success_prompt(app, save_before_upload); execute_cloud_publish_transfer_and_success_prompt(app, save_before_upload);
} }
void launch_cloud_publish_thread(App& app, bool save_before_upload)
{
std::thread([app = &app, save_before_upload] {
execute_cloud_publish_worker(*app, save_before_upload);
}).detach();
}
void wire_cloud_publish_prompt_buttons( void wire_cloud_publish_prompt_buttons(
const std::shared_ptr<NodeMessageBox>& dialog, const std::shared_ptr<NodeMessageBox>& dialog,
std::function<void()> upload_thread) std::function<void()> upload_thread)
{ {
dialog->btn_ok->on_click = [dialog, upload_thread](Node*) { dialog->btn_ok->on_click = [dialog, upload_thread](Node*) {
std::thread(upload_thread).detach(); upload_thread();
pp::panopainter::close_legacy_dialog_node(*dialog); pp::panopainter::close_legacy_dialog_node(*dialog);
}; };
dialog->btn_cancel->on_click = [dialog](Node*) { dialog->btn_cancel->on_click = [dialog](Node*) {
@@ -263,13 +270,11 @@ void wire_cloud_publish_prompt_buttons(
void show_cloud_publish_prompt(App& app, bool save_before_upload) void show_cloud_publish_prompt(App& app, bool save_before_upload)
{ {
auto upload_thread = [&app, save_before_upload] {
execute_cloud_publish_worker(app, save_before_upload);
};
const auto prompt_plan = pp::app::plan_cloud_publish_prompt(); const auto prompt_plan = pp::app::plan_cloud_publish_prompt();
auto dialog = app.message_box(prompt_plan.title, prompt_plan.message, prompt_plan.show_cancel); auto dialog = app.message_box(prompt_plan.title, prompt_plan.message, prompt_plan.show_cancel);
wire_cloud_publish_prompt_buttons(dialog, upload_thread); wire_cloud_publish_prompt_buttons(dialog, [&app, save_before_upload] {
launch_cloud_publish_thread(app, save_before_upload);
});
} }
std::shared_ptr<NodeProgressBar> create_cloud_bulk_upload_progress( std::shared_ptr<NodeProgressBar> create_cloud_bulk_upload_progress(