# refactor\(web\): ChatView's attachment preview handoff lives in useAttachmentPreviewHandoff · PR \#23067 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/23067)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: refactor/split2-chatview-attachments

Target branch: refactor/split2-chatview-revert

Head commit: 4f54ed53258b1892f22bfd3c6ca72e38e7d0189f

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/23067)

[Commits](https://git.cafe/pingdotgg/t3code/pull/23067/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/23067/diffs?format=markdown)

## Description

---

The blob-preview handoff for sent images (state, refs, the preload effect, the unmount cleanup, and the URL map the timeline renders) moves into `chat/useAttachmentPreviewHandoff.ts`. Verbatim move.

| | Before | After |
|---|---|---|
| `ChatView.tsx` lines | 4,715 | 4,521 |

Tests: `tsc-rs --noEmit` for apps/web, oxlint on the changed files, `vp test run src/components/ChatView.logic.test.ts`, and the React Compiler coverage test for every changed file (0 bailouts). ChatView stays in the coverage test's slow set.

Part of the ChatView split (7,258 → 3,975 lines across the stack).

Opus 5.5, Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

