Extract cloud browser file-list request helper
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -114,6 +114,11 @@ The initial cloud-browser loading placeholder setup in
|
|||||||
helper in `src/node_dialog_cloud.*`, so the remaining cloud bridge debt is
|
helper in `src/node_dialog_cloud.*`, so the remaining cloud bridge debt is
|
||||||
further concentrated on prompt/progress lifetime, OpenGL context guarding,
|
further concentrated on prompt/progress lifetime, OpenGL context guarding,
|
||||||
`NodeDialogCloud` network/thumbnail execution, and transfer-thread execution.
|
`NodeDialogCloud` network/thumbnail execution, and transfer-thread execution.
|
||||||
|
The cloud-browser file-list request/response handling 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` 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
|
||||||
|
|||||||
@@ -589,6 +589,42 @@ Completed Task Log:
|
|||||||
| --- | --- | ---: | --- | --- |
|
| --- | --- | ---: | --- | --- |
|
||||||
| 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` | `e9db32f2` |
|
| 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` | `e9db32f2` |
|
||||||
|
|
||||||
|
### ADP-015 - Extract Cloud Browser File-List Request 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 file-list
|
||||||
|
request/response handling into a focused helper while preserving current
|
||||||
|
behavior.
|
||||||
|
|
||||||
|
Done Checks:
|
||||||
|
|
||||||
|
- The cloud-list request/response handling no longer lives inline in
|
||||||
|
`NodeDialogCloud::load_thumbs_thread()`.
|
||||||
|
- The retained cloud-browser file-list request 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-015 | 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 |
|
||||||
|
|||||||
@@ -59,6 +59,25 @@ NodeText* NodeDialogCloud::create_loading_status_text()
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NodeDialogCloud::load_cloud_file_list(CURL* curl, std::string& response, NodeText& status_text)
|
||||||
|
{
|
||||||
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_data_handler);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "https://panopainter.com/cloud/cloud-list.php");
|
||||||
|
if (pp::platform::default_disables_network_tls_verification())
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||||
|
|
||||||
|
const auto err = curl_easy_perform(curl);
|
||||||
|
if (err != CURLE_OK)
|
||||||
|
{
|
||||||
|
LOG("connection error: %d", err);
|
||||||
|
status_text.set_text("Could not connect to the server");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void NodeDialogCloud::load_thumbs_thread()
|
void NodeDialogCloud::load_thumbs_thread()
|
||||||
{
|
{
|
||||||
#if WITH_CURL
|
#if WITH_CURL
|
||||||
@@ -70,17 +89,8 @@ void NodeDialogCloud::load_thumbs_thread()
|
|||||||
auto* text = create_loading_status_text();
|
auto* text = create_loading_status_text();
|
||||||
auto* align = text->m_parent;
|
auto* align = text->m_parent;
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &res);
|
if (!load_cloud_file_list(curl, res, *text))
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_data_handler);
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "https://panopainter.com/cloud/cloud-list.php");
|
|
||||||
if (pp::platform::default_disables_network_tls_verification())
|
|
||||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
|
||||||
auto err = curl_easy_perform(curl);
|
|
||||||
|
|
||||||
if (err != CURLE_OK)
|
|
||||||
{
|
{
|
||||||
LOG("connection error: %d", err);
|
|
||||||
text->set_text("Could not connect to the server");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,4 +46,5 @@ public:
|
|||||||
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();
|
NodeText* create_loading_status_text();
|
||||||
|
bool load_cloud_file_list(CURL* curl, std::string& response, NodeText& status_text);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user