You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: New worktree thread send waits on workspace.layoutCommands with no feedback (0.1.12) #43267
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Use the desktop app connected to a remote environment (mine is a Mac mini over Tailscale).
Open a project that starts threads in New worktree mode. Mine has no worktreeLayout commands in t3.json.
Make the connection slow or lossy, so one response from the environment takes a few seconds.
Type a prompt in a new draft and press Enter.
I didn't build a deterministic repro. My remote's internet drops for 2 to 6 seconds at a time, which triggers it several times an hour.
Expected behavior
The draft turns into the thread right away, like in 0.1.11, or shows that it is sending.
Actual behavior
The draft stays on screen with no change until workspace.layoutCommands answers. It looks like Enter did nothing. Pressing Enter again shows "Still sending your previous message. Send again once it goes through or fails." The first message does go through.
The wait is ensureWorktreeLayoutApproved in apps/web/src/components/chat/useComposerSend.ts, added in #42386. It sets sendInFlightRef and awaits the read before every worktree send, even when the project has no layout commands. The read has no timeout and its result isn't cached.
Impact
Minor bug or occasional failure
Version or commit
0.1.12, desktop app and server. Not present in 0.1.11.
Environment
macOS desktop app 0.1.12, remote environment is t3 serve 0.1.12 on a Mac mini over Tailscale, Pi provider.
orchestration.launchThread reached the server 8.4 s after Enter and took 62 ms. The toast was on screen for those 8 seconds.
Workaround
Press Enter once and wait.
Possible fix
Cache the layout-command read per project, or start the thread and let the server refuse unapproved commands, which the comment in worktreeLayoutApproval.ts says it already does. Showing a sending state in the draft would also cover it.
Activity