Skip to content

Boosted wave preview#1727

Merged
simo6529 merged 4 commits intomainfrom
boosted-wave-preview
Jan 13, 2026
Merged

Boosted wave preview#1727
simo6529 merged 4 commits intomainfrom
boosted-wave-preview

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Jan 12, 2026

Summary by CodeRabbit

  • Refactor
    • Optimized content display and media handling in drop components for improved performance.
    • Streamlined content processing pipeline to better handle text and media assets together.
    • Enhanced interaction handling for drop replies with simplified component composition.

✏️ 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>
Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

The PR consolidates content processing logic for drops by introducing a new buildProcessedContent utility function. Updates include adding .codex/ and .githooks/ to .gitignore and ESLint configurations, refactoring ContentDisplay component props from reply-specific handlers to generic onClick callbacks, and updating dependent components to use the new centralized content processing pattern.

Changes

Cohort / File(s) Summary
Configuration & Ignore Files
.gitignore, eslint.config.mjs, eslint.config.single.mjs, eslint.config.tight.mjs
Added .codex/ and .githooks/ directory ignore entries across ESLint and Git configurations. Reformatted .gitignore and collapsed ESLint rule config into single-line form.
Content Processing Utilities
components/waves/drops/media-utils.ts
Added new DropMediaInput type for media objects. Introduced buildProcessedContent function to synthesize processed content from content strings, media arrays, and fallback text. Normalized string literal types from single to double quotes in MediaItem.type and ContentSegment.type.
ContentDisplay Component Refactoring
components/waves/drops/ContentDisplay.tsx
Changed public prop signature from onReplyClick + serialNo to generic onClick, className, and textClassName. Removed internal click handling; now relies on direct onClick prop and computed containerClasses for conditional styling.
Component Consumers
components/drops/view/BoostedDropCard.tsx, components/waves/drops/WaveDropReply.tsx, components/waves/drops/useDropContent.ts
Updated to use new buildProcessedContent utility and new ContentDisplay prop API. BoostedDropCard replaces manual truncation with memoized preview content. WaveDropReply adapts to new onClick callback pattern. useDropContent refactored from stateful to useMemo-based content computation.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly Related PRs

  • Boosts on sidebar #1713: Adds sidebar component that renders BoostedDropCard items, directly consuming the refactored drop card component.
  • boost boosted drop #1714: Modifies the same BoostedDropCard.tsx file with boost/auth logic, creating potential merge/interaction concerns.
  • Format text #1529: Modifies processContent and markdown normalization in the content processing pipeline that buildProcessedContent now delegates to.

Suggested Reviewers

  • prxt6529
  • ragnep
  • GelatoGenesis

Poem

🐰 Hop through the code with a content refrain,
Building processed drops in a streamlined chain,
From media to text, the utilities align,
Codex and hooks tucked away, just fine—
Simpler clicks, cleaner flows, a rabbit's design! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Boosted wave preview' directly corresponds to the main changes: adding preview content display for boosted drops via ContentDisplay component and buildProcessedContent function.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
components/waves/drops/ContentDisplay.tsx (1)

31-48: Accessibility: Clickable span lacks keyboard support.

When onClick is provided, the <span> becomes interactive but lacks keyboard accessibility. Users navigating via keyboard won't be able to trigger the click action.

Consider adding role="button", tabIndex={0}, and onKeyDown handler for Enter/Space keys, similar to the pattern used in BoostedDropCard.tsx (lines 62-70).

♿ Suggested fix
   return (
-    <span className={containerClasses} onClick={onClick}>
+    <span
+      className={containerClasses}
+      onClick={onClick}
+      onKeyDown={
+        onClick
+          ? (e) => {
+              if (e.key === "Enter" || e.key === " ") {
+                e.preventDefault();
+                onClick();
+              }
+            }
+          : undefined
+      }
+      role={onClick ? "button" : undefined}
+      tabIndex={onClick ? 0 : undefined}
+    >
       <span className={`tw-line-clamp-1 ${textClassName ?? ""}`}>
components/waves/drops/useDropContent.ts (1)

42-48: Inconsistent loading condition between content and isLoading.

Line 43 checks isFetching && !drop for the "Loading..." content, but line 77 returns isLoading: isFetching && !maybeDrop. This inconsistency could cause a mismatch where:

  • maybeDrop is provided (so isLoading is false)
  • But drop is undefined initially (so content shows "Loading...")

Consider aligning both conditions:

🔧 Suggested fix
   const content = useMemo<ProcessedContent>(() => {
-    if (isFetching && !drop) {
+    if (isFetching && !maybeDrop) {
       return {
         segments: [{ type: "text", content: "Loading..." }],
         apiMedia: [],
       };
     }

Or alternatively, use the same derived isLoading check:

+  const isLoading = isFetching && !maybeDrop;
+
   const content = useMemo<ProcessedContent>(() => {
-    if (isFetching && !drop) {
+    if (isLoading) {

Also applies to: 74-79

🧹 Nitpick comments (1)
components/waves/drops/media-utils.ts (1)

150-150: Minor: Redundant type assertion.

The as const assertion on "image" is unnecessary since the ternary expression already produces "video" | "image" which matches the MediaItem.type definition.

🧹 Simplified version
-    type: isVideoMimeType(item.mime_type) ? "video" : ("image" as const),
+    type: isVideoMimeType(item.mime_type) ? "video" : "image",
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8fdfd4f and 6a7b06b.

📒 Files selected for processing (9)
  • .gitignore
  • components/drops/view/BoostedDropCard.tsx
  • components/waves/drops/ContentDisplay.tsx
  • components/waves/drops/WaveDropReply.tsx
  • components/waves/drops/media-utils.ts
  • components/waves/drops/useDropContent.ts
  • eslint.config.mjs
  • eslint.config.single.mjs
  • eslint.config.tight.mjs
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{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/drops/view/BoostedDropCard.tsx
  • components/waves/drops/ContentDisplay.tsx
  • components/waves/drops/useDropContent.ts
  • components/waves/drops/WaveDropReply.tsx
  • components/waves/drops/media-utils.ts
**/*.{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/drops/view/BoostedDropCard.tsx
  • components/waves/drops/ContentDisplay.tsx
  • components/waves/drops/WaveDropReply.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/drops/view/BoostedDropCard.tsx
  • components/waves/drops/ContentDisplay.tsx
  • components/waves/drops/useDropContent.ts
  • components/waves/drops/WaveDropReply.tsx
  • components/waves/drops/media-utils.ts
**/*.{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/drops/view/BoostedDropCard.tsx
  • components/waves/drops/ContentDisplay.tsx
  • components/waves/drops/WaveDropReply.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/drops/view/BoostedDropCard.tsx
  • components/waves/drops/ContentDisplay.tsx
  • components/waves/drops/useDropContent.ts
  • components/waves/drops/WaveDropReply.tsx
  • components/waves/drops/media-utils.ts
**/*.{tsx,ts}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript with React functional components and hooks

Files:

  • components/drops/view/BoostedDropCard.tsx
  • components/waves/drops/ContentDisplay.tsx
  • components/waves/drops/useDropContent.ts
  • components/waves/drops/WaveDropReply.tsx
  • components/waves/drops/media-utils.ts
**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • components/drops/view/BoostedDropCard.tsx
  • components/waves/drops/ContentDisplay.tsx
  • components/waves/drops/useDropContent.ts
  • components/waves/drops/WaveDropReply.tsx
  • components/waves/drops/media-utils.ts
**/*.{ts,js}

📄 CodeRabbit inference engine (AGENTS.md)

When parsing Seize URLs or similar, fail fast if base origin is unavailable instead of falling back to placeholder origins

Files:

  • components/waves/drops/useDropContent.ts
  • components/waves/drops/media-utils.ts
🧠 Learnings (29)
📚 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 **/*.{js,ts,jsx,tsx} : Do not add `eslint-disable` comments unless explicitly instructed; prefer refactors aligned with React 19.2, React Compiler, and Next.js 16 conventions

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
📚 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 next.config.{ts,js,mjs} : Remove any `eslint` options from `next.config.*` files in Next.js 16

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
📚 Learning: 2025-11-25T08:35:58.729Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Do not include any comments in the code; it should be self-explanatory

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
📚 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 **/*.{js,ts,jsx,tsx} : Code must satisfy ESLint with Next's Core Web Vitals and React Hooks rules by running `npm run lint`

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Fix issues with modernization aligned to React 19.2, React Compiler, and Next.js 16 conventions. Do not add `// eslint-disable` comments unless explicitly instructed.

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
📚 Learning: 2025-12-30T14:32:37.305Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: __tests__/AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:37.305Z
Learning: Applies to __tests__/**/*.{ts,tsx,js},!**/__tests__/**,!**/__mocks__/**,!**/*.d.ts : Avoid double negatives in code; prefer explicit statements and use optional chaining (`?.`)

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Applies to next.config.{js,ts,mjs,mts} : With Next.js 16, `next lint` is removed. Use the ESLint CLI driven by `eslint-config-next` (flat config). Remove any `eslint` options from `next.config.*`.

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
📚 Learning: 2025-11-25T08:35:58.729Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use NextJS features that match the current version

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Run `npm run lint` to ensure code satisfies ESLint (Next's Core Web Vitals + React Hooks). Code must pass linting before completing any task.

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
  • .gitignore
📚 Learning: 2025-11-25T08:35:58.729Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Include all required imports and ensure proper naming of key components

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : 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.

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
📚 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 {eslint.config.js,next.config.ts} : Use ESLint CLI driven by `eslint-config-next` (flat config) instead of `next lint` (removed in Next.js 16)

Applied to files:

  • eslint.config.single.mjs
  • eslint.config.mjs
  • eslint.config.tight.mjs
📚 Learning: 2025-12-30T14:32:37.305Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: __tests__/AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:37.305Z
Learning: Applies to __tests__/**/*.{ts,tsx,js},!**/__tests__/**,!**/__mocks__/**,!**/*.d.ts : Limit function cognitive complexity to 15 or less; extract deep ternaries (>3 levels)

Applied to files:

  • eslint.config.mjs
📚 Learning: 2025-11-25T08:35:58.729Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{tsx,jsx} : Use TailwindCSS for styling in React components

Applied to files:

  • eslint.config.tight.mjs
📚 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,jsx} : Replace `<img>` elements with `<Image />` from `next/image`

Applied to files:

  • eslint.config.tight.mjs
  • components/waves/drops/WaveDropReply.tsx
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Applies to **/*.{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.

Applied to files:

  • components/waves/drops/useDropContent.ts
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use `useEffectEvent` for non-reactive logic inside Effects to read the latest props/state without turning them into dependencies or causing unnecessary re-runs.

Applied to files:

  • components/waves/drops/useDropContent.ts
📚 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 **/*.{ts,tsx,js,jsx} : Remove unnecessary Effects; if the Effect only derives state, compute during render instead

Applied to files:

  • components/waves/drops/useDropContent.ts
📚 Learning: 2025-11-25T08:35:58.729Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{tsx,jsx} : Use react-query for data fetching

Applied to files:

  • components/waves/drops/useDropContent.ts
📚 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/useDropContent.ts
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Run `npm run test` to execute all Jest tests and enforce ≥80% line coverage for files changed since `main`. Tests must pass and coverage threshold must be met before completing any task.

Applied to files:

  • .gitignore
📚 Learning: 2025-11-25T08:36:24.149Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-25T08:36:24.149Z
Learning: Applies to **/tasks.json : Task structure must include fields: id (unique identifier), title (brief descriptive title), description (concise summary), status (current state), dependencies (IDs of prerequisite tasks), priority (importance level), details (in-depth implementation instructions), testStrategy (verification approach), and subtasks (list of smaller tasks)

Applied to files:

  • .gitignore
📚 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 **/*.{test,spec}.{js,ts,jsx,tsx} : Enforce ≥ 80% line coverage for files changed since `main` by running `npm run test`

Applied to files:

  • .gitignore
📚 Learning: 2025-12-30T14:32:37.305Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: __tests__/AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:37.305Z
Learning: Applies to __tests__/**/__mocks__/**/*.{ts,tsx,js} : Jest automatically picks up mocks from `__mocks__` directory

Applied to files:

  • .gitignore
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Applies to **/__tests__/**/*.{test,spec}.{ts,tsx,js,jsx}|**/*.{test,spec}.{ts,tsx,js,jsx} : Place tests in `__tests__/` directory or as `ComponentName.test.tsx` files. Mock external dependencies and APIs in tests.

Applied to files:

  • .gitignore
📚 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 **/{__tests__,*.test.{tsx,ts}} : Place tests in `__tests__/` directory or as `ComponentName.test.tsx` alongside the component

Applied to files:

  • .gitignore
📚 Learning: 2025-11-25T08:36:24.149Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-25T08:36:24.149Z
Learning: Applies to **/tasks.json : Use 'pending' status for tasks ready to be worked on, 'done' for completed and verified tasks, and 'deferred' for postponed tasks; add custom status values as needed for project-specific workflows

Applied to files:

  • .gitignore
📚 Learning: 2025-12-30T14:31:53.006Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:53.006Z
Learning: Applies to **/*.{jsx,tsx} : 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`.

Applied to files:

  • components/waves/drops/WaveDropReply.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,jsx} : Use internal links via `<Link>` component from Next.js instead of `<a>` tags

Applied to files:

  • components/waves/drops/WaveDropReply.tsx
🧬 Code graph analysis (2)
components/drops/view/BoostedDropCard.tsx (2)
components/waves/drops/media-utils.ts (1)
  • buildProcessedContent (142-163)
components/waves/drops/ContentDisplay.tsx (1)
  • ContentDisplay (15-50)
components/waves/drops/media-utils.ts (2)
scripts/dev-open.cjs (1)
  • match (43-43)
helpers/video.helpers.ts (1)
  • isVideoUrl (68-81)
⏰ 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 (13)
components/drops/view/BoostedDropCard.tsx (2)

37-40: LGTM! Clean refactor to centralized content processing.

The useMemo correctly derives previewContent from drop.parts[0], and the dependency array properly includes drop.parts. This aligns well with the coding guidelines to compute derived state during render using useMemo instead of effects.


106-109: LGTM! ContentDisplay integration looks correct.

The component correctly passes previewContent and applies custom styling via className. This is consistent with the new ContentDisplay API and maintains the preview functionality.

components/waves/drops/ContentDisplay.tsx (1)

21-29: LGTM! Clean class composition.

The array-based class composition with filter(Boolean) handles the conditional styling well and gracefully handles undefined className.

components/waves/drops/WaveDropReply.tsx (2)

66-69: LGTM! Clean adaptation to new ContentDisplay API.

The inline callback onClick={() => onReplyClick(drop.serial_no)} correctly bridges the new generic onClick prop to the component's specific onReplyClick handler. The access to drop.serial_no is safe since this code path is only reached when drop?.author.handle is truthy.


1-1: LGTM! "use client" directive is appropriate.

This component uses the useDropContent hook which relies on useQuery and useMemo, so the client directive is correctly placed.

components/waves/drops/useDropContent.ts (1)

3-3: LGTM! Good refactor from useEffect/useState to useMemo.

The migration from effect-based state management to memoized computation aligns with the coding guidelines: "Remove unnecessary Effects. If the Effect's only job is to derive or sync internal state, calculate during render or use useMemo instead." Based on learnings, this is the preferred pattern.

Also applies to: 42-72

components/waves/drops/media-utils.ts (2)

142-163: LGTM! Well-designed utility function.

buildProcessedContent cleanly encapsulates the content/media processing logic with sensible defaults. The function correctly:

  • Handles null/undefined inputs
  • Provides a fallback text when no content and no media exist
  • Delegates to processContent when content is present

8-38: The two isVideoUrl implementations serve different purposes and should not be combined.

The isVideoUrl in helpers/video.helpers.ts (lines 68-81) only checks file extensions. The isVideoUrl in components/waves/drops/media-utils.ts also detects video hosting service URLs (YouTube, Vimeo, Dailymotion, Twitch). These are not duplicates—reusing the helper would lose the video platform detection functionality. Keep the current implementation.

Likely an incorrect or invalid review comment.

eslint.config.mjs (2)

384-390: OK: max-lines rule formatting-only change.
No semantic impact.


406-430: Good: add .claude/** and .codex/** to globalIgnores for consistent lint scope.
For defensive coding, consider using **/.codex/** instead of .codex/** in case these directories are nested at non-root levels in the future.

eslint.config.tight.mjs (1)

414-437: LGTM: keep “tight” config aligned by ignoring .claude/** and .codex/**.

.gitignore (1)

76-96: The .githooks/ entry in .gitignore is appropriate. The directory does not exist in the repository and has no tracked files or documentation indicating it should be shared with the team. This is a standard preventative entry for local-only tool directories. The tasks/ formatting fix and .codex/ ignore are fine.

eslint.config.single.mjs (1)

54-77: Good: ESLint global ignores now align with .codex/ tooling directory. The pattern .codex/** correctly targets the root-level hidden tooling directory and is consistent with the existing .claude/** pattern. No nested .codex directories exist, so the root-level glob is appropriate.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 13, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
3.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@simo6529 simo6529 merged commit a718355 into main Jan 13, 2026
7 of 8 checks passed
@simo6529 simo6529 deleted the boosted-wave-preview branch January 13, 2026 08:01
@coderabbitai coderabbitai Bot mentioned this pull request Feb 9, 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