Ariver
2026-06-13 597c5e5e13d9185d23329c020829df4b128a82a4
Fix outside blank tag removal drop
2 files modified
38 ■■■■■ changed files
src/Apptag/AppGridCollectionView.swift 10 ●●●●● patch | view | raw | blame | history
src/Scripts/app_ordering_data_qa.sh 28 ●●●●● patch | view | raw | blame | history
src/Apptag/AppGridCollectionView.swift
@@ -282,10 +282,16 @@
                if activeReorderCard === card {
                    activeReorderCard = nil
                }
                if lastReorderContainerID == card.containerID {
                    lastReorderContainerID = ""
                    lastReorderScreenFrame = nil
                }
                return
            }
            activeReorderCard?.clearReorderInsertion()
            activeReorderCard = nil
            lastReorderContainerID = ""
            lastReorderScreenFrame = nil
        }
        fileprivate func activeReorderPath(in containerID: String, copy: Bool) -> String? {
@@ -308,7 +314,8 @@
                  let lastReorderScreenFrame
            else { return false }
            return lastReorderScreenFrame.insetBy(dx: -44, dy: -44).contains(screenPoint)
            let guardOutset = AppGridCollectionMetrics.reorderEmptyDropCancelOutset
            return lastReorderScreenFrame.insetBy(dx: -guardOutset, dy: -guardOutset).contains(screenPoint)
        }
        private static func signature(
@@ -860,6 +867,7 @@
    static let headerBottomGap: CGFloat = 6
    static let iconColumnGap: CGFloat = 6
    static let iconRowGap: CGFloat = 2
    static let reorderEmptyDropCancelOutset: CGFloat = 4
    static let hoverScale: CGFloat = 1.22
    static let labelHeight: CGFloat = 14
src/Scripts/app_ordering_data_qa.sh
@@ -105,6 +105,11 @@
    "AppGridGroupCardView.performDrop(path:source:sourceContainerID:copy:)",
    app_grid_text,
)
clear_reorder_insertion_func = extract_braced_block(
    r"\bfileprivate\s+func\s+clearReorderInsertion\s*\(",
    "Coordinator.clearReorderInsertion(card:)",
    app_grid_text,
)
require(
    r"\bvar\s+containerAppOrder\s*:\s*\[String\s*:\s*\[String\]\]\s*=\s*\[:\]",
@@ -246,6 +251,29 @@
    app_grid_text,
)
require(
    r"\bstatic\s+let\s+reorderEmptyDropCancelOutset\s*:\s*CGFloat\s*=\s*[0-9.]+",
    "AppGrid must name and centralize the tiny near-edge empty-drop cancel tolerance",
    app_grid_text,
)
near_edge_match = re.search(
    r"\bstatic\s+let\s+reorderEmptyDropCancelOutset\s*:\s*CGFloat\s*=\s*([0-9.]+)",
    app_grid_text,
)
if not near_edge_match or float(near_edge_match.group(1)) > 8:
    fail("near-edge empty-drop cancel tolerance must stay below the 16px card gap so real outside blank drops remove tags")
if re.search(r"insetBy\s*\(\s*dx\s*:\s*-44\s*,\s*dy\s*:\s*-44\s*\)", app_grid_text):
    fail("AppGrid must not restore the old 44px empty-drop cancel zone that swallows real outside blank drops")
require(
    r"insetBy\s*\(\s*dx\s*:\s*-guardOutset\s*,\s*dy\s*:\s*-guardOutset\s*\)",
    "AppGrid shouldCancelEmptyDropForActiveReorder must use the bounded near-edge tolerance",
    app_grid_text,
)
require(
    r"if\s+lastReorderContainerID\s*==\s*card\.containerID\s*\{(?:(?!\n\s*\}).)*lastReorderContainerID\s*=\s*\"\"(?:(?!\n\s*\}).)*lastReorderScreenFrame\s*=\s*nil",
    "AppGrid must clear stale reorder frame when leaving the source card so outside blank drops can remove tags",
    clear_reorder_insertion_func,
)
require(
    r"if\s+sourceContainerID\s*==\s*group\.containerID\s*\{",
    "AppGrid same-container drops, including no-op and Option drops, must be swallowed before cross-container move/copy logic",
    app_grid_perform_drop_func,