@devries-cameron20 / t3code Mirror · read-only / commits / 54e7dd96f7
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 25, 18:30 UTC

Improve thread composer focus behavior

Theo Browne committed Feb 13, 2026 at 16:29 UTC 54e7dd96f73163a46f5ee6d0db652a7c55ee1d41
3 files changed +12 -13
TODO.md
+2
@@ -12,3 +12,5 @@
12 - [x] Reduce noise of tool calls (combine "command run" and "command completed", make tool calls a "box" with limited # of calls shown at a time, etc)
13 - [ ] Insta focus input on new thread creation
14 - [ ] Disable "streaming" (wait until whole paragraph/step finishes before showing it
15 +- [ ] Making new thread should auto-focus input box
16 +- [ ] Threads should be scrolled to bottom on open (they currently start near top and "scroll down" after rendering, it's jank)
apps/web/src/components/ChatView.tsx
+10
@@ -357,6 +357,16 @@ export default function ChatView() {
357 setExpandedWorkGroups({});
358 }, [activeThread?.id]);
359
360 + useEffect(() => {
361 + if (!activeThread?.id || activeThread.terminalOpen) return;
362 + const frame = window.requestAnimationFrame(() => {
363 + focusComposer();
364 + });
365 + return () => {
366 + window.cancelAnimationFrame(frame);
367 + };
368 + }, [activeThread?.id, activeThread?.terminalOpen, focusComposer]);
369 +
370 useEffect(() => {
371 composerImagesRef.current = composerImages;
372 }, [composerImages]);
apps/web/src/components/Sidebar.tsx
-13
@@ -328,19 +328,6 @@ export default function Sidebar() {
328 event.key.toLowerCase() === "o";
329 if (!isNewThreadShortcut) return;
330
331 - const target = event.target;
332 - if (target instanceof HTMLElement) {
333 - const tagName = target.tagName;
334 - if (
335 - target.isContentEditable ||
336 - tagName === "INPUT" ||
337 - tagName === "TEXTAREA" ||
338 - tagName === "SELECT"
339 - ) {
340 - return;
341 - }
342 - }
343 -
331 const activeThread = state.threads.find((t) => t.id === state.activeThreadId);
332 const projectId = activeThread?.projectId ?? state.projects[0]?.id;
333 if (!projectId) return;