Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
2a8d23d
feat(chat): drag workflows and folders from sidebar into chat input
waleedlatif1 Apr 8, 2026
c0dd830
fix(chat): fix effectAllowed, stale atInsertPosRef, and drag-enter ov…
waleedlatif1 Apr 8, 2026
9cfd1ee
feat(chat): add task dragging and visible drag ghost for sidebar items
waleedlatif1 Apr 8, 2026
3bdedad
feat(sidebar): add drag ghost with icons and task icon to context chips
waleedlatif1 Apr 8, 2026
0ebee18
refactor(types): narrow ChatMessageContext.kind to ChatContextKind un…
waleedlatif1 Apr 8, 2026
86e7c9e
feat(user-input): support Tab to select resource in mention dropdown
waleedlatif1 Apr 8, 2026
4e1fa16
fix(user-input): narrow ChatContext discriminated union before access…
waleedlatif1 Apr 8, 2026
fccf98d
fix(colors): overload workflowBorderColor to accept string | undefined
waleedlatif1 Apr 8, 2026
4ff9b84
fix(colors): simplify workflowBorderColor to single string | undefine…
waleedlatif1 Apr 8, 2026
7b8fa00
fix(chat): remove resource panel tab when context mention is deleted …
waleedlatif1 Apr 8, 2026
6d31c36
fix(chat): use resource ID for context removal identity check
waleedlatif1 Apr 8, 2026
4d492a4
fix(chat): add folder/task cases to resource resolver, task key to ex…
waleedlatif1 Apr 8, 2026
abaac15
revert(chat): remove folder/task from resolveResourceFromContext — no…
waleedlatif1 Apr 8, 2026
669f2ac
fix(chat): add chatId to stored context types and workflow.color to d…
waleedlatif1 Apr 8, 2026
e471b2e
fix(chat): guard chatId before adding task key to existingResourceKeys
waleedlatif1 Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(chat): fix effectAllowed, stale atInsertPosRef, and drag-enter ov…
…erlay for resource drags
  • Loading branch information
waleedlatif1 committed Apr 8, 2026
commit c0dd8304c35967854159414f1d50c8b877ed05d2
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ export function UserInput({
for (const resource of resources) {
handleResourceSelect(resource)
}
// Reset after batch so the next non-drop insert uses the cursor position
atInsertPosRef.current = null
} catch {
// Invalid JSON — ignore
}
Expand All @@ -319,6 +321,7 @@ export function UserInput({
try {
const resource = JSON.parse(resourceJson) as MothershipResource
handleResourceSelect(resource)
atInsertPosRef.current = null
} catch {
// Invalid JSON — ignore
}
Expand All @@ -330,11 +333,17 @@ export function UserInput({
)

const handleDragEnter = useCallback((e: React.DragEvent) => {
filesRef.current.handleDragEnter(e)
const isResourceDrag =
e.dataTransfer.types.includes(SIM_RESOURCE_DRAG_TYPE) ||
e.dataTransfer.types.includes(SIM_RESOURCES_DRAG_TYPE)
if (!isResourceDrag) filesRef.current.handleDragEnter(e)
}, [])

const handleDragLeave = useCallback((e: React.DragEvent) => {
filesRef.current.handleDragLeave(e)
const isResourceDrag =
e.dataTransfer.types.includes(SIM_RESOURCE_DRAG_TYPE) ||
e.dataTransfer.types.includes(SIM_RESOURCES_DRAG_TYPE)
if (!isResourceDrag) filesRef.current.handleDragLeave(e)
}, [])

const handleFileChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function FolderItem({
}

e.dataTransfer.setData('sidebar-selection', JSON.stringify(selection))
e.dataTransfer.effectAllowed = 'move'
e.dataTransfer.effectAllowed = 'copyMove'

const resources = buildDragResources(selection, workspaceId)
if (resources.length > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export function WorkflowItem({
}

e.dataTransfer.setData('sidebar-selection', JSON.stringify(selection))
e.dataTransfer.effectAllowed = 'move'
e.dataTransfer.effectAllowed = 'copyMove'

const resources = buildDragResources(selection, workspaceId)
if (resources.length > 0) {
Expand Down