Fix/remove share icon#631
Conversation
|
|
WalkthroughShare button functionality removed from frontend media components and hover controls. OpenAPI schema simplified for face-search input_type parameter by replacing allOf wrapper with direct reference. ImageInCluster metadata schema expanded to permit additional properties. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ 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). (4)
🔇 Additional comments (1)
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. Comment |
|
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/backend/backend_python/openapi.json (1)
2155-2166: Note schema consistency:ImageInCluster.MetadatavsMetadataModel.The
ImageInCluster.Metadatanow explicitly allowsadditionalProperties: true, but the similarMetadataModelschema (line 2221) does not. This creates an inconsistency where different metadata objects have different extensibility rules.Clarify whether this divergence is intentional or if both should align on additionalProperties behavior for consistency.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
docs/backend/backend_python/openapi.json(2 hunks)frontend/src/components/Media/ImageCard.tsx(1 hunks)frontend/src/components/Media/MediaView.tsx(1 hunks)frontend/src/components/Media/MediaViewControls.tsx(1 hunks)
🔇 Additional comments (3)
docs/backend/backend_python/openapi.json (1)
1080-1086: Verify OpenAPI 3.1.0$refwith siblings compatibility.This change uses direct
$refwith inlinedescriptionanddefaultproperties, which relies on OpenAPI 3.1.0's JSON Schema support for sibling keywords. While spec-compliant, this may break compatibility with:
- Tools/generators expecting OpenAPI 3.0.x semantics
- Older OpenAPI validators or SDK code generators
- Client libraries that haven't updated to 3.1.0 support
Please confirm that your OpenAPI toolchain (validators, SDK generators, API documentation tools) fully supports this pattern. Consider testing with your CI/CD pipeline and any downstream code generation.
frontend/src/components/Media/ImageCard.tsx (1)
4-4: LGTM! Clean removal of unused Share2 import.The
Share2icon has been properly removed from the imports along with its corresponding UI usage, aligning with the PR objective to remove share functionality.frontend/src/components/Media/MediaViewControls.tsx (1)
2-2: LGTM! Clean removal of unused Share2 import.The
Share2icon has been properly removed from the imports along with its corresponding UI usage, aligning with the PR objective to remove share functionality.
| import { useState, useCallback, useMemo, useRef } from 'react'; | ||
| import { useSelector, useDispatch } from 'react-redux'; | ||
| import { revealItemInDir } from '@tauri-apps/plugin-opener'; | ||
| // import { revealItemInDir } from '@tauri-apps/plugin-opener'; |
There was a problem hiding this comment.
Critical: Commented import causes runtime error.
The revealItemInDir import is commented out but handleOpenFolder (lines 77-85) still references it, which will throw a ReferenceError at runtime when the "Open Folder" button is clicked.
Apply this diff to either restore the import or remove the broken functionality:
Option 1: Restore the import (if folder-open is still needed)
-// import { revealItemInDir } from '@tauri-apps/plugin-opener';
+import { revealItemInDir } from '@tauri-apps/plugin-opener';Option 2: Remove the broken handler (if folder-open should be removed like share)
- // Folder Open functionality
- const handleOpenFolder = async () => {
- if (!currentImage?.path) return;
- try {
- await revealItemInDir(currentImage.path);
- } catch (err) {
- console.log(err);
- console.error('Failed to open folder.');
- }
- };And remove onOpenFolder={handleOpenFolder} from <MediaViewControls> at line 146.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // import { revealItemInDir } from '@tauri-apps/plugin-opener'; | |
| import { revealItemInDir } from '@tauri-apps/plugin-opener'; |
🤖 Prompt for AI Agents
In frontend/src/components/Media/MediaView.tsx around line 3 and affecting lines
77-85 and 146, the import for revealItemInDir is commented out but
handleOpenFolder still references it, causing a ReferenceError at runtime;
either restore the import from '@tauri-apps/plugin-opener' at the top of the
file if the folder-open feature is required, or remove the handleOpenFolder
function and delete the onOpenFolder={handleOpenFolder} prop passed to
<MediaViewControls> at line 146 to fully remove the broken functionality; ensure
no other references to revealItemInDir remain after the change.
|
|
|
|
|
@Vaibhaviitian |
done |
rahulharpal1603
left a comment
There was a problem hiding this comment.
Thanks @DecodeX15!
|
This pr had removed share button from each page as it is not planned yet and resolving #616


Summary by CodeRabbit