Add drive move actions - #24
Open
vish9812 wants to merge 9 commits into
Open
Conversation
…h and delete API functions
…log component and related icons
There was a problem hiding this comment.
Pull request overview
Adds drive “move” actions (plus rename/trash) to the web action menu, backed by new/expanded media API client functions and a new server endpoint for paginated child-folder browsing.
Changes:
- Web: Introduce a unified item action dropdown + dedicated dialogs for download/rename/move/trash in grid and list views.
- Web API client: Add PATCH/DELETE helpers and media endpoints for rename/move/trash + paginated child-folder listing.
- Server: Add
GET /media/folders/{id}/folders(paged) and fix descendant-folder lookup to use the recursive CTE; extend integration tests.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| web/tsconfig.json | Updates TS path alias configuration to use explicit ./src/* mappings. |
| web/src/utils/format.ts | Adds Format.capitalize() helper used by new dialogs. |
| web/src/utils/errors.ts | Aligns default error fallback to COMMON_ERR_KEYS.GENERIC. |
| web/src/components/icons.tsx | Adds new icons used by the action menu (rename/move/trash). |
| web/src/components/folderContent/listItem.tsx | Replaces per-item download UI with the new shared ItemActionMenu. |
| web/src/components/folderContent/gridItem.tsx | Replaces per-item download UI with the new shared ItemActionMenu. |
| web/src/components/folderContent/itemActionMenu/types.ts | Adds shared types for the new action menu/dialog components. |
| web/src/components/folderContent/itemActionMenu/index.tsx | Implements dropdown action menu and wires dialogs + refresh behavior. |
| web/src/components/folderContent/itemActionMenu/renameDialog.tsx | Adds dedicated rename dialog for files/folders with validation + error handling. |
| web/src/components/folderContent/itemActionMenu/moveDialog.tsx | Adds folder-picker dialog that browses folders via the new child-folders API. |
| web/src/components/folderContent/itemActionMenu/trashDialog.tsx | Adds dedicated trash confirmation dialog for files/folders. |
| web/src/apis/media/index.ts | Adds child-folder paging endpoint + rename/move/trash API client methods. |
| web/src/apis/common/index.ts | Adds patch() and del() request helpers. |
| web/pnpm-workspace.yaml | Adds pnpm workspace config to allow building esbuild. |
| server/internal/tests/integration/media_test.go | Extends integration flow to validate the new child-folders endpoint. |
| server/internal/tests/integration/media_helper_test.go | Adds HTTP helper for GET .../folders child-folder paging endpoint. |
| server/internal/infrastructure/internal/repository/media_repository.go | Fixes descendant folder lookup to properly use the recursive CTE. |
| server/internal/domain/media/query_handlers.go | Adds query handler for child-folder paging. |
| server/internal/domain/media/queries.go | Extends domain query interface + adds GetChildFoldersQuery. |
| server/internal/api/media_api.go | Registers and implements GET /media/folders/{id}/folders. |
| roadmap.md | Replaces multiple TODO docs with a consolidated roadmap. |
| README.md | Updates dev setup instructions and points roadmap section to roadmap.md. |
| CHANGELOG.md | Updates “Coming Soon” link from TODO to roadmap. |
| AGENTS.md | Adds/updates repository guidelines and recommended workflows. |
| TODO.md | Removed in favor of roadmap.md. |
| TODO_WEB.md | Removed in favor of roadmap.md. |
| TODO_SERVER.md | Removed in favor of roadmap.md. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+8
to
+18
| export type ActionItem = FileInfo & FolderInfo; | ||
|
|
||
| export interface DialogProps { | ||
| type: ItemType; | ||
| item: ActionItem; | ||
| itemLabel: string; | ||
| open: boolean; | ||
| onClose: () => void; | ||
| onDone: () => void; | ||
| } | ||
|
|
Comment on lines
+70
to
+75
| Promise.all([fetchFolderInfo(id), fetchChildFolders(id)]) | ||
| .then(([info, folders]) => { | ||
| if (seq !== loadSeq) return; | ||
| setFolderInfo(info); | ||
| setChildFolders(folders.items); | ||
| }) |
Comment on lines
+755
to
+756
| if id := chi.URLParam(r, urlParamFolderID); validate.UUID(id) { | ||
| folderID = &id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification