Skip to content

Inbox: clicking anywhere on an attachment tile opens it - #1817

Merged
backnotprop merged 1 commit into
mainfrom
fix/inbox-attachment-tile-click
Oct 9, 2026
Merged

backnotprop merged 1 commit into
mainfrom
fix/inbox-attachment-tile-click

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

What

The attachment tiles at the foot of an agent message in the Plannotator Inbox opened only when you clicked the small "Open" text. Clicking the icon, the file name or the type line did nothing.

Now the whole tile is one <button> (packages/inbox/components/AttachmentTiles.tsx):

  • Accessible name "Open SCRIPT.md" (unchanged from the old Open button, so existing getByRole('button', { name: 'Open …' }) callers still work). The detail line ("Markdown", "Changed since it was sent, edited …") is its aria-describedby.
  • "Open" stays inside it as a visual cue (a span), so there is no nested interactive element and no click handler on a plain div.
  • Pointer cursor and the focus ring around the whole tile come from the window's existing button reset (:where(.pn-inbox) :where(button) { cursor: pointer }) and .pn-inbox :focus-visible rule. The tile had no hover style before and still has none, so the look is unchanged.
  • text-align: left moved from .ib-att-t.ib-guide to .ib-att-t (the guide card was already a whole-tile button; this is the same pattern). The dead .ib-open:disabled rule is removed.

The tile holds no other control: "Open the version it sent" lives in the open pane's changed line, and the annotations chip is in the reply box. So nothing had to be laid out beside the big button.

The iPhone surface (packages/inbox/surface) does not render AttachmentTiles (the native shell opens attachments through open_attachment), and surface.spec.ts passes unchanged.

Screenshots

Saved locally under /tmp/tile-click-proof/, from the compiled binary (before = origin/main, after = this branch), at 1440 by 900, in light mode:

  • before-1-tiles.png / after-1-tiles.png: the two tiles (SCRIPT.md "Markdown", config.json "JSON"). They look the same at rest.
  • before-2-keyboard-focus.png: keyboard focus draws the ring around the small "Open" word only.
  • after-2-keyboard-focus.png: the ring goes around the whole tile.
  • before-3-after-clicking-the-name.png: after a click on "SCRIPT.md", the thread is unchanged and no pane opens. The computed cursor over the name is auto.
  • after-3-after-clicking-the-name.png: the same click opens SCRIPT.md beside the thread ("Script / The demo script.", Annotations panel). The cursor over the name is pointer.

Tests

  • New e2e case in tests/e2e/inbox-attachments.spec.ts: "a click on the tile itself, its name rather than Open, opens the file". It checks that the tile is a button named "Open install-flow.mmd" with nothing interactive nested in it, clicks the tile's name, and asserts that the pane opens and the URL carries file=. It fails against the origin/main binary (the tile has no button role) and passes on this branch.
  • bunx playwright test -c tests/e2e/playwright.config.ts inbox-attachments.spec.ts inbox-guides.spec.ts surface.spec.ts: 29 passed against the compiled binary (temp data dirs only).
  • bun test packages/inbox packages/shared/inbox (temp PLANNOTATOR_DATA_DIR): 14 pass, 0 fail.
  • tsc --noEmit for packages/inbox and apps/inbox: clean.

The attachment tile at the foot of an agent message is now one button
named "Open <file>" (its detail line as the description), so a click on
the icon, the name or the type line opens the file exactly as Open did.
Open stays as the visual cue inside it; the focus ring and pointer come
from the window's existing button reset and :focus-visible rule. The
tile has no other control (the changed-since-sent link lives in the
open pane), and the iPhone surface does not render these tiles.

e2e: a click on the tile's name opens the pane, and the tile is a
single named button with nothing interactive nested in it.
@backnotprop
backnotprop merged commit 32d138c into main Oct 9, 2026
35 of 37 checks passed
@backnotprop
backnotprop deleted the fix/inbox-attachment-tile-click branch October 9, 2026 22:03
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