Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d0e46ff3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| p.Send(enter) // must broadcast exactly that text, once | ||
| p.Send(tea.KeyMsg{Type: tea.KeyCtrlC}) |
There was a problem hiding this comment.
Wait for broadcast delivery before quitting the program
If the broadcast goroutine is delayed, Ctrl-C can terminate the program before the real message reaches its history. app.send in pkgs/chat/main.go dispatches through go p.Send(msg), so the synchronous Enter send only orders the key events, not the resulting chat message. This can intermittently leave final.messages empty and fail the test even with the correct guard. Synchronize on delivery or processing of the broadcast before sending Ctrl-C.
Useful? React with 👍 / 👎.
|
Closing as duplicate of PR #3755 (queue protocol §8 disposition, from task 7432 triage of issue #3273, 2026-11-03). Both PRs implement the same task 5695 fix. PR #3755 is canonical — it is the PR task 5695 completed with. Before closing, I diffed this PR against PR #3755 and posted the full salvage note on PR #3755: the Branch |
Fixes #3273.
Pressing Enter on an empty or whitespace-only input broadcast a blank
chatMsgthat every session appended to its history as a barename:line.Change (
pkgs/chat/main.go, KeyEnter arm): guard the send withstrings.TrimSpace(m.textarea.Value()) != "". On empty/whitespace input nothing is sent and the textarea is left untouched; real text — including leading/trailing spaces around content — still broadcasts exactly as typed, once, and the textarea resets as before. No behavior change anywhere else.Regression test (
pkgs/chat/main_test.go): drives a realtea.ProgramoverinitialModelwith a recording fan-out (the program itself inapp.progs): empty Enter → whitespace-only Enter → typehello→ Enter → Ctrl-C, then asserts the final history holds exactly one message, the exact typed texthello.Fail-first verified on the laptop against unguarded main: history was
["tester: " "tester: " "tester: hello"](3 messages — the bug). After the guard:go test -count=1 ./...in pkgs/chat passes,go vetclean,gofmtclean.Queue task 5695 (lane C).
Need help on this PR? Tag
@codesmith-botwith what you need.