Extract cloud download transfer helper
This commit is contained in:
@@ -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 download
|
||||||
|
URL construction and progress-callback wiring in
|
||||||
|
`execute_cloud_download_thread()` now routes through a focused helper in
|
||||||
|
`src/legacy_cloud_services.cpp` instead of living inline in the retained
|
||||||
|
worker 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 download
|
- 2026-06-15: `DEBT-0038` was narrowed again. The retained cloud download
|
||||||
progress-dialog creation path in `execute_cloud_download_thread()` now
|
progress-dialog creation path in `execute_cloud_download_thread()` now
|
||||||
routes through a focused helper in `src/legacy_cloud_services.cpp` instead
|
routes through a focused helper in `src/legacy_cloud_services.cpp` instead
|
||||||
|
|||||||
@@ -187,6 +187,11 @@ The retained cloud download progress-dialog creation path 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 download URL construction and progress-callback wiring in
|
||||||
|
`execute_cloud_download_thread()` 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
|
||||||
|
|||||||
@@ -1090,6 +1090,39 @@ Completed Task Log:
|
|||||||
| Date | Task | Score | Validation | Commit |
|
| Date | Task | Score | Validation | Commit |
|
||||||
| --- | --- | ---: | --- | --- |
|
| --- | --- | ---: | --- | --- |
|
||||||
| 2026-06-15 | ADP-028 | 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` | `e993fa48` |
|
| 2026-06-15 | ADP-028 | 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` | `e993fa48` |
|
||||||
|
|
||||||
|
### ADP-029 - Extract Cloud Download Transfer Helper
|
||||||
|
|
||||||
|
Status: Done
|
||||||
|
Score: no score movement
|
||||||
|
Debt: `DEBT-0038`
|
||||||
|
Scope: `src/legacy_cloud_services.cpp` only
|
||||||
|
|
||||||
|
Goal:
|
||||||
|
|
||||||
|
Reduce the inline retained cloud download URL/progress wiring surface by
|
||||||
|
extracting the transfer call path from `execute_cloud_download_thread()` into a
|
||||||
|
focused helper while preserving current behavior.
|
||||||
|
|
||||||
|
Done Checks:
|
||||||
|
|
||||||
|
- The retained cloud download URL/progress wiring no longer lives inline in
|
||||||
|
`execute_cloud_download_thread()`.
|
||||||
|
- The retained cloud download URL/progress wiring 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
|
||||||
|
|||||||
@@ -70,6 +70,12 @@ void handle_cloud_upload_transfer_result(CURLcode err, const std::string& res)
|
|||||||
std::cout << "\n\nUPLOAD RESULT\n" << res << "\n\n\n";
|
std::cout << "\n\nUPLOAD RESULT\n" << res << "\n\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void execute_cloud_download_transfer(
|
||||||
|
App& app,
|
||||||
|
std::string url,
|
||||||
|
std::string dest_filepath,
|
||||||
|
std::function<void(float)> progress);
|
||||||
|
|
||||||
std::shared_ptr<NodeMessageBox> create_cloud_download_progress_dialog(App& app)
|
std::shared_ptr<NodeMessageBox> create_cloud_download_progress_dialog(App& app)
|
||||||
{
|
{
|
||||||
return pp::panopainter::create_legacy_app_message_dialog(
|
return pp::panopainter::create_legacy_app_message_dialog(
|
||||||
@@ -77,6 +83,18 @@ std::shared_ptr<NodeMessageBox> create_cloud_download_progress_dialog(App& app)
|
|||||||
pp::app::plan_cloud_download_progress_prompt());
|
pp::app::plan_cloud_download_progress_prompt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void execute_cloud_download_transfer_with_progress_dialog(
|
||||||
|
App& app,
|
||||||
|
const pp::app::CloudDownloadRequest& request,
|
||||||
|
const std::shared_ptr<NodeMessageBox>& dialog)
|
||||||
|
{
|
||||||
|
const std::string url = "https://panopainter.com/cloud/cloud-dwl.php?file=" + request.selected_file;
|
||||||
|
execute_cloud_download_transfer(app, url, request.selected_path, [dialog](float p) {
|
||||||
|
const auto progress = pp::app::format_cloud_download_progress_message(p);
|
||||||
|
dialog->m_message->set_text(progress.c_str());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void execute_cloud_download_transfer(
|
void execute_cloud_download_transfer(
|
||||||
App& app,
|
App& app,
|
||||||
std::string url,
|
std::string url,
|
||||||
@@ -171,11 +189,7 @@ void execute_cloud_download_thread(
|
|||||||
BT_SetTerminate();
|
BT_SetTerminate();
|
||||||
|
|
||||||
auto m = create_cloud_download_progress_dialog(app);
|
auto m = create_cloud_download_progress_dialog(app);
|
||||||
std::string url = "https://panopainter.com/cloud/cloud-dwl.php?file=" + request.selected_file;
|
execute_cloud_download_transfer_with_progress_dialog(app, request, m);
|
||||||
execute_cloud_download_transfer(app, url, request.selected_path, [m](float p) {
|
|
||||||
const auto progress = pp::app::format_cloud_download_progress_message(p);
|
|
||||||
m->m_message->set_text(progress.c_str());
|
|
||||||
});
|
|
||||||
|
|
||||||
execute_legacy_downloaded_project_open(app, request.selected_path, request.selected_name);
|
execute_legacy_downloaded_project_open(app, request.selected_path, request.selected_name);
|
||||||
pp::panopainter::close_legacy_dialog_node(*m);
|
pp::panopainter::close_legacy_dialog_node(*m);
|
||||||
|
|||||||
Reference in New Issue
Block a user