diff --git a/frontend/libs/components/generation-list/src/lib/GalleryRow.tsx b/frontend/libs/components/generation-list/src/lib/GalleryRow.tsx
index f01fd20980..cbfb65a63c 100644
--- a/frontend/libs/components/generation-list/src/lib/GalleryRow.tsx
+++ b/frontend/libs/components/generation-list/src/lib/GalleryRow.tsx
@@ -1,5 +1,5 @@
import { memo, useCallback, type ReactNode } from "react";
-import { BoxIcon, CheckIcon, ImageIcon, MusicIcon, PlayIcon, VideoIcon } from "lucide-react";
+import { BoxIcon, CheckIcon, EyeIcon, ImageIcon, MusicIcon, PlayIcon, VideoIcon } from "lucide-react";
import {
getCreatorIconPathForModelId,
getModelDisplayName,
@@ -27,6 +27,8 @@ export interface GalleryRowProps {
selectMode?: boolean;
selected?: boolean;
onToggleSelect?: (item: GalleryItem) => void;
+ /** Persistent badge marking the item most recently viewed in the lightbox. */
+ lastViewed?: boolean;
}
export const GalleryRow = memo(function GalleryRow({
@@ -40,6 +42,7 @@ export const GalleryRow = memo(function GalleryRow({
selectMode = false,
selected = false,
onToggleSelect,
+ lastViewed = false,
}: GalleryRowProps) {
const isVideo = item.mediaClass === "video";
const is3D = is3DMediaClass(item.mediaClass);
@@ -103,7 +106,7 @@ export const GalleryRow = memo(function GalleryRow({
)}
{/* Thumbnail */}
-
+
)}
+ {/* Persistent "Last viewed" badge (stays until another item is
+ opened in the lightbox). */}
+ {lastViewed && (
+
+
+ Last viewed
+
+ )}
{/* Title + model / media meta */}
diff --git a/frontend/libs/components/generation-list/src/lib/GenerationGridView.tsx b/frontend/libs/components/generation-list/src/lib/GenerationGridView.tsx
index fc1e2e144a..712f4735e4 100644
--- a/frontend/libs/components/generation-list/src/lib/GenerationGridView.tsx
+++ b/frontend/libs/components/generation-list/src/lib/GenerationGridView.tsx
@@ -53,6 +53,8 @@ export interface GenerationGridViewProps {
selectionMode?: boolean;
selectedIds?: ReadonlySet
;
onToggleSelect?: (item: GalleryItem) => void;
+ /** Marks the tile the user most recently viewed in the lightbox. */
+ lastViewedId?: string | null;
}
export function GenerationGridView({
@@ -71,6 +73,7 @@ export function GenerationGridView({
selectionMode = false,
selectedIds,
onToggleSelect,
+ lastViewedId,
}: GenerationGridViewProps) {
const sentinelRef = useInfiniteScrollSentinel(hasMore, onLoadMore);
@@ -198,6 +201,7 @@ export function GenerationGridView({
selectMode={selectionMode}
selected={selectionMode && selectedIds?.has(entry.item.id)}
onToggleSelect={onToggleSelect}
+ lastViewed={!!lastViewedId && entry.item.id === lastViewedId}
/>
)}
diff --git a/frontend/libs/components/generation-list/src/lib/GenerationListView.tsx b/frontend/libs/components/generation-list/src/lib/GenerationListView.tsx
index ff155b6def..8ea889c6ad 100644
--- a/frontend/libs/components/generation-list/src/lib/GenerationListView.tsx
+++ b/frontend/libs/components/generation-list/src/lib/GenerationListView.tsx
@@ -56,6 +56,8 @@ export interface GenerationListViewProps {
selectionMode?: boolean;
selectedIds?: ReadonlySet