Skip to content

Support dragging notes into chat context#5443

Open
ComputelessComputer wants to merge 1 commit into
mainfrom
fix/drag-home-notes-to-chat
Open

Support dragging notes into chat context#5443
ComputelessComputer wants to merge 1 commit into
mainfrom
fix/drag-home-notes-to-chat

Conversation

@ComputelessComputer
Copy link
Copy Markdown
Collaborator

@ComputelessComputer ComputelessComputer commented Jun 2, 2026

Summary

  • add a session drag payload for note/session cards
  • let chat accept dropped session payloads as manual context
  • cover drag payload parsing and chat drop behavior

Verification

  • pnpm exec dprint fmt apps/desktop/src/chat/components/content.tsx apps/desktop/src/chat/components/content.test.tsx apps/desktop/src/chat/context/session-drag.ts apps/desktop/src/chat/context/session-drag.test.ts apps/desktop/src/main/top-meeting-timeline.tsx apps/desktop/src/shared/ui/interactive-button.tsx apps/desktop/src/sidebar/timeline/item.tsx
  • pnpm -F @hypr/desktop exec vitest run src/chat/context/session-drag.test.ts src/chat/components/content.test.tsx
  • pnpm -F desktop typecheck

Fixes #5060


Note

Low Risk
UI-only drag/drop and context wiring reusing existing manual refs; malformed payloads are rejected and covered by tests.

Overview
Users can drag note/session cards from the sidebar timeline and top meeting timeline into an active chat so those sessions become manual chat context (same ContextRef path as the context bar).

A new session-drag helper serializes sessionId on a custom MIME type (application/x-anarlog-session-context), with plain-text fallback for the drag preview. ChatContent accepts drops via onDragOver/onDrop and calls onAddContextEntity with a session:manual:* ref; other drag types are ignored.

Timeline session rows and InteractiveButton gain draggable / onDragStart wiring; the top timeline stops pointer propagation on draggable cards so window drag does not fight note drags. Vitest covers payload read/write and chat drop behavior.

Reviewed by Cursor Bugbot for commit 0c26ee0. Bugbot is set up for automated code reviews on this repo. Configure here.

Add session drag payload handling so dropped notes become manual chat context.
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 2, 2026

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit 0c26ee0
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a1e5e979c4df200084947b5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drag and drop notes to chat not working from Home tab

1 participant