Skip to content

removed filters and added drop navigation#2328

Merged
ragnep merged 3 commits intomainfrom
curation-feed-work
Apr 28, 2026
Merged

removed filters and added drop navigation#2328
ragnep merged 3 commits intomainfrom
curation-feed-work

Conversation

@ragnep
Copy link
Copy Markdown
Contributor

@ragnep ragnep commented Apr 28, 2026

Summary by CodeRabbit

  • Changed Features

    • Removed media type filter from community curations; section now displays all curated drops without filtering by media type
  • Bug Fixes

    • Quote interactions and drop content clicks now navigate to associated drop waves instead of remaining inactive

Signed-off-by: ragnep <ragneinfo@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@ragnep has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 56 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: adc770f7-f151-4cf9-9ae7-7286d315f16c

📥 Commits

Reviewing files that changed from the base of the PR and between 2c4df34 and 934f770.

📒 Files selected for processing (2)
  • __tests__/hooks/useCommunityCurationsDrops.test.ts
  • hooks/useNavigateToDropWave.ts
📝 Walkthrough

Walkthrough

The pull request removes media filtering functionality from community curations components, deletes the associated helper utilities, and introduces a new useNavigateToDropWave hook that enables navigation to drop waves via click interactions. The filtering logic, state, and UI controls are stripped from CommunityCurations.tsx and useCommunityCurationsDrops.ts, while drop masonry components are rewired to use the new navigation hook.

Changes

Cohort / File(s) Summary
Community Curations UI
components/community-curations/CommunityCurations.tsx, components/community-curations/CommunityCurationsMasonry.tsx
Removes mediaFilter state management and filter UI controls; wires masonry item click handlers (onQuoteClick, onDropContentClick) to the new useNavigateToDropWave hook for drop wave navigation.
Filtering Hook
hooks/useCommunityCurationsDrops.ts
Removes mediaFilter prop and the memoized filtering step; hook now returns unfiltered drops from query pages.
Navigation Hook
hooks/useNavigateToDropWave.ts
New hook that returns a callback for navigating to drop waves, computing destination URL using drop wave ID, serial number, direct-message status, and device info, then routing via router.push.
Media Type Helper
components/community-curations/communityCurations.helpers.ts
Deleted helper module containing getCommunityCurationsMediaType() and related utilities for inferring media types from drops and metadata.
User Profile Waves
components/user/waves/UserPageProfileWaveMasonry.tsx
Replaces no-op click callbacks with useNavigateToDropWave hook integration for quote and drop content interactions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • Redirect to drop link fix #1559: Modifies drop-to-wave navigation logic and direct-message status determination for route computation, directly related to the new useNavigateToDropWave hook implementation.
  • fix identity waves link click #1835: Adds navigation wiring for wave item interactions, paralleling the pattern of hooking click handlers into wave navigation in this PR.
  • removed curation list view #2269: Consolidates curation views around masonry components and removes alternate rendering paths, complementing the removal of media filtering controls in this change.

Suggested reviewers

  • simo6529
  • GelatoGenesis

Poem

🐰 Hops skip the filters, waves now in sight,
Navigation wired up, interactions take flight!
Media types depart, helpers find rest,
Drop-to-wave routes—hopping our best!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: removing media filters from community curations and adding drop wave navigation functionality across multiple components.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch curation-feed-work

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

🧹 Nitpick comments (1)
hooks/useNavigateToDropWave.ts (1)

8-35: Reduce contract drift by reusing the shared drop type.

The local nested DropWaveNavigationTarget duplicates the generated drop structure and is likely to drift. Prefer deriving it from the shared API model to keep this hook aligned with upstream shape changes.

♻️ Proposed refactor
+import type { ApiDrop } from "@/generated/models/ApiDrop";
 import { getWaveRoute } from "@/helpers/navigation.helpers";
 import { useRouter } from "next/navigation";
 import { useCallback } from "react";
 import useDeviceInfo from "./useDeviceInfo";

-type DropWaveNavigationTarget = {
-  readonly wave?:
-    | {
-        readonly id?: string | null | undefined;
-        readonly chat?:
-          | {
-              readonly scope?:
-                | {
-                    readonly group?:
-                      | {
-                          readonly is_direct_message?:
-                            | boolean
-                            | null
-                            | undefined;
-                        }
-                      | null
-                      | undefined;
-                  }
-                | null
-                | undefined;
-            }
-          | null
-          | undefined;
-      }
-    | null
-    | undefined;
-  readonly serial_no: number | string;
-};
+type DropWaveNavigationTarget = Pick<ApiDrop, "wave" | "serial_no">;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@hooks/useNavigateToDropWave.ts` around lines 8 - 35, The local
DropWaveNavigationTarget type duplicates the generated drop shape and should be
replaced with the shared API model to avoid contract drift; update the hook to
import and reuse the generated drop type (for example the shared Drop or
DropWave type from your API models) and compose it with the serial_no field if
needed (e.g. type DropWaveNavigationTarget = SharedDropType & { serial_no:
number | string } or use Pick/Partial to match nullable fields), then remove the
local nested declaration and update any references to DropWaveNavigationTarget
accordingly (look for the type name DropWaveNavigationTarget and the
hook/function that consumes it).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@hooks/useNavigateToDropWave.ts`:
- Around line 50-53: The navigation currently builds a route with getWaveRoute
using waveId and drop.serial_no even when serial_no may be empty; update the
guard in useNavigateToDropWave so it checks both waveId and a valid non-empty
drop.serial_no (e.g., truthy string or numeric check) before calling
getWaveRoute and router.push, and bail out early (no navigation) if serial_no is
missing/invalid to avoid pushing malformed routes.

---

Nitpick comments:
In `@hooks/useNavigateToDropWave.ts`:
- Around line 8-35: The local DropWaveNavigationTarget type duplicates the
generated drop shape and should be replaced with the shared API model to avoid
contract drift; update the hook to import and reuse the generated drop type (for
example the shared Drop or DropWave type from your API models) and compose it
with the serial_no field if needed (e.g. type DropWaveNavigationTarget =
SharedDropType & { serial_no: number | string } or use Pick/Partial to match
nullable fields), then remove the local nested declaration and update any
references to DropWaveNavigationTarget accordingly (look for the type name
DropWaveNavigationTarget and the hook/function that consumes it).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 79c19d6e-40c0-4a67-a310-ca66b700e0de

📥 Commits

Reviewing files that changed from the base of the PR and between da97044 and 2c4df34.

📒 Files selected for processing (6)
  • components/community-curations/CommunityCurations.tsx
  • components/community-curations/CommunityCurationsMasonry.tsx
  • components/community-curations/communityCurations.helpers.ts
  • components/user/waves/UserPageProfileWaveMasonry.tsx
  • hooks/useCommunityCurationsDrops.ts
  • hooks/useNavigateToDropWave.ts
💤 Files with no reviewable changes (1)
  • components/community-curations/communityCurations.helpers.ts

Comment thread hooks/useNavigateToDropWave.ts Outdated
ragnep added 2 commits April 28, 2026 15:34
Signed-off-by: ragnep <ragneinfo@gmail.com>
Signed-off-by: ragnep <ragneinfo@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

@ragnep ragnep merged commit b2ad024 into main Apr 28, 2026
8 checks passed
@ragnep ragnep deleted the curation-feed-work branch April 28, 2026 12:55
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