Extract downloaded project reconcile helper

This commit is contained in:
2026-06-15 21:51:17 +02:00
parent 143d21b433
commit 69603ed6c9
3 changed files with 20 additions and 3 deletions

View File

@@ -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 downloaded-
project open, layer refresh, and action-history reset in
`execute_legacy_downloaded_project_open()` now route through a focused
helper in `src/legacy_document_open_services.cpp` instead of living inline
in the document-open bridge; 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 publish
prompt setup in `show_cloud_publish_prompt()` now routes through a focused
helper in `src/legacy_cloud_services.cpp` instead of living inline in the

View File

@@ -104,6 +104,11 @@ Retained save-before-upload execution now also routes through
directly, so the remaining cloud debt is further concentrated on
prompt/progress lifetime, OpenGL context guarding, downloaded-project open,
layer refresh, and action-history reset.
Retained cloud downloaded-project open, layer refresh, and action-history
reset in `execute_legacy_downloaded_project_open()` now also route through a
focused helper in `src/legacy_document_open_services.*`, so the remaining
cloud bridge debt is further concentrated on prompt/progress lifetime, OpenGL
context guarding, and the still-retained transfer-thread execution model.
Retained cloud downloaded-project post-open reconciliation now also routes
through `src/legacy_document_open_services.*` instead of living inline in
`src/legacy_cloud_services.cpp`, so the remaining cloud bridge debt is further

View File

@@ -71,6 +71,13 @@ void open_legacy_project(App& app, const pp::app::DocumentOpenRoute& route)
}
}
void reconcile_downloaded_project_open(App& app)
{
for (auto& layer : app.canvas->m_canvas->m_layers)
app.layers->add_layer(layer->m_name.c_str(), false);
ActionManager::clear();
}
class LegacyDocumentOpenServices final : public pp::app::DocumentOpenServices {
public:
explicit LegacyDocumentOpenServices(App& app) noexcept
@@ -155,9 +162,7 @@ void execute_legacy_downloaded_project_open(
app.doc_name = std::string(name);
app.title_update();
for (auto& layer : app.canvas->m_canvas->m_layers)
app.layers->add_layer(layer->m_name.c_str(), false);
ActionManager::clear();
reconcile_downloaded_project_open(app);
}
} // namespace pp::panopainter