Frontmatter
| id | 8160 |
| title | Decouple and Configure Window Detachment Thresholds in SortZone |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Dec 27, 2025, 10:00 PM |
| updatedAt | Mar 30, 2026, 1:32 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8160 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | 8163 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 30, 2026, 1:32 PM |
Decouple and Configure Window Detachment Thresholds in SortZone
Closedenhancementai
tobiu added parent issue #8163 on Dec 27, 2025, 10:33 PM
tobiu assigned to @tobiu on Dec 28, 2025, 1:07 AM

tobiu
Dec 28, 2025, 2:11 PM
Input from Gemini:
✦ ### Session Refactoring Summary (Issue #8160)
In this session, we focused on decoupling window detachment thresholds and consolidating the intersection logic.
Key Changes:
SortZone.mjsRefactoring:
- Extracted the core intersection and threshold logic into a dedicated
checkWindowBoundary(data)method.- Introduced an
onWindowDragContinue(intersectionRatio, data)hook, allowing subclasses to react to drag moves that stay within the detached/attached state boundaries.- Consolidated the logic for
detachThresholdandreattachThresholdto ensure consistent behavior across all sorting zones.DashboardSortZone.mjsAlignment:
- Removed duplicated boundary check logic in
onDragMove, now delegating tosuper.onDragMove().- Implemented
onWindowDragContinueto handle the hand-off toDragCoordinatorfor remote drag updates when the item is detached.- State Sanitation:
- Removed the experimental
isReintegratingflag and logic, reverting to a cleaner state machine.- Method Ordering:
- Methods have been re-sorted chronologically per project guidelines.
Outcome: The threshold logic is now centralized and correctly handles directionality (inwards vs. outwards) using
lastIntersectionRatio. The system is prepared for further investigation into the re-detach behavior after full re-integration.
@github-actions - 2026-03-29T04:13:48Z
This issue is stale because it has been open for 90 days with no activity.
- 2026-03-29T04:13:49Z @github-actions added the
stalelabel
tobiu closed this issue on Mar 30, 2026, 1:32 PM
Currently,
Neo.draggable.container.SortZoneuses the same intersection logic (or similar 50% ratios) for both in-app item sorting (swapping items) and window detachment/re-integration. This limits UX tuning, as users often expect a "tear-off" into a new window to happen sooner (e.g., at 20% overlap) than an item swap.Goal:
detachThreshold: 0.2,reattachThreshold: 0.8).onDragMovelogic uses the correct threshold for the correct action (sorting vs. window boundary checks).