@@ -282,8 +277,7 @@ const CurrentFilePreview = ({
)}
- {/* A delete here is a soft delete, so the button says so and the real
- destructive action moves behind the split menu. */}
+ {/* A delete in a versioned bucket is a soft delete/archive, unless specified explicitly */}
{canUpdateFiles && isVersionedBucket && (
{
const { can: canUpdateFiles } = useAsyncCheckPermissions(PermissionAction.STORAGE_WRITE, '*')
const isStorageVersioningEnabled = useIsStorageVersioningEnabled()
- // The bucket page owns `?edit=true` and mounts the modal on it, so routing
- // through the URL avoids threading a callback down the explorer tree.
const [, setShowEditBucketModal] = useQueryState(
'edit',
parseAsBoolean.withDefault(false).withOptions({ history: 'push', clearOnDefault: true })
diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/PreviewSection.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/PreviewSection.tsx
index 4fc4ccea4ce..6af9e1408df 100644
--- a/apps/studio/components/interfaces/Storage/StorageExplorer/PreviewSection.tsx
+++ b/apps/studio/components/interfaces/Storage/StorageExplorer/PreviewSection.tsx
@@ -9,7 +9,6 @@ interface PreviewSectionProps {
children: ReactNode
}
-/** A collapsible section in the file preview panel. */
export const PreviewSection = ({
title,
count,
diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionCompareWidget.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionCompareWidget.tsx
index 9d92442ddc1..9005e5e0204 100644
--- a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionCompareWidget.tsx
+++ b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionCompareWidget.tsx
@@ -15,10 +15,6 @@ interface VersionCompareWidgetProps {
onDismiss: () => void
}
-/**
- * Takes over the top of the preview panel when a noncurrent version is selected:
- * comparison and restore confirmation in one, so there is no modal.
- */
export const VersionCompareWidget = ({
mimeType,
selectedVersion,
diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistory.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistory.tsx
index 21b668c7a3f..890d9452d99 100644
--- a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistory.tsx
+++ b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistory.tsx
@@ -34,10 +34,6 @@ import { formatBytes } from '@/lib/helpers'
/** Version IDs are long opaque strings; show enough to tell two rows apart. */
export const shortVersion = (versionId: string) => `${versionId.slice(0, 6)}…${versionId.slice(-2)}`
-/**
- * A row's removal outlook. `retained` renders nothing — saying "Retained" on
- * every unflagged row repeats what the absence of a warning already says.
- */
const VersionFateLabel = ({ fate }: { fate: VersionFate }) => {
switch (fate.type) {
case 'retained':
@@ -132,17 +128,13 @@ interface VersionHistoryProps {
projectRef?: string
bucketId?: string
objectName: string
- /** The bucket's versioning state, for the suspended notice. */
versioningState: BucketVersioningState
- /** The bucket's lifecycle policy, which drives the per-row expiry outlook. */
lifecyclePolicy: LifecyclePolicy
expirationMode: ExpirationMode
- /** Drives the row thumbnail glyph — falls back to a generic file icon. */
mimeType?: string
previewedVersionId?: string
onPreview?: (version: ObjectVersion) => void
clearPreview: () => void
- /** Opens the bucket settings, where the lifecycle policy is configured. */
onEditBucket: () => void
}
@@ -275,12 +267,7 @@ export const VersionHistory = ({
!isComparing && !isDeleteMarker && 'hover:bg-surface-200'
)}
>
- {/*
- * A marker has no content to preview, so it renders as plain
- * content rather than a control that does nothing when pressed.
- * A real button elsewhere, so Enter/Space and screen readers
- * work for free.
- */}
+ {/* A marker has no content to preview */}
{isDeleteMarker ? (
{rowContent}
) : (
diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistoryPolicyRow.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistoryPolicyRow.tsx
index 146e9ea1193..0cca5f5c9a9 100644
--- a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistoryPolicyRow.tsx
+++ b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionHistoryPolicyRow.tsx
@@ -5,7 +5,6 @@ import { Button, cn, HoverCard, HoverCardContent, HoverCardTrigger } from 'ui'
import { BroomSparklesIcon } from '../BroomSparklesIcon'
import type { ExpirationMode } from '../StorageVersioning.constants'
-/** Shared chip styling so the tokens and the operator badge read as one family. */
const POLICY_CHIP_CLASSNAME = 'rounded-sm border px-1.5 py-0.5 font-mono text-[10.5px]'
const PolicyChip = ({ children }: { children: ReactNode }) => (
@@ -32,10 +31,7 @@ interface PolicyRuleProps {
mode: ExpirationMode
}
-/** The policy spelled out in plain language, for the hover card. */
const PolicyFullRule = ({ cap, expiryDays, mode }: PolicyRuleProps) => {
- // A cap always arrives with an age, so there are only three shapes to describe:
- // age alone, or age combined with the cap under either operator.
const hasCap = cap !== null && cap > 0
if (!hasCap) {
@@ -60,15 +56,9 @@ const PolicyFullRule = ({ cap, expiryDays, mode }: PolicyRuleProps) => {
}
interface VersionHistoryPolicyRowProps extends PolicyRuleProps {
- /** Opens the bucket settings, where the policy is configured. */
onEditBucket: () => void
}
-/**
- * The bucket's lifecycle policy as one inline row. A hover card rather than a
- * tooltip because the content holds a button — tooltip content is not reachable
- * by pointer or keyboard.
- */
export const VersionHistoryPolicyRow = ({
cap,
expiryDays,
diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionThumbnail.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionThumbnail.tsx
index f6d7f5d7a59..a893b2d8d6f 100644
--- a/apps/studio/components/interfaces/Storage/StorageExplorer/VersionThumbnail.tsx
+++ b/apps/studio/components/interfaces/Storage/StorageExplorer/VersionThumbnail.tsx
@@ -17,16 +17,10 @@ const MimeTypeIcon = ({ mimeType, size }: { mimeType?: string; size: number }) =
interface VersionThumbnailProps {
mimeType?: string
isCurrent: boolean
- /** An empty placeholder standing in for a soft delete in the object's history. */
isDeleteMarker?: boolean
size?: number
}
-/**
- * Type glyph for a version row. Noncurrent versions have no thumbnail of their
- * own so they share one; the current version gets a restore glyph, and a delete
- * marker a dashed outline so it reads as "nothing here".
- */
export const VersionThumbnail = ({
mimeType,
isCurrent,