Skip to content

Boosts fix#1710

Merged
simo6529 merged 2 commits intomainfrom
boosts-fix
Jan 8, 2026
Merged

Boosts fix#1710
simo6529 merged 2 commits intomainfrom
boosts-fix

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Jan 8, 2026

Summary by CodeRabbit

  • New Features
    • Added boost functionality to the mobile menu, allowing users to boost or remove boost from drops directly from the mobile view with visual feedback indicating the current boost state.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 8, 2026

📝 Walkthrough

Walkthrough

A new WaveDropMobileMenuBoost component is added to enable drop boost toggling in the mobile menu. The component manages local pending state, checks boost eligibility based on auth context, and calls a boost mutation on click. WaveDropMobileMenu imports and renders the new component, passing drop and callback props. Existing menu options remain unchanged.

Changes

Cohort / File(s) Summary
Mobile Menu Boost Integration
components/waves/drops/WaveDropMobileMenu.tsx
Imports and renders new WaveDropMobileMenuBoost component, passing drop as extendedDrop and closeMenu as onBoostChange callback. Minor className reordering in Reply/Quote sections preserves styling.
Boost Component Implementation
components/waves/drops/WaveDropMobileMenuBoost.tsx
New React component that renders a contextual boost/remove-boost button. Uses AuthContext and useDropBoostMutation to manage boost state. Eligibility checks prevent boosting temporary drops and unauthenticated users. Loading states and error handling included.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Boosted drops #1706: Introduces boost-related hooks and components that are directly leveraged by the new WaveDropMobileMenuBoost component for drop boost functionality.

Suggested reviewers

  • ragnep

Poem

🐰 Hops of joy through mobile menus,
A boost button now extends the venue!
Click to amplify drops with might,
Auth-checked and pending-state-light ✨
Mobile magic, tested right!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Boosts fix' is generic and doesn't specifically convey what was fixed or what changes were made. While it relates to the changeset's boost functionality, it lacks detail about the actual implementation. Consider revising the title to be more specific, such as 'Add boost toggle to mobile menu' or 'Implement WaveDropMobileMenuBoost component for mobile menu' to better describe the primary changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 8, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @components/waves/drops/WaveDropMobileMenuBoost.tsx:
- Line 21: Remove the redundant isLocalPending state and all its setters
(isLocalPending, setIsLocalPending) and let the useDropBoostMutation-provided
loading flag track mutation state; update toggleBoost to call mutation.mutate
without wrapping it in try/catch or setting local pending, and replace any
combined loading expression that used isLocalPending (e.g., isLoading =
isPending || isLocalPending) to use only the mutation's isLoading/isPending
value returned from useDropBoostMutation; ensure no other references to
isLocalPending remain (including in JSX).
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acb01f0 and 637120d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • components/waves/drops/WaveDropMobileMenu.tsx
  • components/waves/drops/WaveDropMobileMenuBoost.tsx
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Remove unnecessary Effects. If the Effect's only job is to derive or sync internal state, calculate during render or use useMemo instead.
Use useEffectEvent for non-reactive logic inside Effects to read the latest props/state without turning them into dependencies or causing unnecessary re-runs.
Use explicit caching with "use cache" directive at the top of Server Components, routes, or functions. Configure cacheComponents: true in next.config.ts as needed.

**/*.{ts,tsx,js,jsx}: Remove unnecessary Effects; if the Effect only derives state, compute during render instead
Use useEffectEvent when listening to external events but needing the latest props/state without re-running the Effect
Move data fetching from client Effects to Server Components; mutations go through Server Actions ('use server')

Files:

  • components/waves/drops/WaveDropMobileMenuBoost.tsx
  • components/waves/drops/WaveDropMobileMenu.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{tsx,jsx}: Use FontAwesome for icons in React components
Use TailwindCSS for styling in React components
Use react-query for data fetching
Always add readonly before props in React components

**/*.{tsx,jsx}: Use internal links via <Link> component from Next.js instead of <a> tags
Replace <img> elements with <Image /> from next/image

Files:

  • components/waves/drops/WaveDropMobileMenuBoost.tsx
  • components/waves/drops/WaveDropMobileMenu.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Run npm run lint to ensure code satisfies ESLint (Next's Core Web Vitals + React Hooks). Code must pass linting before completing any task.

**/*.{js,ts,jsx,tsx}: Code must satisfy ESLint with Next's Core Web Vitals and React Hooks rules by running npm run lint
Do not add eslint-disable comments unless explicitly instructed; prefer refactors aligned with React 19.2, React Compiler, and Next.js 16 conventions

Files:

  • components/waves/drops/WaveDropMobileMenuBoost.tsx
  • components/waves/drops/WaveDropMobileMenu.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

**/*.{jsx,tsx}: Replace <img> elements with <Image /> from next/image to comply with Next.js ESLint rule @next/next/no-img-element.
Use <Link href="/path"> from Next.js for internal navigation instead of raw <a> tags to comply with @next/next/no-html-link-for-pages.

Files:

  • components/waves/drops/WaveDropMobileMenuBoost.tsx
  • components/waves/drops/WaveDropMobileMenu.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Use TypeScript with React functional components and hooks. Follow existing code style and naming conventions.

Files:

  • components/waves/drops/WaveDropMobileMenuBoost.tsx
  • components/waves/drops/WaveDropMobileMenu.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript with React functional components and hooks

Files:

  • components/waves/drops/WaveDropMobileMenuBoost.tsx
  • components/waves/drops/WaveDropMobileMenu.tsx
**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (AGENTS.md)

Prefer direct named imports from React (useMemo, useRef, FC) over React. namespace usage

Files:

  • components/waves/drops/WaveDropMobileMenuBoost.tsx
  • components/waves/drops/WaveDropMobileMenu.tsx
🧠 Learnings (2)
📚 Learning: 2025-12-30T14:32:19.360Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.360Z
Learning: Applies to **/*.{tsx,ts} : Use TypeScript with React functional components and hooks

Applied to files:

  • components/waves/drops/WaveDropMobileMenu.tsx
📚 Learning: 2025-12-30T14:32:19.360Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.360Z
Learning: Applies to **/*.{tsx,ts,jsx,js} : Prefer direct named imports from React (`useMemo`, `useRef`, `FC`) over `React.` namespace usage

Applied to files:

  • components/waves/drops/WaveDropMobileMenu.tsx
🧬 Code graph analysis (1)
components/waves/drops/WaveDropMobileMenuBoost.tsx (4)
helpers/waves/drop.helpers.ts (1)
  • ExtendedDrop (16-20)
components/auth/Auth.tsx (1)
  • AuthContext (106-116)
hooks/drops/useDropBoostMutation.ts (1)
  • useDropBoostMutation (27-183)
components/waves/drops/WaveDropActionsBoost.tsx (1)
  • useContext (21-127)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
components/waves/drops/WaveDropMobileMenu.tsx (2)

11-11: LGTM!

Direct import of FC from React follows best practices and coding guidelines.


221-224: LGTM!

The new WaveDropMobileMenuBoost component is properly integrated with correct props (extendedDrop and closeMenu callback).

components/waves/drops/WaveDropMobileMenuBoost.tsx (3)

1-13: LGTM!

Imports and component structure follow coding guidelines: direct named imports from React, readonly props, and TypeScript with functional components.

Based on learnings, direct imports and readonly props are correctly applied.


46-68: LGTM!

Button styling and rendering logic correctly use TailwindCSS and conditionally style based on boost state (isBoosted). The icon and text appropriately reflect whether the drop is boosted.


42-44: This matches the established codebase pattern.

The return null approach when !canBoost is consistent with how other mobile menu items handle eligibility. Open (returns null for chat drops), Edit (returns null for non-authors), and Boost all hide entirely rather than show disabled. This appears to be the intentional UX pattern for this menu system—ineligible actions are not rendered.

Comment thread components/waves/drops/WaveDropMobileMenuBoost.tsx
@simo6529 simo6529 merged commit 0349457 into main Jan 8, 2026
10 checks passed
@simo6529 simo6529 deleted the boosts-fix branch January 8, 2026 08:47
This was referenced Jan 24, 2026
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.

2 participants