summaryrefslogtreecommitdiff
path: root/frontend/app/api
Commit message (Collapse)AuthorAgeFilesLines
* frontend: improvementsdiogo4642025-08-142-5/+3
|
* refactor: move auth components to server-side renderingdiogo4642025-08-131-0/+32
| | | | | | | | | | | | | | - Create server-side AuthButtons component that renders login/logout based on auth state - Add DriveHeader component for title and auth buttons (server-side) - Restructure DriveDirectoryClient to focus on breadcrumbs/actions/files only - Remove client-side auth state management from DriveDirectoryClient - Add /api/logout route handler for server-side logout flow - Update DriveDirectoryView to compose header and directory components - Preserve existing TinyAuth integration and dev mode bypass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* refactor: split auth module into separate files and fix importsdiogo4642025-08-131-1/+2
| | | | | | | | | | | | - Created auth_types.ts for type definitions - Created auth_shared.ts for utility functions and endpoints - Updated auth.ts to focus on session management - Fixed all auth import statements throughout codebase - Updated login redirect to use Auth_tinyauth_public_endpoint properly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Refactor storage API to use shared utilitydiogo4642025-08-131-66/+1
| | | | | | | | | | - Import fetchStorageData from lib/storage instead of duplicating logic - Simplify API route by removing duplicate implementation - Maintain same API response format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Implement real-time storage usage UI with two-color progress bardiogo4642025-08-131-0/+80
| | | | | | | | | | | | | - Add /api/storage endpoint that fetches live data from fctdrive drive-size and df commands - Implement 10-second caching to avoid excessive system calls - Create StorageUsage component with two-color bar showing active drive usage vs total disk usage - Update drive pages to fetch and pass storage data server-side - Replace hardcoded storage values with real system data - Display active drive usage (blue), other disk usage (gray), and available space 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Implement rename functionality using fctdrive CLIdiogo4642025-08-131-0/+52
| | | | | | | | | | | | - Add Drive_rename function to drive_server.ts for backend integration - Create /api/rename endpoint with proper authentication and error handling - Update handleRename function to call API instead of placeholder TODO - Test rename functionality for both files and directories - Update CLAUDE.md to note fctdrive is available in PATH 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Add Create Folder functionality with dialog interfacediogo4642025-08-131-0/+54
| | | | | | | | | | | | - New /api/mkdir endpoint for authenticated folder creation - Create Folder button positioned left of Upload Files button - Modal dialog with input validation and keyboard shortcuts - Proper error handling and success notifications - Uses existing CLI Drive_mkdir function for backend operations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Fix URL encoding for paths with special charactersdiogo4642025-08-121-6/+9
| | | | | | | | | | - Add URL decoding in upload endpoint for path parameter - Add URL decoding for path segments in drive page navigation - Ensures proper handling of directories/files with spaces and unicode chars 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Implement authenticated file/directory deletiondiogo4642025-08-121-0/+67
| | | | | | | | | | | - Add /api/delete endpoint with authentication checks - Update DriveDirectoryClient to use actual delete API - Replace placeholder TODO with working delete functionality - Include proper error handling and user feedback 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Replace complex /api/fs with simple /api/upload endpointdiogo4642025-08-122-209/+71
| | | | | | | | | | | | | | | | | | | - Create new /api/upload endpoint for file uploads with path query parameter - Simplify DriveDirectoryClient upload logic to use POST instead of PUT - Remove complex path encoding and AUTH header handling from client - Remove unused /api/fs endpoint entirely - no longer needed - Maintain all existing upload functionality (file size limits, auth, etc.) - Test uploads to root directory and subdirectories - both working perfectly Benefits: - Cleaner API surface with single-purpose endpoints - Simpler client code with less complexity - Better separation of concerns - Maintained backward compatibility for user experience 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Clean up old UI code and rename V2 to Drivediogo4642025-08-123-45/+0
| | | | | | | | | | | | | | | - Remove old UI components: file-drive.tsx, history-view.tsx - Remove unused API endpoints: /api/tree, /api/log, /api/fs/route.ts - Rename /v2 routes to /drive routes for cleaner URLs - Rename V2* components to Drive* components (V2DirectoryView -> DriveDirectoryView, etc.) - Update all breadcrumb and navigation references from /v2 to /drive - Redirect root path to /drive instead of old UI - Keep /api/fs/[...path] and /api/directories for uploads and move functionality - Preserve Drive_* server functions for potential future use 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Implement /v2 prototype UI with page-based navigationdiogo4642025-08-121-0/+16
| | | | | | | | | | | | | | | | | - Add /v2 route structure with dynamic nested directory pages - Create V2DirectoryView component with breadcrumb navigation - Add V2MoveDialog with directory search and flat list display - Implement single upload button for current directory context - Add /api/directories endpoint for move dialog directory picker - Fix breadcrumb decoding to show readable names instead of URL encoding - Add file sorting: directories first, then files, all alphabetically - Improve performance by loading only current directory contents - Add ScrollArea component and @radix-ui/react-scroll-area dependency - Ensure proper URL encoding/decoding flow to prevent malformed paths 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Add Drive_log function and /api/log endpointdiogo4642025-08-111-0/+13
| | | | | | | | | | - Added DriveLogEntry type for log entries with timestamp, log_id, email, action, path, blob_id, size - Implemented Drive_log function that executes fctdrive log and parses tab-separated output - Created /api/log GET endpoint that returns JSON array of all log entries 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Simplify frontend by removing FileItem conversion layerdiogo4642025-08-112-13/+13
| | | | | | | | | | | | | - Remove FileItem interface and 300+ lines of mock data - Eliminate transformTreeNodes() conversion function - Update component to use DriveTreeNode[] directly - Rename /api/list to /api/tree with server-side tree building - Add Drive_tree() function and DriveTreeNode types - Significantly reduce code complexity and memory usage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* implement RESTful API and remove legacy endpointsdiogo4642025-08-114-175/+228
| | | | | | | | | | | | | | | | | | - Created unified /api/fs/[...path] endpoint with full REST methods: - GET: List directory contents or file info - POST: Create directories using Drive_mkdir() - PUT: Upload files with multipart form data - DELETE: Remove files/directories using Drive_remove() - Added /api/fs route for root directory listing - Added Drive_mkdir() function to drive_server.ts using fctdrive mkdir command - Removed legacy /api/delete and /api/upload endpoints - Updated CLAUDE.md with comprehensive API documentation and examples - All endpoints support authentication with AUTH: 1 header in development - Proper error handling, file size validation, and cache revalidation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* add delete api endpoint with authenticationdiogo4642025-08-111-0/+48
| | | | | | | | | | | | | - Added Drive_remove() function to drive_server.ts using fctdrive remove command - Created /api/delete route with POST method, JSON body input, and authentication - Added development mode AUTH header bypass for testing authenticated endpoints - Updated CLAUDE.md with API testing instructions using AUTH: 1 header - Endpoint validates user authentication and upload permissions before deletion - Returns success response even for non-existent files (CLI ignores them) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* add api route for recursive file listingdiogo4642025-08-111-0/+13
| | | | | | | | | | - Added /api/list route that returns all files/directories recursively from root - Increased maxBuffer to 50MB in Drive_ls to handle large directory listings - Fixes ENOBUFS error when listing entire drive contents 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* snapshotdiogo4642025-08-111-1/+1
|
* basic file uploaddiogo4642025-08-111-0/+127