summaryrefslogtreecommitdiff
path: root/frontend/lib
Commit message (Collapse)AuthorAgeFilesLines
* frontend: improvementsdiogo4642025-08-142-99/+21
|
* fix: check disk usage of blobs directory instead of rootdiogo4642025-08-141-2/+2
| | | | | | | | | - Change df command to target FCTDRIVE_PATH/blobs for more accurate disk usage - This provides better storage metrics for the actual blob storage location 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* feat: improve DriveLogEntry types with discriminated unionsdiogo4642025-08-142-11/+106
| | | | | | | | | | | | | | - Replace generic DriveLogEntry with action-specific discriminated unions - Add DriveLogEntryCreateFile, CreateDir, Remove, Rename types - Update Drive_log parsing to create correct union types based on action - Add type guards (isCreateFileEntry, isRenameEntry, etc.) for safe access - Enhance History UI to properly display rename operations (old → new) - Change log_id to revision to match Rust OperationHeader structure - Improve type safety and maintainability 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* remove: unused Drive_tree function and related importsdiogo4642025-08-141-77/+1
| | | | | | | | | | Removed Drive_tree function from drive_server.ts as it was not being used anywhere in the codebase. Also cleaned up the import statement to remove unused DriveTreeNode and DriveTreeResponse types. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* fix: move auth import to top of filediogo4642025-08-131-1/+1
| | | | | | | | Replaced dynamic import with proper static import at the top 🤖 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-133-37/+41
| | | | | | | | | | | | - 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]>
* frontend: require FCTDRIVE_PATH env vardiogo4642025-08-132-1/+10
|
* Create shared storage utility functiondiogo4642025-08-131-0/+66
| | | | | | | | | | | - Extract storage data fetching logic into reusable lib/storage.ts - Export StorageData interface and fetchStorageData function - Maintain 10-second caching behavior - Enable direct function calls instead of HTTP requests during SSR 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Implement path-based downloads with blob redirect systemdiogo4642025-08-131-0/+12
| | | | | | | | | | | | | - Add fctdrive stat command to get blob IDs from paths - Add Drive_stat function to drive_server.ts for backend integration - Create /download/[...path] endpoint that redirects to /blob/{blobId} - Update UI file links to use /download/ paths instead of direct blob links - Update permalinks to use immutable /blob/{blobId} URLs - Fix host preservation in redirects for remote access 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Implement rename functionality using fctdrive CLIdiogo4642025-08-131-0/+11
| | | | | | | | | | | | - 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]>
* Implement /v2 prototype UI with page-based navigationdiogo4642025-08-121-0/+7
| | | | | | | | | | | | | | | | | - 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]>
* Implement working upload functionalitydiogo4642025-08-121-2/+2
| | | | | | | | | | | | | | - Replace dummy upload functions with real API calls to /api/fs endpoint - Add file validation (size limits, file count) with user-friendly error messages - Support both root directory uploads and folder-specific uploads - Add loading states and progress indication during uploads - Implement auto-refresh of file tree after successful uploads - Handle errors gracefully with toast notifications showing success/failure counts - Update file size limit to 4GB and maintain 10 file upload limit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Implement history page with real data from Drive_log APIdiogo4642025-08-111-0/+8
| | | | | | | | | | | | | | | - Removed v0 generated HistoryEntry type and mock data - Updated HistoryView to use DriveLogEntry from our Drive_log API - Added proper loading and error states - Reversed log output to show latest entries first (as requested) - Added formatFileSize utility function to utils.ts and used it for file sizes - Updated action types and badges to match actual drive log actions - Convert Unix timestamps to proper date formatting - Show real user emails, file paths, and file sizes from actual drive log 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Add Drive_log function and /api/log endpointdiogo4642025-08-112-1/+43
| | | | | | | | | | - 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]>
* Calculate directory sizes as sum of all contentsdiogo4642025-08-111-10/+18
| | | | | | | | | | | | - Add recursive directory size calculation to Drive_tree - Directory sizes now represent total size of all nested contents - Rename sortNodes to calculateSizesAndSort for clarity - Process children first (bottom-up) then calculate parent sizes - Maintain existing sorting functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Add sorted tree structure to Drive_tree functiondiogo4642025-08-111-1/+22
| | | | | | | | | | | - Sort directories first, then files - Both categories sorted alphabetically (case-insensitive) - Recursive sorting applied to all tree levels - Server-side sorting for better performance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
* Simplify frontend by removing FileItem conversion layerdiogo4642025-08-113-1/+69
| | | | | | | | | | | | | - 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-111-0/+11
| | | | | | | | | | | | | | | | | | - 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-112-0/+27
| | | | | | | | | | | | | - 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-1/+1
| | | | | | | | | | - 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]>
* basic v0 ui workingdiogo4642025-08-111-25/+4
|
* snapshotdiogo4642025-08-114-24/+32
|
* basic file uploaddiogo4642025-08-111-0/+39
|
* snapshotdiogo4642025-08-114-0/+223