nwhitehouse makes attachment chips actually open the document

Those little file tags on chat messages used to be pure decoration - now they're a one-click route to the document itself.

chat-uiworkflow

When a user attaches a document to a message in Mike's assistant chat, that attachment shows up as a small tag on the message. Until now, clicking it did nothing. nwhitehouse wired those tags up so a click opens the underlying document, and made sure the fix lands in both places the chat appears - the standalone assistant and the project-level assistant - so the behaviour is consistent wherever you're working.

The handling is sensibly conservative: tags that point to a stored document become clickable and resolve to the current version when you open them, while tags for attachments that never went through document storage stay as plain, non-interactive labels. No half-broken buttons.

So what Anyone whose team works documents through Mike's chat gets a faster path from "the assistant mentioned this file" to actually reading it.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from nwhitehouse/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
e67b072f [bug] Make user-message attachment chips clickable to open the doc Nick Whitehouse 2026-05-06 ↗ GitHub
commit body
The chip in the user bubble (e.g. "sek-1300000000-eur-..." next to a
prompt) showed the filename but had no affordance - clicking did
nothing. Now renders as a button when document_id is present and an
onOpenDocument handler is wired, opening the doc in the side-panel
viewer (same path as the assistant's "Read <filename>" block uses).
versionId is left null at the chip level - DocView resolves to the
document's current version.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4f480f20 [bug] Wire chip-click on the project chat page too Nick Whitehouse 2026-05-06 ↗ GitHub
commit body
UserMessage is rendered from two routes - /assistant via ChatView
and /projects/[id]/assistant/chat/[chatId] directly. The previous
chip-click commit only wired ChatView; in-project chats were the
common case and showed no effect. Both surfaces now pass
onOpenDocument so the attachment chip opens the doc viewer
regardless of route.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-109.md from inside the repo you want the changes in.

⬇ Download capture-thread-109.md