refactor(chat): adopt shared Button in message actions and approvals#361
Merged
refactor(chat): adopt shared Button in message actions and approvals#361
Conversation
Replaces hand-styled <button> elements in MessageBlock and EditInline with the shared <Button> component (variant + size), and drops the CSS rules that are now redundant because Button handles them: - .actionButton: keep only width/height/border-radius/font-size; drop flex, border, background, color, cursor, transition, and :hover. - .branchButton: same cleanup; drop :hover and :disabled too. - .approvalAllow: keep only the success color tokens that override Button's default "outline" variant; drop padding/border/cursor/ font/hover/disabled. - .approvalDeny: removed — use Button variant="danger" directly. Approval Allow buttons now use variant="outline" size="sm"; Deny uses variant="danger" size="sm"; message/branch actions use variant="ghost" size="icon"; edit Save/Cancel use the default + ghost variants. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
furukama
approved these changes
Apr 20, 2026
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
Extracted from #323 as PR E1. Stacked on #358 (base branch: `extract-shared-button-icons`) because it consumes the shared `` component.
- Replaces raw `
` elements in `MessageBlock` / `EditInline` with `` (variant + size props)Mapping:
- Message actions (copy/edit/regenerate) → `variant="ghost" size="icon"`
- Branch nav → `variant="ghost" size="icon"`
- Approval Allow* → `variant="outline" size="sm"` + color-only override via `.approvalAllow`
- Approval Deny → `variant="danger" size="sm"`
- Edit Save → default `
`, Cancel → `variant="ghost"`This PR does not add aria-labels — those are in #359 (chat a11y) so they merge cleanly without overlap.
Review order
Merge #358 first, then retarget this PR to `main`. Opening as draft until that happens.
Test plan
🤖 Generated with Claude Code