Skip to content

Memes submission copy link drop#2214

Merged
simo6529 merged 3 commits intomainfrom
memes-submission-copy-link-drop
Apr 6, 2026
Merged

Memes submission copy link drop#2214
simo6529 merged 3 commits intomainfrom
memes-submission-copy-link-drop

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Apr 6, 2026

Summary by CodeRabbit

  • New Features

    • Added wave selections functionality with management endpoints.
    • Updated copy link behavior for memes submissions to use a distinct URL format.
  • Documentation

    • Updated copy link feature documentation to reflect conditional URL generation for different drop types.

simo6529 added 3 commits April 6, 2026 09:27
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

This PR implements conditional drop link copying behavior based on whether a drop belongs to a memes wave, adding a new getCopiedDropLink helper. It enriches drop and wave objects with selections data, adds wave selections REST endpoints to the API specification, and updates components and tests to reflect these changes.

Changes

Cohort / File(s) Summary
Drop Copy-Link Tests
__tests__/components/waves/drops/WaveDropActionsCopyLink.test.tsx, __tests__/components/waves/drops/WaveDropMobileMenu.test.tsx
Updated tests to mock useSeizeSettings and isMemesWave. Added test cases for conditional copy-link URLs: non-memes drops use serialNo parameter while memes submissions use drop parameter. Introduced shared mock functions for per-test control of meme-wave state.
Drop Copy-Link Components
components/waves/drops/WaveDropActionsCopyLink.tsx, components/waves/drops/WaveDropMobileMenu.tsx
Replaced manual copy-link construction using publicEnv.BASE_ENDPOINT + getWaveRoute with new getCopiedDropLink helper. Added useSeizeSettings dependency to derive isMemesWave predicate.
Copy-Link Helper
helpers/waves/drop-copy-link.helpers.ts
New helper module exporting getCopiedDropLink function. Implements conditional logic: memes submission drops (isMemesWave and ApiDropType.Participatory) use drop={id} query; other drops use serialNo={serial_no}.
Data Enrichment
components/waves/memes/submission/utils/buildPreviewDrop.ts, components/waves/utils/getOptimisticDrop.ts, hooks/useWaveDropsSearch.ts
Added selections field to drop and wave objects. buildPreviewDrop and getOptimisticDrop now include wave.selections and top-level selections: []. useWaveDropsSearch's toWaveMin mapper now preserves selections from source wave.
User Page Layout
components/user/layout/userPageVisibility.ts
Changed normalizeCountry from exported public constant to non-exported internal helper, removing its external visibility.
API Specification
openapi.yaml
Added wave selections REST endpoints (GET/POST/DELETE /waves/{id}/selections and drop-selection operations). Introduced selection_id query parameter to drop-listing endpoints. Extended ApiDrop, ApiWave, ApiWaveMin, and related schemas with selections array property. Added new schemas: ApiWaveSelection, ApiWaveSelectionRequest, ApiWaveSelectionDropRequest.
Documentation
docs/waves/drop-actions/feature-open-and-copy-links.md
Updated copy-link behavior documentation to clarify conditional URL generation: serialNo for regular drops vs. drop for memes submissions. Revised limitations section to reflect distinct navigation mechanisms.

Possibly related issues

Possibly related PRs

Suggested reviewers

  • ragnep
  • prxt6529
  • GelatoGenesis

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes


🐰 Hops along the wave with glee,
Copy links now dance wild and free!
Memes get drops, others get serials—
Each selection builds in trials,
The chaos blooms, the rabbit sighs, 🎪✨

🚥 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 directly references the main change: implementing copy link functionality specifically for memes submission drops, which is the core feature across multiple component and helper updates.
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
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch memes-submission-copy-link-drop

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 Apr 6, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51812e3088

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread helpers/waves/drop-copy-link.helpers.ts
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

Caution

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

⚠️ Outside diff range comments (1)
openapi.yaml (1)

8380-8475: ⚠️ Potential issue | 🟠 Major

Remove selections from required fields until all producers emit it.

selections has been added as required to shared schemas (ApiDrop, ApiDropWithoutWave, ApiWave, ApiWaveMin), widening the contract for existing endpoints and nested payloads like ApiWave.description_drop, ApiQuotedDropResponse.drop, ApiReplyToDropResponse.drop, ApiWaveDropsFeed.root_drop, and ApiNotification.related_drops. The generated models are now non-optional, so any serializer that omits the field instead of returning [] will violate the contract. Either guarantee selections: [] everywhere first, or keep this property optional for safe rollout.

Also applies to: 8851-8945 (ApiDropWithoutWave), 11362-11418 (ApiWave), 11773-11833 (ApiWaveMin)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@openapi.yaml` around lines 8380 - 8475, The schema change made the property
"selections" required on shared schemas (ApiDrop, ApiDropWithoutWave, ApiWave,
ApiWaveMin), breaking clients that omit it; revert that by removing "selections"
from the required arrays (or make it optional/null-able) in each affected schema
(ApiDrop, ApiDropWithoutWave, ApiWave, ApiWaveMin) so the property remains
optional until all producers emit selections (also ensure nested usages like
ApiWave.description_drop, ApiQuotedDropResponse.drop,
ApiReplyToDropResponse.drop, ApiWaveDropsFeed.root_drop,
ApiNotification.related_drops are consistent with the optional change).
🧹 Nitpick comments (1)
openapi.yaml (1)

12023-12048: Mirror the title constraints on ApiWaveSelection.

ApiWaveSelectionRequest.title is constrained to 1..250 chars, but ApiWaveSelection.title currently allows empty or arbitrarily long values. Keeping the response schema aligned avoids drift in generated docs and validators.

🧩 Suggested schema tweak
     ApiWaveSelection:
       type: object
       required:
         - id
         - title
       properties:
         id:
           type: string
         title:
           type: string
+          minLength: 1
+          maxLength: 250
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@openapi.yaml` around lines 12023 - 12048, ApiWaveSelection's title property
lacks the same length constraints as ApiWaveSelectionRequest.title, causing
schema drift; update the ApiWaveSelection schema so the title property includes
minLength: 1 and maxLength: 250 (mirror the constraints from
ApiWaveSelectionRequest.title) so responses and requests validate consistently
for the title field.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/waves/drop-actions/feature-open-and-copy-links.md`:
- Around line 63-64: Update the ambiguous sentence about copied links opening
the single-drop overlay to explicitly state that memes submission drop copied
links are the exception to the general rule; edit the phrase mentioning "Memes
submission drop copy links use canonical wave drop URLs and open the single-drop
overlay" to add "Note: this is an exception — copied links normally do not force
overlay mode except for memes submission drops," and mirror this clarification
in the limitations section (the paragraph that currently states copied links do
not force overlay mode) by adding an explicit exception callout referencing
"memes submission drops" and the "single-drop overlay."

---

Outside diff comments:
In `@openapi.yaml`:
- Around line 8380-8475: The schema change made the property "selections"
required on shared schemas (ApiDrop, ApiDropWithoutWave, ApiWave, ApiWaveMin),
breaking clients that omit it; revert that by removing "selections" from the
required arrays (or make it optional/null-able) in each affected schema
(ApiDrop, ApiDropWithoutWave, ApiWave, ApiWaveMin) so the property remains
optional until all producers emit selections (also ensure nested usages like
ApiWave.description_drop, ApiQuotedDropResponse.drop,
ApiReplyToDropResponse.drop, ApiWaveDropsFeed.root_drop,
ApiNotification.related_drops are consistent with the optional change).

---

Nitpick comments:
In `@openapi.yaml`:
- Around line 12023-12048: ApiWaveSelection's title property lacks the same
length constraints as ApiWaveSelectionRequest.title, causing schema drift;
update the ApiWaveSelection schema so the title property includes minLength: 1
and maxLength: 250 (mirror the constraints from ApiWaveSelectionRequest.title)
so responses and requests validate consistently for the title field.
🪄 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: 873fb7fe-1f37-4f07-86b9-f8b5ca2a4f78

📥 Commits

Reviewing files that changed from the base of the PR and between bb90662 and 51812e3.

⛔ Files ignored due to path filters (8)
  • generated/models/ApiDrop.ts is excluded by !**/generated/**
  • generated/models/ApiDropWithoutWave.ts is excluded by !**/generated/**
  • generated/models/ApiWave.ts is excluded by !**/generated/**
  • generated/models/ApiWaveMin.ts is excluded by !**/generated/**
  • generated/models/ApiWaveSelection.ts is excluded by !**/generated/**
  • generated/models/ApiWaveSelectionDropRequest.ts is excluded by !**/generated/**
  • generated/models/ApiWaveSelectionRequest.ts is excluded by !**/generated/**
  • generated/models/ObjectSerializer.ts is excluded by !**/generated/**
📒 Files selected for processing (11)
  • __tests__/components/waves/drops/WaveDropActionsCopyLink.test.tsx
  • __tests__/components/waves/drops/WaveDropMobileMenu.test.tsx
  • components/user/layout/userPageVisibility.ts
  • components/waves/drops/WaveDropActionsCopyLink.tsx
  • components/waves/drops/WaveDropMobileMenu.tsx
  • components/waves/memes/submission/utils/buildPreviewDrop.ts
  • components/waves/utils/getOptimisticDrop.ts
  • docs/waves/drop-actions/feature-open-and-copy-links.md
  • helpers/waves/drop-copy-link.helpers.ts
  • hooks/useWaveDropsSearch.ts
  • openapi.yaml

Comment thread docs/waves/drop-actions/feature-open-and-copy-links.md
@simo6529 simo6529 merged commit 79f7992 into main Apr 6, 2026
8 checks passed
@simo6529 simo6529 deleted the memes-submission-copy-link-drop branch April 6, 2026 08:16
This was referenced Apr 6, 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