# refactor\(web\): ChatView's paste-to-focus, titlebar controls, and timeline overlays move out · PR \#23072 · pingdotgg/t3code

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

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

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: refactor/split2-chatview-overlays

Target branch: main

Head commit: c6cd722894aa8f10feaf4c2b8855e68014ebee58

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

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

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

## Description

---

The last pieces that read nothing else in ChatView: paste-to-focus becomes `chat/usePasteToFocusComposer.ts`; the titlebar's panel controls become `ThreadPanelHeaderControl` and `WorkspaceTitlebarControls` next to `PanelLayoutControls`; the drop overlay and the scroll-to-end button become components in `chat/TimelineOverlays.tsx`. Markup and classes are unchanged.

| | Before | After |
|---|---|---|
| `ChatView.tsx` lines | 4,072 | 3,975 |

Renders, median of 3, counted with the commit-only fiber counter on a dev server seeded from real data
(stack top vs the stack's base; "ChatView" is ChatView's own render count):

| Interaction | Before: commits / renders / ChatView | After: commits / renders / ChatView |
|---|---|---|
| Type 20 chars in the composer | 22 / 351 / 1 | 22 / 351 / 1 |
| Streaming reply (12 lines) | 129 / 3412 / 18 | 134 / 3406 / 18 |
| Switch threads | 26 / 1520 / 5 | 26 / 1480 / 5 |
| Open and close the right panel | 14 / 603 / 4 | 14 / 569 / 4 |

No render boundary moved in a way that changes these: the hooks run inside ChatView, and the new leaf components are small. The point of the stack is readability and per-file compiler caching, not a render win.

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)

