Skip to content

Inbox: mention a thread in a reply (drag a row, row menu, pasted link) - #3526

Draft
backnotprop wants to merge 7 commits into
mainfrom
feat/inbox-mention-thread
Draft

backnotprop wants to merge 7 commits into
mainfrom
feat/inbox-mention-thread

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Piece 1 of the approved "Dragging threads" design (.product/approved/inbox-drag-threads/, treatment A, "in the words"): mention a thread in a reply.

What it does

  • Drag a list row onto the open reply box. The thread's title goes in at the drop point as a token, styled like the box's @ / # / / tokens, with · project added when the project differs. ⌘/Shift-picked rows carried together become several mentions, comma separated. The box lights up as a drop target only while a thread is being carried. The thread the box answers is refused quietly. Escape, a window blur or a drop elsewhere cancels.
  • Mention in reply is in the row menu (right-click, the row's ⋮, a picked row's menu, the pick bar's ⋯), and in the row's sheet on a phone. On a phone the item names the reply it goes into, and tapping opens that thread with the mention at the end of the words. There is no new keyboard shortcut: the menu is reachable from the keyboard.
  • Pasting this Inbox's #thread=msg_… link, or a bare thread id, gives the same token. Backspace removes a token whole. Archived threads show grey. Threads on another machine say they cannot be read from there.
  • The sent message shows each mention as a link that opens the thread. The mentioned thread is not changed.
  • What the agent gets: each mention as "Title" (thread msg_…) at its spot, then a short list after the words. All of this wording is one constant, INBOX_THREAD_MENTION_WORDS in packages/core/inbox-thread-mention.ts, and it is marked as pending the owner's approval.
  • The drag uses pointer events, not native HTML drag and drop, so file drop, text drag, row click, selection, swipe and pinning are not changed. Touch never drags. Reduced motion is respected, and a polite live region announces each drag step.
  • There is no server or api.ts change: the Inbox is Bun-only, so no Pi server change is needed. Docs: inbox-compose.md, inbox-messages.md.

Tests

  • packages/inbox/replyMentionsField.test.tsx (DOM), which covers:
    • a drop at the drop point
    • the target appearing only while dragging
    • multi
    • refusing the box's own thread
    • the menu item
    • pasting a link
    • Backspace
    • the box's states
    • file drop still attaching
    • the sent link
  • packages/inbox/threadMentions.test.ts and packages/core/inbox-thread-mention.test.ts check that the agent's words come only from the constant.

e2e: inbox-row-menu.spec.ts inbox-picks-composing.spec.ts inbox-reply-quote.spec.ts inbox-attachments.spec.ts inbox-fullscreen-composer.spec.ts inbox-row-swipe.spec.ts inbox-row-pin.spec.ts inbox-thread-links.spec.ts

Piece 1 of the approved Dragging threads design, treatment A. A list row
dragged onto the reply box, the row menu's Mention in reply (also on a
phone's sheet), or a pasted thread link puts the thread's title in the
words as a token. Send turns each into the thread's id at its spot plus a
short list, worded by one constant pending approval. The sent message
shows each mention as a link to the thread.
A rule that ends on the page itself is dropped from the cascade other apps
load (tests/inbox-thread-css.test.ts).
The reply box under a held thread is a stronger tint with its label, never
a dashed edge or ring; mention tokens lose their ring. A held thread near
the list's top or bottom scrolls it, unless a drop target is under the
pointer. The drag ghost's classes no longer share ib-tghost with the
toast's buttons.
Mixed with --card it came out darker than the box in dark mode.

This branch has not been deployed

No deployments
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.

1 participant