Skip to content

Commit 6593ba3

Browse files
committed
fix: AI code review comments
1 parent c90ec6b commit 6593ba3

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

apps/native/src-tauri/src/secrets/secrets_management.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ fn find_sops_declaration_file(base: &Path) -> anyhow::Result<PathBuf> {
527527
}
528528
}
529529

530-
/// Declares a SOPS secret in the nix-darwin module, creating the module if it does not exist.
530+
/// Declares a SOPS secret in the existing nix-darwin module identified by `declaration_file`.
531531
fn declare_sops_secret(
532532
base: &Path,
533533
declaration_file: &Path,

apps/native/src/components/widget/secrets/secret-detail-view.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function SecretDetailView({
9898
};
9999

100100
const onDelete = async () => {
101-
if (isDeleting) return;
101+
if (capability === "unavailable" || isDeleting) return;
102102
setIsDeleting(true);
103103
setDeleteError(null);
104104
try {
@@ -282,6 +282,7 @@ export function SecretDetailView({
282282
variant="ghost"
283283
size="sm"
284284
className="text-destructive"
285+
disabled={capability === "unavailable" || isDeleting}
285286
onClick={() => {
286287
setDeleteError(null);
287288
setDeleteOpen(true);
@@ -314,7 +315,7 @@ export function SecretDetailView({
314315
<AlertDialogFooter>
315316
<AlertDialogCancel disabled={isDeleting}>Cancel</AlertDialogCancel>
316317
<AlertDialogAction
317-
disabled={isDeleting}
318+
disabled={capability === "unavailable" || isDeleting}
318319
onClick={(event) => {
319320
event.preventDefault();
320321
void onDelete();

0 commit comments

Comments
 (0)