# NewEditor XCUIEditorLib Retirement Plan Date: `2026-04-22` Status: `Completed` ## Goal - Remove `XCUIEditorLib` as a first-class build target from `new_editor`. - Stop treating `new_editor/include + new_editor/src` as a separately promoted module-layer library in the current product build. - Flatten the current XCUI shared sources directly back into `XCUIEditorApp`, so the build graph matches the actual product shape. ## Why The Previous Plan Was Deleted - The deleted plan assumed `XCUIEditorLib` should keep growing into a formal editor module layer. - That premise conflicts with the current architecture direction and with the explicit requirement that this extra lib layer should not continue to exist. - Continuing to move logic into `XCUIEditorLib` would deepen the wrong boundary instead of removing it. ## Current Reality - `XCUIEditorLib` is only defined in `new_editor/CMakeLists.txt`. - `XCUIEditorApp` is the only active build target that links it. - The current source lists are already centralized in one file, so removing the lib layer is mainly a build-graph flattening task, not a source-tree migration task. ## Constraints - Do not introduce a renamed replacement library target. - Do not replace `XCUIEditorLib` with another fake public layer. - Do not move app business sources into `new_editor/src`. - Do not split this into new glue targets just to preserve the old layering narrative. - Keep the active executable target as `XCUIEditorApp`. ## Execution Plan ### Phase A. Remove The Wrong Plan Baseline Status: `Completed` Target: - Delete the invalid `XCUIEditorLib`-promotion plan from `docs/plan`. - Replace it with a retirement plan that matches the actual desired direction. Validation: - `docs/plan` no longer contains the deleted plan. - The active plan explicitly treats `XCUIEditorLib` as a retirement target, not a destination layer. ### Phase B. Flatten XCUIEditorLib Into XCUIEditorApp Status: `Completed` Target: - Remove the `add_library(XCUIEditorLib ...)` target. - Compile the same `include/src` source set directly as part of `XCUIEditorApp`. - Move any target-local include paths or compile settings required by those sources onto `XCUIEditorApp`. - Remove the executable link dependency on `XCUIEditorLib`. - Clean up stale post-build visible lib artifacts if needed. Validation: - `new_editor/CMakeLists.txt` no longer defines `XCUIEditorLib`. - `XCUIEditorApp` directly owns the old XCUI shared source set. - `XCUIEditorApp` no longer links `XCUIEditorLib`. ### Phase C. Reconfigure, Build, Smoke Status: `Completed` Target: - Reconfigure `build/new_editor`. - Build `XCUIEditorApp`. - Launch `build/new_editor/Debug/XCUIEditor.exe` for a short smoke run. Validation: - Configure succeeds. - Build reaches `XCUIEditorApp`. - Smoke log contains: - `EnsureEditorStartupScene loaded scene=Main Scene` - `[app] initialize end` - `[app] shutdown end` ## Acceptance - `XCUIEditorLib` is no longer an active build target in `new_editor/CMakeLists.txt`. - `XCUIEditorApp` becomes the direct owner of the former XCUI shared source set. - No replacement fake public lib target is introduced. - The active plan no longer frames `XCUIEditorLib` as a future architecture destination.