Skip to content

Conversation

@MuriloFP
Copy link
Contributor

@MuriloFP MuriloFP commented Jul 17, 2025

Description

Fixes #5293

This PR adds a share button next to the "Start New Task" button to provide quick access to the same share functionality currently available in the task header, improving discoverability as requested.

Changes Made

  • Added ShareButton component import to ChatView.tsx
  • Modified button rendering logic to include share button when:
    • Primary button text is "Start New Task"
    • currentTaskItem has an ID (indicating there's a task to share)
  • Adjusted button layout classes to accommodate the share button
  • Added comprehensive tests for the new functionality
  • Fixed linting issues in test file

Testing

  • All existing tests pass
  • Added tests for share button visibility conditions
  • Added tests for share button state management
  • Manual testing completed:
    • Share button appears next to "Start New Task" when appropriate
    • Share button respects the enableButtons state
    • Share functionality works as expected

Verification of Acceptance Criteria

  • Share button with link/share icon added next to "Start New Task" button
  • Provides quick access to share functionality
  • Only appears when there's an active task to share

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated (if needed)
  • No breaking changes
  • Accessibility checked (button states properly communicated)

Screenshots/Demo

The share button now appears as a square button with a link icon next to the shortened "Start New Task" button, providing improved discoverability for the share functionality.
image


Important

Adds a share button next to "Start New Task" in ChatView.tsx, with tests for visibility and state management.

  • Behavior:
    • Adds ShareButton next to "Start New Task" in ChatView.tsx if currentTaskItem has an ID and primary button text is "Start New Task".
    • Adjusts button layout classes to fit the share button.
  • Testing:
    • Adds tests in ChatView.spec.tsx for share button visibility and state management.
    • Tests ensure share button appears only when conditions are met and respects enableButtons state.
  • Misc:
    • Fixes linting issues in test file.

This description was created by Ellipsis for 994350fb3dd16819fc2a5faea5b22a88926d9bab. You can customize this summary. It will automatically update as commits are pushed.

@MuriloFP MuriloFP requested review from cte, jr and mrubens as code owners July 17, 2025 23:22
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jul 17, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 17, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 17, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 17, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of small suggestions

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Changes Requested] in Roo Code Roadmap Jul 21, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 21, 2025
@daniel-lxs
Copy link
Member

Quick question: Should the popover open where it normally does? or should we have a separate one for this new button?

image

Let me know what you think

@daniel-lxs daniel-lxs moved this from PR [Changes Requested] to PR [Needs Prelim Review] in Roo Code Roadmap Jul 22, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Jul 22, 2025
MuriloFP added 6 commits July 30, 2025 18:42
…ility (RooCodeInc#5293)

- Added ShareButton component next to Start New Task button in ChatView
- Share button only appears when currentTaskItem has an ID
- Added comprehensive tests for the new functionality
- Fixed linting issues in test file
- Simplify className logic by extracting showShareButton and buttonClassName variables as suggested by Daniel
- Remove redundant null check for currentTaskItem (ShareButton handles it internally)
- Create custom VSCodeButton for share functionality at the bottom to match Start New Task button style
- Keep original ShareButton component unchanged for header usage
- Update test mock to match actual ShareButton null-check behavior
- Extract className logic to a variable for better readability
- Remove redundant null check for currentTaskItem
- Style share button to match Start New Task button appearance
- Add Share text with proper icon alignment
- Ensure translations work correctly for all languages
- Remove text from share button (icon only)
- Adjust button widths: Start New Task 90%, Share 10%
- Change share button to primary appearance to match Start New Task
- Maintain same height for both buttons
- Remove text from share button (icon only)
- Change share button to primary appearance to match Start New Task
- Ensure both buttons have the same height
- Simplify layout to let buttons size naturally
- Extract className logic to a variable for better readability
- Remove redundant null check for currentTaskItem
- Add share button next to Start New Task with matching primary appearance
- Hide original ShareButton and create custom VSCodeButton for consistent styling
@daniel-lxs daniel-lxs force-pushed the feat/issue-5293-share-button-next-to-start-new-task branch from 5ebeab4 to 016e1b5 Compare July 30, 2025 23:45
@mrubens
Copy link
Collaborator

mrubens commented Jul 31, 2025

I'm not sure about this one. I pushed a tweak to the button padding/alignment, but a few other things I'm unsure about:

  1. I don't think we should so this button if the org has sharing disabled
  2. It's unexpected that the share modal shows up at the top of the screen
  3. Tapping the chat share button again doesn't make the modal go away
  4. We may want to link to shares other ways in the future

I'd probably pause on this one for now and reopen once we have a chance to discuss where we want to end up here from a product perspective.

@mrubens mrubens closed this Jul 31, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jul 31, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add share button next to "Start New Task" for improved discoverability

4 participants