feat(ui): yield button + /yield slash command (re-target onto develop)#166
Merged
feat(ui): yield button + /yield slash command (re-target onto develop)#166
Conversation
Add YieldButton component, wire it into the confrontation overlay, add /yield slash command that sends a YIELD wire message, and thread the onYield callback from App.tsx through GameBoard → ConfrontationWidget → ConfrontationOverlay. MessageType.YIELD added to protocol.ts to mirror the server-side type added in Task 23. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
handleSend was appending slash-command-produced messages (e.g. /yield → YIELD) to local state but never calling send(), so the server's _handle_yield never fired. Add send(msg) for-loop inside the slashResult.messages.length > 0 block; intentionally omit setCanType / setThinking — slash commands do not start a narration turn. Add wiring test (slash-command-send-wiring.test.ts) asserting the for-loop and send(msg) are present inside the slashResult.handled branch and that setCanType/setThinking are absent from that branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-target of #165 onto
develop. The original PR's base wasfeat/dual-track-momentum-phase-2(the Phase 2 branch). When the PR merged, it went back into that orphaned branch instead of develop. This PR carries the same content, now correctly targetingdevelop.Same content as #165:
feat(ui): yield button + /yield command—YieldButton,/yieldslash command, threaded through App → GameBoard → ConfrontationWidget → ConfrontationOverlayfix(ui): forward slash-command messages to server send pipeline— fixes the bug wherehandleSendproduced slash messages but never calledsend()🤖 Generated with Claude Code