Extract cloud bulk upload loop helper
This commit is contained in:
@@ -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 bulk-upload
|
||||
per-file execution loop in `LegacyCloudServices::upload_all_bulk_files()`
|
||||
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
|
||||
progress lifetime wiring in `LegacyCloudServices::begin_bulk_upload()` and
|
||||
`end_bulk_upload()` now routes through focused helpers in
|
||||
|
||||
@@ -155,6 +155,12 @@ 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.
|
||||
The retained cloud bulk-upload per-file execution loop in
|
||||
`LegacyCloudServices::upload_all_bulk_files()` 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
|
||||
|
||||
@@ -873,6 +873,41 @@ Completed Task Log:
|
||||
| --- | --- | ---: | --- | --- |
|
||||
| 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` | `df2c6783` |
|
||||
|
||||
### ADP-023 - Extract Cloud Bulk Upload Loop Helper
|
||||
|
||||
Status: Done
|
||||
Score: no score movement
|
||||
Debt: `DEBT-0038`
|
||||
Scope: `src/legacy_cloud_services.cpp` only
|
||||
|
||||
Goal:
|
||||
|
||||
Reduce the inline retained cloud bulk-upload execution surface by extracting
|
||||
the per-file upload loop from `LegacyCloudServices::upload_all_bulk_files()`
|
||||
into a focused helper while preserving current behavior.
|
||||
|
||||
Done Checks:
|
||||
|
||||
- The retained cloud bulk-upload per-file loop no longer lives inline in
|
||||
`LegacyCloudServices::upload_all_bulk_files()`.
|
||||
- The retained bulk-upload execution 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-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` | `(pending)` |
|
||||
|
||||
Completed Task Log:
|
||||
|
||||
| Date | Task | Score | Validation | Commit |
|
||||
|
||||
@@ -218,6 +218,23 @@ std::shared_ptr<NodeProgressBar> create_cloud_bulk_upload_progress(
|
||||
return app.show_progress(progress_plan.title, progress_plan.total);
|
||||
}
|
||||
|
||||
void execute_cloud_bulk_upload_files(
|
||||
App& app,
|
||||
const std::vector<std::string>& names,
|
||||
const std::shared_ptr<NodeProgressBar>& bulk_progress)
|
||||
{
|
||||
[[maybe_unused]] gl_state gl;
|
||||
for (const auto& n : names)
|
||||
{
|
||||
std::string path = app.data_path + "/" + n;
|
||||
execute_cloud_upload_transfer(app, path, std::string(), std::function<void(float)> {});
|
||||
|
||||
if (bulk_progress) {
|
||||
bulk_progress->increment();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void close_cloud_bulk_upload_progress(std::shared_ptr<NodeProgressBar>& progress)
|
||||
{
|
||||
if (progress) {
|
||||
@@ -275,16 +292,7 @@ public:
|
||||
void upload_all_bulk_files() override
|
||||
{
|
||||
auto names = Asset::list_files(app_.data_path, ".*\\.ppi");
|
||||
[[maybe_unused]] gl_state gl;
|
||||
for (const auto& n : names)
|
||||
{
|
||||
std::string path = app_.data_path + "/" + n;
|
||||
execute_cloud_upload_transfer(app_, path, std::string(), std::function<void(float)> {});
|
||||
|
||||
if (bulk_progress_) {
|
||||
bulk_progress_->increment();
|
||||
}
|
||||
}
|
||||
execute_cloud_bulk_upload_files(app_, names, bulk_progress_);
|
||||
}
|
||||
|
||||
void end_bulk_upload() override
|
||||
|
||||
Reference in New Issue
Block a user