Skip to content

AI integration#118

Open
vaguue wants to merge 7 commits intoRule-34:mainfrom
vaguue:main
Open

AI integration#118
vaguue wants to merge 7 commits intoRule-34:mainfrom
vaguue:main

Conversation

@vaguue
Copy link
Copy Markdown

@vaguue vaguue commented Apr 7, 2026

Summary by CodeRabbit

  • New Features
    • Added AI video generation feature for image posts. A new action button is now available when viewing images, allowing users to generate AI-enhanced videos with a single click through an external service.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

A new PostNud3 component is added to render a link for AI video generation. The component is conditionally integrated into PostComponent to display only for image-type posts with available media files, passing the media URL as a prop for external processing.

Changes

Cohort / File(s) Summary
Post AI Video Integration
components/pages/posts/post/PostComponent.vue, components/pages/posts/post/PostNud3.vue
Added new PostNud3 component that generates a link to nud3.me service with encoded media URL. Component is conditionally rendered in PostComponent when post media type is 'image' and media file exists. Includes responsive icon and text display with hover styling.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'AI integration' is vague and generic. While the PR adds an AI Video component, the term 'integration' is broad and doesn't clearly convey the specific change of adding a nudification feature link. Consider a more specific title that describes the actual feature, such as 'Add AI Video generation link to post actions' or 'Integrate nud3.me AI video feature'.
✅ 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 unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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.

Warning

⚠️ This pull request might be slop. It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

Copy link
Copy Markdown
Contributor

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@components/pages/posts/post/PostComponent.vue`:
- Around line 173-176: The PostNud3 export is using post.high_res_file.url first
which bypasses the normalized URL in mediaFile (which strips fragments and
respects selected resolution); update the binding so :mediaUrl prefers
mediaFile.file (the normalized/selected URL) first, then falls back to
post.high_res_file.url and post.low_res_file.url as backups, keeping the
existing v-if that checks mediaFile.file; modify the :mediaUrl expression near
the PostNud3 component accordingly.
- Around line 173-176: The PostNud3 component is unconditionally sending image
URLs to an external service; gate or remove it by using the user's setting from
useUserSettings. Import/use the hook to access blockAiGeneratedImages and update
the PostNud3 render condition (currently checking post.media_type and
mediaFile.file) to also require !blockAiGeneratedImages, e.g. only render
PostNud3 when post.media_type === 'image' && mediaFile.file &&
!blockAiGeneratedImages; alternatively remove the PostNud3 rendering entirely if
consent flow is not implemented.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: af5ab49b-0a4d-48d3-84e8-4ecaedf8c1f7

📥 Commits

Reviewing files that changed from the base of the PR and between 29d17da and 908906c.

📒 Files selected for processing (2)
  • components/pages/posts/post/PostComponent.vue
  • components/pages/posts/post/PostNud3.vue
📜 Review details
🔇 Additional comments (1)
components/pages/posts/post/PostNud3.vue (1)

18-20: Good external-link hardening.

Using target="_blank" with rel="noopener noreferrer" is correct and avoids opener/referrer risks for this outbound link.

Comment on lines +173 to +176
<PostNud3
v-if="post.media_type === 'image' && mediaFile.file"
:mediaUrl="post.high_res_file.url ?? post.low_res_file.url ?? (mediaFile.file as string)"
/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use the already-normalized media URL for third-party export.

Line 175 always prefers post.high_res_file.url, which bypasses the selected media resolution path and URL normalization done in mediaFile (fragment stripping). This can unintentionally send a different/higher-res URL to the external service.

Suggested fix
-        <PostNud3
-          v-if="post.media_type === 'image' && mediaFile.file"
-          :mediaUrl="post.high_res_file.url ?? post.low_res_file.url ?? (mediaFile.file as string)"
-        />
+        <PostNud3
+          v-if="post.media_type === 'image' && mediaFile.file"
+          :mediaUrl="mediaFile.file as string"
+        />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/pages/posts/post/PostComponent.vue` around lines 173 - 176, The
PostNud3 export is using post.high_res_file.url first which bypasses the
normalized URL in mediaFile (which strips fragments and respects selected
resolution); update the binding so :mediaUrl prefers mediaFile.file (the
normalized/selected URL) first, then falls back to post.high_res_file.url and
post.low_res_file.url as backups, keeping the existing v-if that checks
mediaFile.file; modify the :mediaUrl expression near the PostNud3 component
accordingly.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether a user setting or consent gate already exists for third-party exports.
rg -n -C3 "useUserSettings|consent|third.?party|external|nud3|pornify|ai video|PostNud3"

Repository: Rule-34/App

Length of output: 50367


🏁 Script executed:

# Locate and read the PostComponent.vue file
fd -type f "PostComponent.vue" -exec cat {} \;

Repository: Rule-34/App

Length of output: 225


🏁 Script executed:

# Locate the PostComponent.vue file
fd "PostComponent.vue"

Repository: Rule-34/App

Length of output: 100


🏁 Script executed:

# Read the PostComponent.vue file to examine the PostNud3 component and check for consent gates
cat -n components/pages/posts/post/PostComponent.vue | head -200

Repository: Rule-34/App

Length of output: 7350


🏁 Script executed:

# Find the PostNud3 component definition
fd "PostNud3" -type f

Repository: Rule-34/App

Length of output: 225


🏁 Script executed:

# Find the PostNud3 component definition
fd "PostNud3"

Repository: Rule-34/App

Length of output: 95


🏁 Script executed:

# Read the PostNud3 component to understand what external service it uses
cat -n components/pages/posts/post/PostNud3.vue

Repository: Rule-34/App

Length of output: 1076


Remove the unconditional PostNud3 export or add user consent gate.

The PostNud3 component sends image URLs to an external service (nud3.me/pornify) for all eligible image posts without checking user consent. Although the blockAiGeneratedImages setting exists in useUserSettings(), it is not applied to gate this component. Either remove the PostNud3 rendering or add a consent check:

const { blockAiGeneratedImages } = useUserSettings()

Then conditionally render:

<PostNud3
  v-if="post.media_type === 'image' && mediaFile.file && !blockAiGeneratedImages"
  ...
/>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/pages/posts/post/PostComponent.vue` around lines 173 - 176, The
PostNud3 component is unconditionally sending image URLs to an external service;
gate or remove it by using the user's setting from useUserSettings. Import/use
the hook to access blockAiGeneratedImages and update the PostNud3 render
condition (currently checking post.media_type and mediaFile.file) to also
require !blockAiGeneratedImages, e.g. only render PostNud3 when post.media_type
=== 'image' && mediaFile.file && !blockAiGeneratedImages; alternatively remove
the PostNud3 rendering entirely if consent flow is not implemented.

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.

1 participant