Skip to content

Conversation

@brunobergher
Copy link
Collaborator

But because this is dependent on knowing the state of a DismissibleUpsell, it adds some utilities to be able to access their state from the outside. No visual changes.

… an issue where <RooTips /> would be incorrectly hidden.
@brunobergher brunobergher changed the title fix Makes RooTips appear in home again fix: Makes RooTips appear in home again Sep 15, 2025
Copy link
Contributor

@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.

Thank you for your contribution! I've reviewed the changes and found some issues that need attention. The implementation adds useful utilities for accessing DismissibleUpsell state, but there are a few critical issues to address.


export const DismissedUpsellsProvider: React.FC<DismissedUpsellsProviderProps> = ({ children }) => {
const [dismissedUpsells, setDismissedUpsells] = useState<string[]>([])
const [isLoading, setIsLoading] = useState(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intentional? The context starts with isLoading: true but components might render before the dismissed list is fetched. This could cause a flash of upsells that should be hidden.

Consider either:

  1. Starting with isLoading: false and an empty list
  2. Or ensuring components handle the loading state properly to prevent flashing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let's switch to isLoading false by default

// Wrapper component that provides the context
const DismissibleUpsell = memo((props: DismissibleUpsellProps) => {
return (
<DismissedUpsellsProvider>
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we consider lifting the DismissedUpsellsProvider to a higher level? Each DismissibleUpsell instance wrapping itself with a provider could cause issues if multiple upsells are rendered, as each would have its own provider instance and separate state.

The provider should ideally be at the app root level to share state across all upsells.

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 did, but this isn't used often enough to warrant being at the top level. If other reviewers agree with you, I can make that change, but I'll refrain from it for now.

import DismissibleUpsell from "../common/DismissibleUpsell"
import { useCloudUpsell } from "@src/hooks/useCloudUpsell"
import { Cloud } from "lucide-react"
import { useUpsellVisibility, UPSELL_IDS } from "@/hooks/useUpsellVisibility"
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: Import path inconsistency. Some imports use @/ alias while others use @src/. Consider standardizing on one approach for consistency.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 15, 2025
@brunobergher
Copy link
Collaborator Author

@roomote-agent read through the comments and implement the relevant feedback.

@roomote
Copy link
Contributor

roomote bot commented Sep 15, 2025

Hi @brunobergher, I've reviewed the PR comments and I'm now implementing the requested changes. I'll address the following:

  1. Change isLoading default to false in DismissedUpsellsContext.tsx
  2. Fix import path inconsistency in ChatView.tsx

I'll update you once the changes are complete.

- Change isLoading default to false in DismissedUpsellsContext to prevent flash of upsells
- Fix import path inconsistency in ChatView.tsx (use @src/ instead of @/)
@roomote
Copy link
Contributor

roomote bot commented Sep 15, 2025

Hi @brunobergher,

I've successfully implemented the requested changes from the PR review:

Changed isLoading default to false in DismissedUpsellsContext.tsx (line 26)

  • This prevents the flash of upsells that should be hidden when the component first renders

Fixed import path inconsistency in ChatView.tsx (line 62)

  • Changed @/hooks/useUpsellVisibility to @src/hooks/useUpsellVisibility for consistency

The changes have been pushed to the PR branch. The relevant CI checks (compile, linting, code analysis) are passing. The test failures appear to be pre-existing issues unrelated to these changes.

Let me know if you need any additional adjustments!

@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Sep 15, 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 Sep 15, 2025
@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

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants