fix: intercept drops at root level and add max-images UX feedback#90
Merged
quiet-node merged 2 commits intomainfrom Apr 14, 2026
Merged
fix: intercept drops at root level and add max-images UX feedback#90quiet-node merged 2 commits intomainfrom
quiet-node merged 2 commits intomainfrom
Conversation
Fixes #89 — dropping a second image after a conversation caused the WebView to navigate full-screen because drag handlers only existed on the AskBarView div. ConversationView, which occupies most of the window in chat mode, had no handlers to call preventDefault(). Changes: - Move onDragOver/onDragLeave/onDrop from AskBarView to the root h-screen div in App so every drop in the window is intercepted - AskBarView now receives isDragOver as a prop ('normal' | 'max') rather than managing its own drag state - When dragging over a full attachment slot: red ring + "Max 3 images" label replaces the normal violet ring - When pasting an image at max capacity: same label appears inline and auto-dismisses after 2 s Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
- Remove em dashes from newly added comments (CLAUDE.md forbids them) - Fix showMaxLabel contradiction: suppress paste error label while a drag is active so the ring color and label always agree - Fix onImagesAttached JSDoc: remove stale "or drops" (drops now handled at root level in App, not in AskBarView) - Add missing branch coverage for handleRootDrop (non-image file, null dataTransfer, at-max drop, drop-during-generation) and AskBarView paste-at-max false branch (non-image clipboard content) - Mark handleRootDragLeave internal-transition branch with v8 ignore: jsdom cannot set relatedTarget on DragEvent to simulate cursor moving between child elements Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
This was referenced Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #89
Summary
AskBarView's inner div. In chat mode,ConversationViewcovers most of the window; dropping an image there had nopreventDefault(), causing the WebView to navigate full-screen (the "floating image" reported in Uploading second image fails #89). Handlers are now on the rooth-screendiv so every drop anywhere in the window is intercepted.Test Plan
bun run test— 519 tests passbun run validate-build— clean