Skip to content

home: a dropped picture becomes its path, not [image #1] — home's paste door bypasses the tray #152

Closed

Description

@santoshkumarradha

What happens

Drag a screenshot onto the terminal while home is up (the launcher box at the foot, or the ask here exchange pane) and the box fills with the raw path — /Users/x/Desktop/Screenshot\ 2026-08-31\ at\ 5.21.40\ PM.png — instead of [image #1] with the picture on the tray. In a conversation the same drop works when the file is on the TUI's machine.

Cause (dev = 4ee7e81)

app.paste (internal/tui3/app.go ~6660) has an early return for pageHome: it inserts the text into a.home.box (or the focused exchange pane's ex.box) and returns. The drop door — pasteFiles → attach + [image #n] token (imagepaste.go) — is reached only on the fall-through below it, which is the chat draft. Home never gets there. The path having spaces is not the cause; pastedWords already unescapes \ , quotes and file://.

The keystroke shape of a drop (dropkeys.go) is likewise wired only to the chat editor, not to home's box.

A second, related gap explains "it also stayed a path in chat" over ssh: iTerm2 → ssh → tmux delivers a Mac path to a TUI running on the Linux box. pasteFiles stats it, finds nothing, and silently inserts the text — nothing tells the person the file is not on this machine.

Fix

  1. Home's box and the exchange pane's box take the same door as the chat draft: pictures go on the tray with [image #n] in the box, files go on the tray, the tray strip is drawn above home's box, start / ask here carry the pictures (renew already carries side.chips into the new conversation; submit reads a.chips).
  2. A paste that is drop-shaped (droppedPathShape) but names nothing on this machine says so — <name> is not on this machine — and the text stays in the box as before.
  3. Home's list filter ignores [image #n] tokens so the row list does not empty when a picture is dropped.

Drafted with CodeAF · reviewed and owned by the author

Activity

  1. santoshkumarradha commented on Sep 1, 2026

    @santoshkumarradha
    MemberAuthor

    Reproduced on the staging binary (4ee7e81) with a real bracketed paste through tmux (paste-buffer -p), file Screenshot 2026-08-31 at 5.21.40 PM.png on this machine:

    • chat: works — tray shows ▣ #1 Screenshot 2026-08-31 at 5.21.40 PM.png, draft holds [image #1], the request on the wire carries image_url (data:image/png;base64,…) beside the text. Spaces are not the problem.
    • home: the box fills with /tmp/…/Screenshot\ 2026-08-31\ at\ 5.21.40\ PM.png, and home reads the leading slash as a COMMAND: action row + run /tmp/…/Screenshot\ …, foot enter runs this command. Enter then fails as an unknown command.
    • chat, path not on this machine (iTerm2 → ssh → tmux delivers a Mac path): the path is inserted as text with no note — which is what "it stayed a path in chat" looks like from the owner's seat.

    So the fix has three parts: home's box (and the exchange pane's) take the chat draft's drop door; home's dispatcher falls into the same droppedLine net as chat's / router; a drop-shaped paste that names nothing here says <name> is not on this machine.

  2. added
    bug
    area:chat
    on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:chatbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions