diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistory.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistory.tsx index 978a927a900..42cae17b614 100644 --- a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistory.tsx +++ b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistory.tsx @@ -87,7 +87,6 @@ const VersionActionsMenu = ({ const label = shortVersion(version.versionId) const isDeleteMarker = version.action === 'delete marker' - // Restoring and deleting only make sense for the versions behind the current one. if (version.isCurrent) return null return ( @@ -127,7 +126,6 @@ const VersionActionsMenu = ({ interface VersionHistoryProps { projectRef?: string bucketId?: string - /** Leaf name, for copy. */ objectName: string /** Full path within the bucket, which is what the version endpoints address. */ path: string diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionThumbnail.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionThumbnail.tsx index 2b7d7615b71..54cf5c88fc1 100644 --- a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionThumbnail.tsx +++ b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionThumbnail.tsx @@ -4,10 +4,7 @@ import { cn } from 'ui' import { useFetchFileUrlQuery } from './useFetchFileUrlQuery' import { useStorageExplorerStateSnapshot } from '@/state/storage-explorer' -/** - * The thumbnail is 28px, so the whole object is downloaded to be drawn into - * almost nothing. Worth it for an ordinary image, not for a large one. - */ +// The box is 28px, so the whole object is downloaded to draw almost nothing. const THUMBNAIL_SIZE_LIMIT = 5 * 1024 * 1024 // 5MB const MimeTypeIcon = ({ mimeType, size }: { mimeType?: string; size: number }) => { @@ -58,15 +55,11 @@ interface VersionThumbnailProps { isCurrent: boolean isDeleteMarker?: boolean size?: number - /** - * Full path within the bucket. Given a path, an image version renders its own - * bytes rather than a generic icon — which is the only thing that tells two - * versions of the same file apart at a glance. - */ + /** Full path within the bucket. Given one, an image renders its own bytes. */ path?: string /** Omit to render the object's current version. */ versionId?: string - /** Bytes, used to skip the fetch for a file too large to be worth thumbnailing. */ + /** Bytes, used to skip the fetch for a file too large to thumbnail. */ byteSize?: number } diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/useFetchFileUrlQuery.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/useFetchFileUrlQuery.tsx index 3452085a378..8858579b4c0 100644 --- a/apps/studio/components/interfaces/Storage/StorageExplorer/useFetchFileUrlQuery.tsx +++ b/apps/studio/components/interfaces/Storage/StorageExplorer/useFetchFileUrlQuery.tsx @@ -16,8 +16,7 @@ export const fetchFileUrl = async ( expiresIn?: number, versionId?: string ) => { - // Omitted entirely rather than sent as `undefined`, so a request for the current - // version stays byte-identical to what the non-versioned callers send. + // Omitted rather than sent as `undefined`, so current-version requests are unchanged. const options = versionId === undefined ? undefined : { versionId } if (isBucketPublic) { diff --git a/apps/studio/state/storage-explorer.tsx b/apps/studio/state/storage-explorer.tsx index 91fd342db47..71f4f774a63 100644 --- a/apps/studio/state/storage-explorer.tsx +++ b/apps/studio/state/storage-explorer.tsx @@ -169,8 +169,7 @@ export function createStorageExplorerState({ state.selectedItemsToDelete = items }, - // Separate from `selectedItemsToDelete`: on a versioned bucket that one archives, - // while this one takes the file and every retained version with it. + // Separate from `selectedItemsToDelete`, which only archives on a versioned bucket. itemToPurge: undefined as StorageItemWithColumn | undefined, setItemToPurge: (item?: StorageItemWithColumn) => { state.itemToPurge = item