Skip to content

Add drive move actions - #24

Open
vish9812 wants to merge 9 commits into
mainfrom
core-drive-actions
Open

Add drive move actions#24
vish9812 wants to merge 9 commits into
mainfrom
core-drive-actions

Conversation

@vish9812

@vish9812 vish9812 commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • add file and folder move support from the drive action menu
  • split item action menu dialogs into dedicated components
  • add a paginated child-folders API and use it in the move picker
  • fix descendant folder lookup to use its recursive CTE

Verification

  • pnpm run build
  • just test

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants