# Behavior Delete implementation handoff — 2026-09-12 Frozen candidate in `C:/Users/User/Documents/Git/ARCADIA-Studio/.local/behavior-delete-20260912`, branch `codex/behavior-delete-956atf-20260912`, base `dc1506f`. Files are uncommitted in isolated worktree; no git/index mutations. Parent owns integration, executable verification, review, specification and publication. No Cargo/rustc/native/WSL/Gitea operations were run by worker. ## Behavior and API - `topology::CanvasEvent::Remove(Context, Id)` and `scenario::CanvasEvent::Remove(Context, Id)` carry captured occurrence/link identity and existing document/owner/revision/epoch context. Their context() matches include Remove. - Child canvas accepts nonrepeating plain or Shift Delete only in editable Select mode with no source/press. Eligibility uses visible production node/edge or scenario box/line records. Existing real Focusable Viewport gates keyboard delivery, so cursor need not remain inside after focus was acquired. - App dispatch revalidates current context, selection, clean/modal state, owner membership, Select tool and current production projection eligibility. Qualified process preview selection is refused with instruction to open the definition or select the outer reference. The outer reference is never silently substituted for the highlighted qualified child. - `topology::State::{selecting,removal_target,has_qualified_selection}` and `scenario::removal_target` are crate-visible validation helpers. A cfg(test) production geometry probe in topology::State and scenario supplies actual rendered coordinates for pointer tests; it does not seed focus, selection or gestures. Scenario test fixture visibility is widened from pub(super) to pub(crate) under cfg(test). - `diagram_removal::Confirmation` adds `behavior_owner: Option`; begin captures derived owner after modal epoch retirement, confirm requires same owner. Derived process/scenario placement is normalized to None in request, capture and confirmation validation. Existing `begin_model_delete_target(object, canvas)` semantic-target fix remains intact, including actual selected placement ID in Confirmation.selection. - `diagram_removal::explanation(app, captured_object) -> &'static str` provides accurate semantic text for process links, lifelines, occurrences and fragment/branch removal. PARENT MUST WIRE IT into views.rs confirmation paragraph using `target.snapshot.request.object`, keeping existing captured target name/impact list. It is intentionally unused until that integration, so standalone worker compilation may produce its dead_code warning. - Existing Actions menu advertises Delete / Shift+Delete only for eligible derived Select-mode target. No placement storage, domain command or schema changes. All confirmed removals still call ordinary App execute(Command::Delete(id)). - Viewport adds `focus_pending` keyboard-admission flag. Tab/F6/Escape retire admission immediately within an Iced event batch while preserving the real focus witness for queued traversal. Actual focus/unfocus operations clear it; pointer/window/disabled boundaries reset it. While middle/space pan remains held, semantic keyboard events are not forwarded to child. This prevents same-batch traversal/Delete and held-pan/Delete from reaching a stale selected occurrence. Existing camera control event semantics remain unchanged. ## Tests added `app::behavior_removal_tests` has eight mounted production-App tests (parameterized across relevant alternatives): 1. OA process / SA chain occurrence and persisted link deletion: actual pointer, release then Delete without redraw, captured confirmation, reusable work/exchange preservation, incident link removal, exact source/model consistency and Undo/Redo. 2. Scenario message / lifeline deletion: referenced targets preserved; participant deletion retains messages while clearing participant references; exact Undo/source. 3. Scenario use deletion: reusable definition and second use preserved; cancel/token replay and same-selection different-active-owner confirmation rejection. 4. Process/scenario same-batch Tab/F6/Escape then Delete, window loss and fresh pointer reacquisition. 5. Process/scenario clean actual text focus via real widget operation and Ctrl/Alt/Logo refusal. 6. Scenario fragment / branch deletion: exact owned descendants removed, unrelated occurrences/definitions retained, source and Undo. 7. Actual qualified process preview click then Delete refusal; fresh outer-reference selection deletes only that use and preserves second use/definition; source and Undo. 8. Process/scenario held-middle-pan Delete refusal and stale emitted removal context rejection. Validation performed: scoped rustfmt with edition 2024 and skip_children=true succeeded; git diff --check succeeded. Executable tests and native workflow inspection NOT run. Parent should run targeted `app::behavior_removal_tests`, existing canvas_workspace focus/camera suite, existing topology/scenario mounted suites, and architecture/state diagram-removal tests after integrating all changes. Test geometry/fixture assumptions await execution; no worker claim of passing behavior. Remaining acceptance gaps for parent or review: repeated-key test, explicit armed tool/reconnect/reorder tests, contextual-link deletion and legacy implied connector refusal, direct click/Tab into specific Inspector/source fields, actual rendered confirmation prose, native GUI recovery/keyboard usability. Existing production eligibility and gesture gates cover these in source, but source review is not runtime evidence. Existing architecture/state tests were not edited. No views.rs, docs, core schema, allocation or diagram/focus.rs changes. ## Frozen SHA256 files 942804877D59B7490888B04178A436BE0186D89DEDA8036ACCCCC992D52A99FD crates/oa-desktop/src/app.rs E60C6654EE1EACA33F7B654CB70D6A0C4BC7A62A4AE60D33DCB2F5EB4E6FA35E crates/oa-desktop/src/app/diagram_removal.rs 7259F093BED5CB7AA00CE39E45204A62C7CE248A00043E912CB3E186B2351365 crates/oa-desktop/src/app/process_canvas.rs A5A576A0600F212F4A7B93A180D5524C103083EEF179340D59F02D033BA56884 crates/oa-desktop/src/app/behavior_removal_tests.rs 465D8CFAD58F5A35D30CD2856D024E75821DD291D74A04A98132A98C53FD85B5 crates/oa-desktop/src/behavior.rs 2931F472194D15B98C43D94A3A93AC036AFD0C77914F964428C897D67C309696 crates/oa-desktop/src/behavior/canvas_workspace/viewport.rs 08EBBBEE81D1DE36CAAEA08C0E2D86F08B9C595FEF160E990E829E4D85A520FC crates/oa-desktop/src/behavior/scenario.rs 261E27F50DD1E32687E113FFD29A1CB5AE4421628E0AEF3ABD17A77AC180597C crates/oa-desktop/src/behavior/topology/direct.rs D2F836661F43FA1BC8830B1E51CC736948B3D261796C3FA877DF02AE15568C4B crates/oa-desktop/src/model_menu.rs