Move cloud browser dialog to checked overlay lifetime

This commit is contained in:
2026-06-15 19:55:30 +02:00
parent ec71575b5d
commit 5bf0a4f61b
6 changed files with 60 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@@ -77,6 +77,11 @@ The same checked-overlay seam now also owns main-toolbar settings dialog
opening from `src/legacy_app_shell_services.cpp`, removing another raw
app-owned dialog insertion path while leaving the remaining retained dialog
families debt-tracked.
The cloud browser dialog now also opens through that seam from
`src/legacy_cloud_services.cpp`, so the remaining cloud modernization debt is
now concentrated in retained background worker threads, transfer helpers,
project-open refresh, and dialog-internal legacy behavior instead of raw root
insertion.
Recent 2026-06-13 retained preview reductions continue to narrow DEBT-0036:
`NodeStrokePreview::draw_stroke_immediate()` now also routes

View File

@@ -34,11 +34,11 @@ auditable steps rather than by subjective estimates.
| Build and CMake ownership | 15 | 13 | Root CMake owns active source lists, app/tool targets, and retained package entrypoints. |
| Test and automation coverage | 15 | 9 | Headless, platform, package, and focused validation commands exist and are current. |
| Pure component behavior ownership | 15 | 8 | Behavior lives in `pp_*` components and is consumed by live adapters. |
| Legacy adapter retirement | 20 | 11 | `legacy_*_services` and singleton bridges are deleted or reduced to trivial composition. |
| Legacy adapter retirement | 20 | 12 | `legacy_*_services` and singleton bridges are deleted or reduced to trivial composition. |
| Renderer boundary and OpenGL parity | 15 | 11 | Live render/export/readback paths execute through renderer interfaces with parity checks. |
| Platform and package parity | 10 | 8 | Required platforms have root CMake/package validation and injected platform services. |
| Hardening and future backend readiness | 10 | 4 | Edge, fuzz, golden, stress, and backend-lab gates exist for high-risk paths. |
| **Total** | **100** | **65** | Only completed tasks below may change this number. |
| **Total** | **100** | **66** | Only completed tasks below may change this number. |
When updating `Current`, add a dated note under "Completed Task Log" with the
task id, points moved, validation command, and commit hash.
@@ -332,6 +332,36 @@ ctest --preset desktop-fast --build-config Debug -R "pp_app_core_app_dialog|pp_u
cmake --build --preset windows-msvc-default --config Debug --target PanoPainter
```
### ADP-008 - Move Cloud Browser Dialog To Checked Overlay Lifetime
Status: Done
Score: +1 legacy adapter retirement
Debt: `DEBT-0038`, `DEBT-0063`
Scope: `src/legacy_cloud_services.cpp`, `src/legacy_ui_overlay_services.*`,
cloud browser dialog path only
Goal:
Move the cloud browser dialog opening path off raw
`layout[main_id]->add_child(...)` ownership so the retained cloud browser node
participates in the same checked overlay lifetime seam already used by other
app-owned dialogs.
Done Checks:
- Cloud browser open/close behavior stays unchanged for the live adapter path.
- `LegacyCloudServices::show_browser()` now opens through
`src/legacy_ui_overlay_services.*` instead of direct raw child insertion.
- `DEBT-0038` and `DEBT-0063` describe the reduced dialog-lifetime surface and
the remaining cloud/retained UI work.
Validation:
```powershell
ctest --preset desktop-fast --build-config Debug -R "pp_app_core_document_cloud|pp_ui_core_node_lifetime|pp_ui_core_overlay_lifetime" --output-on-failure
cmake --build --preset windows-msvc-default --config Debug --target PanoPainter
```
Completed Task Log:
| Date | Task | Score | Validation | Commit |

View File

@@ -95,13 +95,7 @@ public:
void show_browser() override
{
auto dialog = std::make_shared<NodeDialogCloud>();
dialog->set_manager(&app_.layout);
dialog->init();
dialog->create();
dialog->loaded();
app_.layout[app_.main_id]->add_child(dialog);
auto dialog = pp::panopainter::create_legacy_cloud_browser_dialog_overlay(app_);
auto* app = &app_;
dialog->btn_ok->on_click = [app, dialog](Node*) {

View File

@@ -5,6 +5,7 @@
#include "node.h"
#include "node_input_box.h"
#include "node_message_box.h"
#include "node_dialog_cloud.h"
#include "node_popup_menu.h"
#include "node_progress_bar.h"
#include "node_settings.h"
@@ -380,4 +381,12 @@ std::shared_ptr<NodeSettings> create_legacy_settings_dialog_overlay(
return settings;
}
std::shared_ptr<NodeDialogCloud> create_legacy_cloud_browser_dialog_overlay(
App& app)
{
auto dialog = make_legacy_overlay_node<NodeDialogCloud>(app);
attach_legacy_app_overlay_with_handle_or_fallback(app, dialog);
return dialog;
}
} // namespace pp::panopainter

View File

@@ -16,6 +16,7 @@ class NodeMessageBox;
class NodePopupMenu;
class NodeProgressBar;
class NodeSettings;
class NodeDialogCloud;
namespace pp::panopainter {
@@ -158,6 +159,9 @@ void close_legacy_popup_panel(
[[nodiscard]] std::shared_ptr<NodeSettings> create_legacy_settings_dialog_overlay(
App& app);
[[nodiscard]] std::shared_ptr<NodeDialogCloud> create_legacy_cloud_browser_dialog_overlay(
App& app);
template <class T>
std::shared_ptr<T> make_legacy_overlay_node(App& app)
{