Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Jun 7, 2025

Important

Adds task sharing functionality with a new ShareService, UI updates, and i18n support for multiple languages.

  • Behavior:
    • Adds ShareService class in ShareService.ts to handle task sharing, including creating share links and copying them to the clipboard.
    • Integrates ShareService into CloudService in CloudService.ts, adding shareTask() and canShareTask() methods.
    • Updates webviewMessageHandler.ts to handle shareCurrentTask message, showing success or error messages.
  • UI:
    • Adds share button to TaskActions.tsx in webview-ui/src/components/chat/ when sharingEnabled is true.
    • Updates ClineProvider.ts to include sharingEnabled state.
  • Tests:
    • Adds ShareService.test.ts to test ShareService functionality.
  • Utils:
    • Adds getUserAgent() function in utils.ts for consistent user-agent string.
  • i18n:
    • Updates multiple language files in webview-ui/src/i18n/locales/ to include translations for share task functionality.

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

@mrubens mrubens requested review from cte and jr as code owners June 7, 2025 23:59
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Jun 7, 2025
Copy link
Collaborator

@jr jr left a comment

Choose a reason for hiding this comment

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

Seems good generally. Left some comments about stuff I'd consider cleaning up a little.

Ideally we'd also handle the case where your organization has not enabled sharing more gracefully: right now it leads to a "failed, try again" message that won't actually be able to succeed unless the org admins change their settings.

return false
}

const response = await axios.post(
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might consider using fetch instead of axios. I have an incomplete cleanup task to remove axios from AuthService that I keep not getting to a clean state.

Main motivation (other than not using a library unless we have to): as far as I can tell you can do a better job of setting timeouts with fetch than axios, which is something we should start doing for most of these requests (another cleanup task I haven't gotten to yet). Hopefully those will be better examples for Roo too, although maybe that's too optimistic.

That would mean you'd need to explicitly check the status & fail on non-2xx, since that behavior's different between fetch and axios.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like the idea of changing all of the axioses to fetches as a follow up and adding a rules file with instructions to use fetch instead going forward.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 8, 2025
@mrubens mrubens merged commit 540d4fb into main Jun 8, 2025
9 checks passed
@mrubens mrubens deleted the share_button branch June 8, 2025 14:08
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 8, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jun 8, 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 size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants