Repository navigation
Inbox: clicking anywhere on an attachment tile opens it - #1817
Merged
Merged
Conversation
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.
1 task
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.
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):getByRole('button', { name: 'Open …' })callers still work). The detail line ("Markdown", "Changed since it was sent, edited …") is itsaria-describedby.span), so there is no nested interactive element and no click handler on a plain div.:where(.pn-inbox) :where(button) { cursor: pointer }) and.pn-inbox :focus-visiblerule. The tile had no hover style before and still has none, so the look is unchanged.text-align: leftmoved from.ib-att-t.ib-guideto.ib-att-t(the guide card was already a whole-tile button; this is the same pattern). The dead.ib-open:disabledrule 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 renderAttachmentTiles(the native shell opens attachments throughopen_attachment), andsurface.spec.tspasses 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 isauto.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 ispointer.Tests
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 carriesfile=. It fails against theorigin/mainbinary (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(tempPLANNOTATOR_DATA_DIR): 14 pass, 0 fail.tsc --noEmitforpackages/inboxandapps/inbox: clean.