From c990e774781c8ff3afde4eae042d51742cf4807c Mon Sep 17 00:00:00 2001
From: yiling
Date: Sun, 24 May 2026 09:36:23 +0800
Subject: [PATCH] fix(ui): prevent UI freeze when deleting project and update
AGENTS.md
---
AGENTS.md | 4 ++++
src/services/s3/s3.ts | 14 +++++++-------
src/ui/routes/teams/$teamId/index.tsx | 2 +-
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/AGENTS.md b/AGENTS.md
index 14e0bb8b..a125ea8e 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -304,3 +304,7 @@ We use a custom workflow engine that supports both **Local** (polling-based) and
- When importing across layers, always use absolute paths with the `@` alias for the root of the project (e.g. `import { AssetInfo } from '@/services/asset/models'`).
- For types that have been migrated from `@/ui/api/api`, use the equivalent types from the `src/services//models.ts` instead.
- **DTO Naming**: Do not append the `Dto` suffix to types or interfaces (e.g. use `JoinRequest` instead of `JoinRequestDto`).
+
+## Radix UI / Shadcn UI Patterns
+
+- **Modal Overlays**: When triggering a dialog (e.g., `Dialog`, `AlertDialog`) from inside a `DropdownMenu`, you must set `modal={false}` on the `` component. Failing to do so will cause the UI to freeze due to conflicting focus management between the two modal components.
diff --git a/src/services/s3/s3.ts b/src/services/s3/s3.ts
index 968426d1..604f2b24 100644
--- a/src/services/s3/s3.ts
+++ b/src/services/s3/s3.ts
@@ -1,11 +1,11 @@
import { ObjectInfo } from '@/dtos/s3'
import {
- GetObjectCommand,
- HeadObjectCommand,
- ListObjectsV2Command,
- PutObjectCommand,
- DeleteObjectCommand,
- S3Client,
+ DeleteObjectCommand,
+ GetObjectCommand,
+ HeadObjectCommand,
+ ListObjectsV2Command,
+ PutObjectCommand,
+ S3Client,
} from '@aws-sdk/client-s3'
import { getSignedUrl } from '@aws-sdk/s3-request-presigner'
import * as crypto from 'crypto'
@@ -271,7 +271,7 @@ export class LocalStorageService implements S3Service {
private basePath: string
private endpoint: string
- constructor(endpoint: string, basePath: string = 'data/s3/data') {
+ constructor(endpoint: string, basePath: string = 'data') {
this.endpoint = endpoint.replace(/\/$/, '')
this.basePath = path.resolve(basePath)
if (!fs.existsSync(this.basePath)) {
diff --git a/src/ui/routes/teams/$teamId/index.tsx b/src/ui/routes/teams/$teamId/index.tsx
index 2c1aa6e8..5be922c2 100644
--- a/src/ui/routes/teams/$teamId/index.tsx
+++ b/src/ui/routes/teams/$teamId/index.tsx
@@ -275,7 +275,7 @@ function TeamPage() {
Updated {formatDateAgo((project.updatedAt as string) ?? '')}