From ca5196d9f14c11cb636dea3a2e2744ca510a62f2 Mon Sep 17 00:00:00 2001 From: Mattias Tall Date: Tue, 26 May 2026 17:04:16 +0200 Subject: [PATCH] Restore dislike signal as icon-only chip next to Like Removed the label ('Not for me') and kept it icon-only to match the minimal direction, but the -3.0 affinity signal still fires so the feed learns to show less of that content. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/Watch.jsx | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/Watch.jsx b/frontend/src/pages/Watch.jsx index 3538c18..057b7de 100644 --- a/frontend/src/pages/Watch.jsx +++ b/frontend/src/pages/Watch.jsx @@ -4,7 +4,7 @@ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; import { getVideoByYtId, updateProgress, createDownload, getDownload, deleteDownload, followChannelByUrl, toggleQueue, toggleLike, getChannelVideos, getChannel, - getSettings, updateSettings, getRelatedVideos, getDownloads, + getSettings, updateSettings, getRelatedVideos, getDownloads, rateVideo, getBookmarks, createBookmark, updateBookmark, deleteBookmark, importChapters, clearChapters, getCollections, addToCollection, getQueue, getVideoComments, refreshVideoComments, @@ -561,6 +561,7 @@ export default function Watch() { const [currentTime, setCurrentTime] = useState(0); const [queued, setQueued] = useState(null); const [liked, setLiked] = useState(null); + const [disliked, setDisliked] = useState(null); const [selectedQuality, setSelectedQuality] = useState(null); const [speed, setSpeed] = useState(1); const [autoplay, setAutoplay] = useState(false); @@ -772,6 +773,11 @@ export default function Watch() { onSuccess: (res) => { setLiked(res.data.liked); qc.invalidateQueries({ queryKey: ["liked-videos"] }); }, }); + const dislikeMut = useMutation({ + mutationFn: () => rateVideo(video.id, isDisliked ? 0 : -1), + onSuccess: (res) => setDisliked(res.data.rating === -1), + }); + const handlePiP = useCallback(async () => { if (!videoRef.current) return; try { @@ -787,6 +793,7 @@ export default function Watch() { const startAt = video?.watch_progress_seconds ?? 0; const isQueued = queued ?? video?.queued ?? false; const isLiked = liked ?? video?.liked ?? false; + const isDisliked = disliked ?? (video?.rating === -1) ?? false; const dlComplete = dlStatus?.status === "complete" || video?.is_downloaded; const isFollowed = followMut.isSuccess || video?.channel_followed; const subs = formatSubs(channel?.subscriber_count); @@ -966,12 +973,20 @@ export default function Watch() { )} {video?.id && ( - likeMut.mutate()} disabled={likeMut.isPending}> - - - - {isLiked ? "Liked" : "Like"} - + <> + likeMut.mutate()} disabled={likeMut.isPending}> + + + + {isLiked ? "Liked" : "Like"} + + dislikeMut.mutate()} disabled={dislikeMut.isPending} title="Not for me"> + + + + + + )}