Skip to content

feat(desktop): add Revert and Fork actions to user messages#9665

Closed
bilalbayram wants to merge 8 commits intoanomalyco:devfrom
bilalbayram:feat/desktop-message-actions
Closed

feat(desktop): add Revert and Fork actions to user messages#9665
bilalbayram wants to merge 8 commits intoanomalyco:devfrom
bilalbayram:feat/desktop-message-actions

Conversation

@bilalbayram
Copy link
Copy Markdown

What does this PR do?

Fixes #9661
Adds Revert and Fork message actions to the desktop/web app, bringing feature parity with the CLI TUI.

  • Hover menu: Three-dot button appears next to copy button with Revert/Fork/Copy options
  • Right-click menu: Context menu on user messages with the same actions

Screenshots

Hover Button

Before After
before-button after-buttons

Right-Click Menu

Before After
before-rc after-rc

Changes

  • packages/app/src/components/message-actions.tsx - New MessageActions and MessageActionsMenu components
  • packages/ui/src/components/context-menu.tsx - New ContextMenu component (wraps Kobalte)
  • packages/ui/src/components/message-part.tsx - Added actions prop to render custom action buttons
  • packages/ui/src/components/session-turn.tsx - Pass actions through to Message component
  • packages/app/e2e/message-actions.spec.ts - E2E tests for all actions

How did you verify your code works?

  • Hover shows menu button
  • Menu opens with Revert/Fork/Copy options
  • Right-click shows context menu
  • Revert removes message and restores prompt
  • Fork creates new session and navigates to it
  • Copy copies message text to clipboard
  • All 5 E2E tests pass

- Fix icon name from dots-horizontal to dot-grid
- Wrap trigger in span for data-slot attribute
- Use role-based selectors for menu items (data-slot gets overwritten)
- Fix message ID access pattern (message.info.id)
- Simplify fork test to verify navigation without prompt check
- Add context-menu.css with proper styling for right-click menu
- Fix icon placement to be inside message content area
- Use ghost variant for trigger button
- Restructure DOM for correct absolute positioning
Move the three-dot menu button from a separate overlay to inside the
user message actions area, next to the existing copy button. Both now
appear together on hover over the user message text.

- Add actions prop to Message, UserMessageDisplay, and SessionTurn
- Create MessageActionsMenu component for the dropdown trigger
- Simplify MessageActions to just be the context menu wrapper
- Update CSS to use flex layout for action buttons
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@bilalbayram bilalbayram deleted the feat/desktop-message-actions branch January 20, 2026 17:30
@bilalbayram bilalbayram restored the feat/desktop-message-actions branch February 26, 2026 17:02
@bilalbayram bilalbayram reopened this Feb 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions bot closed this Mar 22, 2026
@bilalbayram bilalbayram deleted the feat/desktop-message-actions branch March 22, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop/Web: Missing Revert and Fork actions for messages

1 participant