Extract cloud browser loading placeholder helper

This commit is contained in:
2026-06-15 20:37:28 +02:00
parent 217702b6be
commit e9db32f274
5 changed files with 64 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@@ -109,6 +109,11 @@ through `src/legacy_document_open_services.*` instead of living inline in
`src/legacy_cloud_services.cpp`, so the remaining cloud bridge debt is further `src/legacy_cloud_services.cpp`, so the remaining cloud bridge debt is further
concentrated on prompt/progress lifetime, OpenGL context guarding, concentrated on prompt/progress lifetime, OpenGL context guarding,
`NodeDialogCloud`, and transfer-thread execution. `NodeDialogCloud`, and transfer-thread execution.
The initial cloud-browser loading placeholder setup in
`NodeDialogCloud::load_thumbs_thread()` now also routes through a focused
helper in `src/node_dialog_cloud.*`, so the remaining cloud bridge debt is
further concentrated on prompt/progress lifetime, OpenGL context guarding,
`NodeDialogCloud` network/thumbnail execution, and transfer-thread execution.
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

@@ -554,6 +554,41 @@ Completed Task Log:
| --- | --- | ---: | --- | --- | | --- | --- | ---: | --- | --- |
| 2026-06-15 | ADP-013 | no score movement | `ctest --preset desktop-fast --build-config Debug -R "pp_app_core_document_cloud" --output-on-failure`; `MSBuild.exe out\build\windows-msvc-default\panopainter_app.vcxproj /p:Configuration=Debug /p:Platform=x64` | `80533fae` | | 2026-06-15 | ADP-013 | no score movement | `ctest --preset desktop-fast --build-config Debug -R "pp_app_core_document_cloud" --output-on-failure`; `MSBuild.exe out\build\windows-msvc-default\panopainter_app.vcxproj /p:Configuration=Debug /p:Platform=x64` | `80533fae` |
### ADP-014 - Extract Cloud Browser Loading Placeholder Helper
Status: Done
Score: no score movement
Debt: `DEBT-0038`
Scope: `src/node_dialog_cloud.*` only
Goal:
Reduce the inline retained cloud-browser loader surface in
`NodeDialogCloud::load_thumbs_thread()` by extracting the initial loading
placeholder setup into a focused helper while preserving current behavior.
Done Checks:
- The initial loading placeholder setup no longer lives inline in
`NodeDialogCloud::load_thumbs_thread()`.
- The retained cloud-browser loading placeholder now routes through a focused
helper in `src/node_dialog_cloud.*`.
- `DEBT-0038` and the roadmap note the reduced remaining `NodeDialogCloud`
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-014 | 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

@@ -46,6 +46,19 @@ void NodeDialogCloud::removed(Node* parent)
closed = true; closed = true;
} }
NodeText* NodeDialogCloud::create_loading_status_text()
{
auto* align = container->add_child<Node>();
align->SetWidthP(100.f);
align->SetHeightP(100.f);
align->SetAlign(YGAlignCenter);
align->SetJustify(YGJustifyCenter);
auto* text = align->add_child<NodeText>();
text->set_font_size(30);
text->set_text("Connecting to the server...");
return text;
}
void NodeDialogCloud::load_thumbs_thread() void NodeDialogCloud::load_thumbs_thread()
{ {
#if WITH_CURL #if WITH_CURL
@@ -54,14 +67,8 @@ void NodeDialogCloud::load_thumbs_thread()
std::string res; std::string res;
if (curl) if (curl)
{ {
auto* align = container->add_child<Node>(); auto* text = create_loading_status_text();
align->SetWidthP(100.f); auto* align = text->m_parent;
align->SetHeightP(100.f);
align->SetAlign(YGAlignCenter);
align->SetJustify(YGJustifyCenter);
auto* text = align->add_child<NodeText>();
text->set_font_size(30);
text->set_text("Connecting to the server...");
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &res); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &res);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_data_handler); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_data_handler);

View File

@@ -45,4 +45,5 @@ public:
virtual void loaded() override; virtual void loaded() override;
virtual void removed(Node* parent) override; virtual void removed(Node* parent) override;
void load_thumbs_thread(); void load_thumbs_thread();
NodeText* create_loading_status_text();
}; };