From dcd76cbbcd45788e5a9cfa660c4af0306d2015b8 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 23 Sep 2026 13:27:46 +0000 Subject: [PATCH] refactor(storage): trim comments to one line where they earn their place Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01N3euXsz25sTybsGTcxCFfn --- .../Storage/StorageExplorer/ArchivedFilesContext.tsx | 5 +---- .../interfaces/Storage/StorageExplorer/FileExplorerRow.tsx | 7 ++----- .../interfaces/Storage/StorageExplorer/StorageExplorer.tsx | 4 +--- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/ArchivedFilesContext.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/ArchivedFilesContext.tsx index f7137a605c7..b9359b128a0 100644 --- a/apps/studio/components/interfaces/Storage/StorageExplorer/ArchivedFilesContext.tsx +++ b/apps/studio/components/interfaces/Storage/StorageExplorer/ArchivedFilesContext.tsx @@ -39,10 +39,7 @@ const ArchivedFilesContext = createContext({ export const useArchivedFilesContext = () => useContext(ArchivedFilesContext) -/** - * Fetched once here rather than per row. Not gated on the bucket's versioning - * state — a suspended bucket can still be retaining files. - */ +/** Not gated on the bucket's versioning state: a suspended bucket can still be retaining files. */ export const ArchivedFilesProvider = ({ children }: PropsWithChildren) => { const { projectRef, selectedBucket } = useStorageExplorerStateSnapshot() const { showArchivedInline } = useStoragePreference(projectRef) diff --git a/apps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerRow.tsx b/apps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerRow.tsx index 40ec7f33a13..b31b0150202 100644 --- a/apps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerRow.tsx +++ b/apps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerRow.tsx @@ -121,8 +121,7 @@ export const FileExplorerRow = ({ const onSelectFile = (columnIndex: number) => { if (isArchivedFile) { - // Archived rows have no live object to preview, so collapse to this column - // and let the archived pane take over. + // No live object to preview, so let the archived pane take over. truncateToColumn(columnIndex) selectArchivedObject(archivedObjectId) return @@ -320,7 +319,6 @@ export const FileExplorerRow = ({ isSelected && 'bg-selection', isPreviewed && 'bg-selection hover:bg-selection', item.status !== STORAGE_ROW_STATUS.LOADING && 'cursor-pointer', - // Also drives the stripe color via `currentColor`. isArchived && 'text-foreground-lighter [&_p]:text-foreground-lighter', // Keyboard focus on the checkbox: ring the whole row 'has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-[-2px] has-[:focus-visible]:outline-[var(--ring)]' @@ -422,8 +420,7 @@ export const FileExplorerRow = ({ size={14} /> ) : isArchived ? ( - // Archived rows have no checkbox or context menu, so without this - // button they'd have nothing keyboard-reachable. + // Archived rows drop the checkbox and menu, so this is their only focus target. isArchivedFile ? (