mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 05:14:25 +00:00
fix(ui): prevent UI freeze when deleting project and update AGENTS.md
This commit is contained in:
@@ -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'`).
|
- 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/<domain>/models.ts` instead.
|
- For types that have been migrated from `@/ui/api/api`, use the equivalent types from the `src/services/<domain>/models.ts` instead.
|
||||||
- **DTO Naming**: Do not append the `Dto` suffix to types or interfaces (e.g. use `JoinRequest` instead of `JoinRequestDto`).
|
- **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 `<DropdownMenu>` component. Failing to do so will cause the UI to freeze due to conflicting focus management between the two modal components.
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { ObjectInfo } from '@/dtos/s3'
|
import { ObjectInfo } from '@/dtos/s3'
|
||||||
import {
|
import {
|
||||||
GetObjectCommand,
|
DeleteObjectCommand,
|
||||||
HeadObjectCommand,
|
GetObjectCommand,
|
||||||
ListObjectsV2Command,
|
HeadObjectCommand,
|
||||||
PutObjectCommand,
|
ListObjectsV2Command,
|
||||||
DeleteObjectCommand,
|
PutObjectCommand,
|
||||||
S3Client,
|
S3Client,
|
||||||
} from '@aws-sdk/client-s3'
|
} from '@aws-sdk/client-s3'
|
||||||
import { getSignedUrl } from '@aws-sdk/s3-request-presigner'
|
import { getSignedUrl } from '@aws-sdk/s3-request-presigner'
|
||||||
import * as crypto from 'crypto'
|
import * as crypto from 'crypto'
|
||||||
@@ -271,7 +271,7 @@ export class LocalStorageService implements S3Service {
|
|||||||
private basePath: string
|
private basePath: string
|
||||||
private endpoint: string
|
private endpoint: string
|
||||||
|
|
||||||
constructor(endpoint: string, basePath: string = 'data/s3/data') {
|
constructor(endpoint: string, basePath: string = 'data') {
|
||||||
this.endpoint = endpoint.replace(/\/$/, '')
|
this.endpoint = endpoint.replace(/\/$/, '')
|
||||||
this.basePath = path.resolve(basePath)
|
this.basePath = path.resolve(basePath)
|
||||||
if (!fs.existsSync(this.basePath)) {
|
if (!fs.existsSync(this.basePath)) {
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ function TeamPage() {
|
|||||||
Updated {formatDateAgo((project.updatedAt as string) ?? '')}
|
Updated {formatDateAgo((project.updatedAt as string) ?? '')}
|
||||||
</p>
|
</p>
|
||||||
<div onClick={(e) => e.stopPropagation()}>
|
<div onClick={(e) => e.stopPropagation()}>
|
||||||
<DropdownMenu>
|
<DropdownMenu modal={false}>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<button className="hover:bg-muted outline-none flex px-1">
|
<button className="hover:bg-muted outline-none flex px-1">
|
||||||
<MoreHorizontal className="w-5 h-5 text-muted-foreground" />
|
<MoreHorizontal className="w-5 h-5 text-muted-foreground" />
|
||||||
|
|||||||
Reference in New Issue
Block a user