Repository navigation
🤖 fix: Run /init is off whenever the creation composer cannot send - #6458
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Perf gate: CLEARED at I checked these facts myself:
This clearance covers only this head. A new head needs a new clearance. Generated with |
The "Run /init" banner sends through the creation composer once. It was gated only on the branch list (#6038), so while Coder presets loaded, a send was in flight, attachments were processing or the composer was disabled, a click was refused and left /init unsent. The composer now reports the same blockers that canSend checks (apart from an empty draft, since the banner brings its own text). Fixes #6423 --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
--- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
f14bf32 to
d037b9f
Compare
|
Perf gate: re-CLEARED at I checked these facts myself:
A new head needs a new clearance. Generated with |
Summary
The creation view's "Run /init" button is now off whenever the creation composer cannot send, not only while the branch list loads. While Coder presets load, a send is in flight, attachments are processing or the composer is disabled, a click used to be refused by the composer and left
/initunsent.Fixes #6423
Background
"Run /init" restores
/initin the creation composer and calls itssend()once. #6417 (fix for #6038) turned the button off while the branch list loads or has failed, butcanSendhas more blockers. The final check of #6417 found the gap and #6423 tracked it.Implementation
useReportCreationSendBlockednow takes the same blockers thatcanSendchecks:disabled, a send in flight, processing attachments, Coder presets loading, and the branch list. It leaves out an empty draft, because the banner brings its own text. The page side (useCreationSendBlockedin ProjectPage, scoped per composer) is unchanged. The blockers are combined inside the hook, soChatInputInnergains no complexity (CRAP gate).Validation
Two new tests in
tests/ui/agents/creationWaitsForBranches.test.ts(real backend) failed on main withExpected: true, Received: false(the button was enabled) and pass now:CoderServicereports an available CLI and one template, andlistPresetsis held. After the user picks the Coder runtime, the button turns off, and it turns on again when the presets load.WorkspaceService.createis held after a Send click. The button stays off while the send is in flight.The file passes 9 of 9 (the #6033, #6055 and #6038 tests still pass). The ChatInput and ProjectPage unit tests give 186 pass, 0 fail.
Dogfood (production build, mock AI,
git worktreeheld so the creation send stays in flight). Run /init during the send: main enabled, this PR disabled (1280 and 390 px).Before, send in flight (main, 1280 px):

After, send in flight (1280 px):

After, send in flight (390 px):

First-load JS (
make first-load-js, base 9aec386 vs this head): total raw 2,266.8 KiB on both, brotli 455.3 KiB to 455.5 KiB, gzip 558.2 KiB to 558.3 KiB.Risks
Low. Only the creation page banner reads the report. A workspace composer reports nothing.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$324.26