Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 5, 2025

Pitches people on Cloud for tasks running longer than 2 minutes, allowing them to dismiss it.

Features Added

  • Roomote Control button in TaskHeader that lights up blue when notifications should be shown
  • Speech bubble notification banner with smooth animations
  • Task duration tracking with 2+ minute threshold
  • Dismissal persistence per task using ExtensionStateContext
  • Navigation to Account page on notification click
  • Test coverage

Note it doesn't add the actual connection to Cloud, this is laying out the UI groundwork

Technical Details

  • New CloudNotificationBanner component with height animations
  • Extended ExtensionStateContext with dismissedCloudNotifications state
  • Added localization support for notification message
  • All tests passing with 100% coverage for new functionality

Important

Add cloud notification system for tasks running over 2 minutes, with user interaction and state management enhancements.

  • Behavior:
    • Adds CloudNotificationBanner component for tasks running over 2 minutes, with dismissal and navigation features.
    • TaskHeader tracks task duration and shows notifications if not dismissed.
    • TaskActions includes a cloud icon that lights up when notifications are active.
  • State Management:
    • Extends ExtensionStateContext with dismissedCloudNotifications state and related functions.
  • Localization:
    • Adds cloudNotification.message to chat.json for notification text.
  • Testing:
    • Comprehensive tests for CloudNotificationBanner and TaskHeader in __tests__ directory.

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

@roomote roomote bot requested review from cte, jr and mrubens as code owners August 5, 2025 18:03
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused labels Aug 5, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Even I'm confused by my own code, and I wrote it 5 minutes ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this intentional? The interval cleanup only happens on unmount, but when the task changes (line 76 dependency), a new interval is created without clearing the old one. This could lead to memory leaks with multiple intervals running simultaneously.

Suggested change
}, [task.ts, currentTaskItem?.id, dismissedCloudNotifications])
useEffect(() => {
const taskId = currentTaskItem?.id
if (!taskId) return
const interval = setInterval(() => {
const duration = Date.now() - task.ts
// Show notification if task has been running for more than 2 minutes
// and hasn't been dismissed for this task
const shouldShow = duration > 2 * 60 * 1000 && !dismissedCloudNotifications.has(taskId)
setShowCloudNotification(shouldShow)
}, 1000)
return () => clearInterval(interval)
}, [task.ts, currentTaskItem?.id, dismissedCloudNotifications])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Cloud icon button could benefit from better accessibility. Consider adding keyboard navigation support and a more descriptive aria-label that changes based on the notification state:

Suggested change
aria-label="Cloud">
<button
className={cn(
"relative inline-flex items-center justify-center",
"bg-transparent border-none p-1.5",
"rounded-md min-w-[28px] min-h-[28px]",
"transition-all duration-150",
"hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]",
"focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder",
"active:bg-[rgba(255,255,255,0.1)]",
"cursor-pointer",
showCloudNotification
? "text-vscode-charts-blue opacity-100"
: "text-vscode-foreground opacity-85",
)}
style={{ fontSize: 16.5 }}
aria-label={showCloudNotification ? "Cloud notification active" : "Cloud"}>
<Cloud size={16} />
</button>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The dismissedCloudNotifications state isn't persisted, so users will see notifications again for long-running tasks after the extension reloads. Should we consider persisting this state similar to other user preferences?

This could be added to the state persistence logic to maintain user dismissals across sessions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Minor suggestion: The animation duration (200ms) could be extracted to a constant for better maintainability:

Suggested change
}, 200) // Match animation duration
const ANIMATION_DURATION_MS = 200
const handleDismiss = () => {
setIsAnimating(true)
setTimeout(() => {
setIsVisible(false)
onDismiss()
}, ANIMATION_DURATION_MS)
}

- Add Cloud icon button to TaskHeader that lights up blue when notifications should be shown
- Create CloudNotificationBanner component with speech bubble design
- Implement task duration tracking with 2+ minute threshold
- Add persistence for dismissal state per task using ExtensionStateContext
- Enable navigation to Account page on notification click
- Include smooth height animations for show/hide transitions
- Add comprehensive test coverage for new functionality
- Add localization support for notification message
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 5, 2025
@daniel-lxs daniel-lxs marked this pull request as draft August 5, 2025 18:24
@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Aug 5, 2025
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Aug 5, 2025
@brunobergher brunobergher changed the title (DO NOT MERGE) Add Cloud notification for long-running tasks (DO NOT MERGE) Add Walkaway CTA for long-running tasks Aug 5, 2025
@brunobergher brunobergher changed the title (DO NOT MERGE) Add Walkaway CTA for long-running tasks (DO NOT MERGE) Add Roomote Control CTA for long-running tasks Aug 5, 2025
@brunobergher brunobergher force-pushed the feature/cloud-notification-long-running-tasks branch from da79e62 to ea43c87 Compare August 5, 2025 21:06
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 23, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Draft / In Progress size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants