Repository navigation
Move file drop overlay support out of ContentView - #3107
lawrencecchen wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR is a pure refactor that moves file-drop overlay routing, view, key, and install helpers out of Confidence Score: 5/5Safe to merge; this is a mechanical code relocation with no behavioral changes. All findings are P2. The patterned UUIDs are unconventional but functional, and the unused onDrop closure is a pre-existing issue not introduced by this PR. The refactor is a faithful line-for-line move with only the necessary access-level widening. GhosttyTabs.xcodeproj/project.pbxproj — patterned UUIDs are worth a second glance but are not blocking. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Window drag event] --> B[FileDropOverlayView.hitTest]
B --> C{DragOverlayRoutingPolicy\n.shouldCaptureFileDropOverlay}
C -- No --> D[Return nil\npass through to views below]
C -- Yes --> E[Capture drag in overlay]
E --> F[draggingEntered/Updated]
F --> G{WKWebView\nunder cursor?}
G -- Yes --> H[Forward to WKWebView\ndraggingEntered/Updated]
G -- No --> I{Terminal\nunder cursor?}
I -- Yes --> J[Return .copy]
I -- No --> K[Return empty]
E --> L[performDragOperation]
L --> M{shouldCaptureFileDropDestination?}
M -- No --> N[Return false]
M -- Yes --> O{preparedDragWebView\nor activeDragWebView?}
O -- Yes --> P[Forward to WKWebView.performDragOperation]
O -- No --> Q{terminalUnderPoint?}
Q -- Yes --> R[terminal.performDragOperation]
Q -- No --> S[Return false — onDrop never called]
|
Stacked on #3106.
Moves file drop overlay routing, view, key, and install helpers from
Sources/ContentView.swiftintoSources/Windowing/FileDropOverlaySupport.swift. Keeps behavior unchanged; only access is widened where needed for cross-file use.Verification:
git diff --check./scripts/reload.sh --tag fdovrlSummary by cubic
Extracted file drop overlay support from
ContentViewintoSources/Windowing/FileDropOverlaySupport.swiftfor clearer ownership and reuse. Behavior is unchanged; drag routing and drop handling remain the same.DragOverlayRoutingPolicy,FileDropOverlayView, overlay storage key, and installers (installFileDropOverlay,installFileDropOverlayWhenReady) toWindowing/FileDropOverlaySupport.swift.SidebarTabDragPayloadand overlay installers to enable cross-file use.ContentView.swift.Written for commit d6194d7. Summary will update on new commits.