mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
project creation fix
This commit is contained in:
1 parent
72adaa4c18
commit
e87ee0d18a
7 files changed
+730
-117
No files matched your search
@@ -0,0 +1,128 @@
|
||||
# OPFS Compatibility Fix for isomorphic-git Clone Operations
|
||||
|
||||
## Issue Description
|
||||
|
||||
The error `TypeError: Cannot read properties of undefined (reading 'error')` occurs when using OPFS (Origin Private File System) with isomorphic-git during Git clone operations. This happens specifically in the `readObjectPacked` function within isomorphic-git when it tries to read Git pack files.
|
||||
|
||||
### Root Cause
|
||||
|
||||
The issue stems from subtle differences between how OPFS handles binary data compared to LightningFS/IndexedDB:
|
||||
|
||||
1. **Binary Data Handling**: isomorphic-git expects very specific behavior from Uint8Array objects, particularly when reading Git pack files
|
||||
2. **Error Object Structure**: isomorphic-git expects error objects in a specific Node.js-style format
|
||||
3. **Filesystem API Differences**: OPFS uses different APIs that don't always match the expected Node.js filesystem behavior
|
||||
|
||||
## Solution Implemented
|
||||
|
||||
### 1. Enhanced OPFS Adapter (`OPFSAdapterSimple.ts`)
|
||||
|
||||
**Improved Binary Data Handling:**
|
||||
- Added special handling for Git files to ensure Uint8Array compatibility
|
||||
- Created fresh Uint8Array instances to avoid browser-specific quirks
|
||||
- Added validation for array methods that isomorphic-git expects
|
||||
- Enhanced error handling with proper Node.js-style error codes
|
||||
|
||||
**Debug Mode:**
|
||||
- Added optional debug logging to track filesystem operations
|
||||
- Helps identify specific issues during Git operations
|
||||
|
||||
### 2. Better Error Handling (`ProjectsManager.ts`)
|
||||
|
||||
**Enhanced Clone Operation:**
|
||||
- Added timeout mechanism (60 seconds) to prevent hanging
|
||||
- Improved error detection for OPFS compatibility issues
|
||||
- Better cleanup of failed project directories
|
||||
- More descriptive error messages for users
|
||||
|
||||
**OPFS Issue Detection:**
|
||||
- Automatically detects filesystem compatibility issues
|
||||
- Provides clear recommendations to switch to LightningFS
|
||||
- User-friendly error messages explaining the problem
|
||||
|
||||
### 3. Filesystem Selection UI (`DataSettings.tsx`)
|
||||
|
||||
**User Interface Improvements:**
|
||||
- Clear warnings about OPFS Git compatibility issues
|
||||
- Information about when to use each filesystem type
|
||||
- Automatic fallback mechanism when OPFS initialization fails
|
||||
|
||||
### 4. Automatic Fallback (`App.tsx`)
|
||||
|
||||
**Robust Initialization:**
|
||||
- Tests OPFS functionality before using it
|
||||
- Automatically falls back to LightningFS if OPFS fails
|
||||
- Better error reporting and user feedback
|
||||
|
||||
## Usage Recommendations
|
||||
|
||||
### When to Use LightningFS (Recommended)
|
||||
- **Git Operations**: Better compatibility with isomorphic-git
|
||||
- **Stability**: Proven track record with Shakespeare
|
||||
- **Cross-browser**: Works in all modern browsers
|
||||
- **Default Choice**: Recommended for most users
|
||||
|
||||
### When to Use OPFS (Experimental)
|
||||
- **Large Storage**: When you need larger storage quotas
|
||||
- **Performance**: Potentially better performance for file operations
|
||||
- **Modern Browsers**: Only in Chrome, Edge, Firefox 111+
|
||||
- **Non-Git Workflows**: For projects that don't require Git operations
|
||||
|
||||
## Technical Details
|
||||
|
||||
### Error Patterns Detected
|
||||
The fix detects these specific error patterns that indicate OPFS compatibility issues:
|
||||
- `Cannot read properties of undefined`
|
||||
- `readObjectPacked` errors
|
||||
- `reading 'error'` errors
|
||||
- TypeError in isomorphic-git stack traces
|
||||
|
||||
### Binary Data Compatibility
|
||||
```typescript
|
||||
// Enhanced Uint8Array creation for Git compatibility
|
||||
const gitCompatibleArray = new Uint8Array(uint8Array.length);
|
||||
gitCompatibleArray.set(uint8Array);
|
||||
|
||||
// Validation of required methods
|
||||
if (!gitCompatibleArray.slice || typeof gitCompatibleArray.slice !== 'function') {
|
||||
throw new Error('Uint8Array missing required methods');
|
||||
}
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
```typescript
|
||||
// Node.js-style error objects
|
||||
const nodeError = new Error(`ENOENT: no such file or directory, open '${path}'`) as NodeJS.ErrnoException;
|
||||
nodeError.code = 'ENOENT';
|
||||
nodeError.errno = -2;
|
||||
nodeError.syscall = 'open';
|
||||
nodeError.path = path;
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
The fix includes:
|
||||
- ✅ All existing tests pass
|
||||
- ✅ Enhanced error handling
|
||||
- ✅ Automatic fallback mechanisms
|
||||
- ✅ User interface improvements
|
||||
- ✅ Debug logging capabilities
|
||||
|
||||
## Migration Path
|
||||
|
||||
For users experiencing OPFS issues:
|
||||
|
||||
1. **Immediate Fix**: Switch to LightningFS in Data Settings
|
||||
2. **Export Data**: Use the export feature before switching filesystems
|
||||
3. **Refresh**: Page will automatically refresh to apply new filesystem
|
||||
4. **Import**: Recreate projects as needed
|
||||
|
||||
## Future Improvements
|
||||
|
||||
1. **Better OPFS Support**: Continue improving OPFS compatibility
|
||||
2. **Hybrid Approach**: Use OPFS for regular files, LightningFS for Git
|
||||
3. **Performance Monitoring**: Track filesystem performance differences
|
||||
4. **User Analytics**: Monitor which filesystem users prefer
|
||||
|
||||
## Conclusion
|
||||
|
||||
This fix provides a robust solution for the OPFS/isomorphic-git compatibility issue while maintaining backward compatibility and providing clear user guidance. Users can continue using OPFS for non-Git operations while having LightningFS as a reliable fallback for Git-heavy workflows.
|
||||
@@ -0,0 +1,83 @@
|
||||
# OPFS Git Clone Fix Summary
|
||||
|
||||
## Issues Identified and Fixed
|
||||
|
||||
### Issue 1: Binary Pack Files Returned as Text
|
||||
**Problem**: Git pack index files (`.idx`) were being returned as text instead of binary data because isomorphic-git was passing options objects as the encoding parameter.
|
||||
|
||||
**Log Evidence**:
|
||||
```
|
||||
[OPFSAdapter] readFile called: path="/projects/untitled-1/.git/objects/pack/pack-be5dbf750d545d214e0191ae909d83915c6beb6a.idx", encoding="[object Object]"
|
||||
[OPFSAdapter] Returning text content for encoding "[object Object]", length=5138
|
||||
```
|
||||
|
||||
**Fix**: Modified encoding detection logic to always return binary data for Git pack files regardless of encoding parameter.
|
||||
|
||||
### Issue 2: Git Config Files Returned as Binary
|
||||
**Problem**: Git configuration files (`.git/config`) were being returned as binary data when they should be text files.
|
||||
|
||||
**Log Evidence**:
|
||||
```
|
||||
[OPFSAdapter] readFile called: path="/projects/nut-cache/.git/config", encoding="[object Object]"
|
||||
[OPFSAdapter] Returning binary content: 130 bytes, constructor: Uint8Array, isGitFile: true
|
||||
TypeError: text.split is not a function
|
||||
```
|
||||
|
||||
**Fix**: Added proper distinction between Git text files and Git binary files.
|
||||
|
||||
### Issue 3: Filesystem Capability Testing
|
||||
**Problem**: isomorphic-git calls `readFile` with undefined paths to test filesystem capabilities, causing unnecessary error logs.
|
||||
|
||||
**Fix**: Added proper handling and logging for filesystem capability tests.
|
||||
|
||||
## Solution Implementation
|
||||
|
||||
### Enhanced File Type Detection
|
||||
|
||||
```typescript
|
||||
// Git binary files that should ALWAYS be returned as Uint8Array
|
||||
const isGitBinaryFile = path.includes('.git/objects/pack/') ||
|
||||
(path.includes('.git/objects/') && !path.includes('.git/objects/info/')) ||
|
||||
path.endsWith('.pack') ||
|
||||
path.endsWith('.idx') ||
|
||||
path.includes('.git/index');
|
||||
|
||||
// Git text files that should be returned as text
|
||||
const isGitTextFile = path.includes('.git/config') ||
|
||||
path.includes('.git/HEAD') ||
|
||||
path.includes('.git/refs/') ||
|
||||
path.includes('.git/logs/') ||
|
||||
path.includes('.git/info/') ||
|
||||
path.includes('.git/hooks/') ||
|
||||
path.includes('.git/description');
|
||||
|
||||
// Smart encoding detection
|
||||
const shouldReturnText = (encoding === 'utf8' && typeof encoding === 'string') ||
|
||||
(!isGitBinaryFile && (isGitTextFile || !path.includes('.git/'))) ||
|
||||
(isGitTextFile && typeof encoding !== 'string');
|
||||
```
|
||||
|
||||
### Key Insights
|
||||
|
||||
1. **isomorphic-git Behavior**: isomorphic-git passes options objects as encoding parameters, not just strings
|
||||
2. **File Type Distinction**: Git repositories contain both text files (config, refs) and binary files (pack, index, objects)
|
||||
3. **Capability Testing**: isomorphic-git tests filesystem capabilities by calling methods with invalid parameters
|
||||
|
||||
### Testing Status
|
||||
|
||||
- ✅ Fixed binary pack file handling
|
||||
- ✅ Fixed Git config file handling
|
||||
- ✅ Added proper capability test handling
|
||||
- ✅ Enhanced debug logging
|
||||
- ✅ All existing tests pass
|
||||
- 🔄 Ready for real-world Git clone testing
|
||||
|
||||
## Next Steps
|
||||
|
||||
The OPFS adapter should now correctly handle Git clone operations by:
|
||||
1. Returning binary data for Git pack files and objects
|
||||
2. Returning text data for Git configuration and reference files
|
||||
3. Properly handling isomorphic-git's filesystem capability tests
|
||||
4. Providing detailed debug logging for troubleshooting
|
||||
|
||||
This should resolve the `TypeError: Cannot read properties of undefined (reading 'error')` and `TypeError: text.split is not a function` errors during Git clone operations with OPFS.
|
||||
@@ -0,0 +1,68 @@
|
||||
# OPFS Git Compatibility Test
|
||||
|
||||
## Issue Fixed
|
||||
|
||||
The main issue was that isomorphic-git was calling `fs.readFile()` on Git pack index files (`.idx`) with an options object as the encoding parameter, but the OPFS adapter was incorrectly interpreting this as a string encoding and returning text data instead of binary data.
|
||||
|
||||
## Debug Output Analysis
|
||||
|
||||
```
|
||||
[OPFSAdapter] readFile called: path="/projects/untitled-1/.git/objects/pack/pack-be5dbf750d545d214e0191ae909d83915c6beb6a.idx", encoding="[object Object]"
|
||||
[OPFSAdapter] File found: size=5328, type="", lastModified=1758521210388
|
||||
[OPFSAdapter] Returning text content for encoding "[object Object]", length=5138
|
||||
```
|
||||
|
||||
**Problem**: The `.idx` file is a binary Git pack index file, but it was being returned as text because `encoding="[object Object]"` was being treated as a truthy string value.
|
||||
|
||||
**Solution**: Modified the encoding detection logic to:
|
||||
1. Always return binary data for Git pack files and object files
|
||||
2. Only return text for explicit `encoding === 'utf8'` on non-Git binary files
|
||||
3. Handle cases where isomorphic-git passes options objects as encoding
|
||||
|
||||
## Code Changes
|
||||
|
||||
### Before (Broken)
|
||||
```typescript
|
||||
if (encoding === 'utf8') {
|
||||
return await file.text();
|
||||
} else if (encoding) {
|
||||
// BUG: This treated "[object Object]" as truthy and returned text
|
||||
return await file.text();
|
||||
} else {
|
||||
// Binary data
|
||||
return new Uint8Array(arrayBuffer);
|
||||
}
|
||||
```
|
||||
|
||||
### After (Fixed)
|
||||
```typescript
|
||||
// Git pack files (.pack, .idx) and object files should always be binary
|
||||
const isGitBinaryFile = path.includes('.git/objects/pack/') ||
|
||||
(path.includes('.git/objects/') && !path.includes('.git/objects/info/')) ||
|
||||
path.endsWith('.pack') ||
|
||||
path.endsWith('.idx') ||
|
||||
path.includes('.git/index');
|
||||
|
||||
// Only return text for explicit 'utf8' encoding on non-Git binary files
|
||||
const shouldReturnText = !isGitBinaryFile &&
|
||||
encoding === 'utf8' &&
|
||||
typeof encoding === 'string';
|
||||
|
||||
if (shouldReturnText) {
|
||||
return await file.text();
|
||||
} else {
|
||||
// Return binary data (Uint8Array)
|
||||
return new Uint8Array(arrayBuffer);
|
||||
}
|
||||
```
|
||||
|
||||
## Expected Result
|
||||
|
||||
With this fix, Git pack index files will be correctly returned as `Uint8Array` binary data, which should resolve the `Cannot read properties of undefined (reading 'error')` error in isomorphic-git's `readObjectPacked` function.
|
||||
|
||||
## Testing
|
||||
|
||||
To test this fix:
|
||||
1. Try creating a new project with OPFS enabled
|
||||
2. The Git clone operation should now succeed
|
||||
3. Debug logs should show: `Returning binary content: X bytes` for `.idx` files instead of `Returning text content`
|
||||
+29
-4
@@ -71,29 +71,54 @@ function FilesystemProvider({ children }: { children: React.ReactNode }) {
|
||||
if (!('storage' in navigator) || typeof (navigator.storage as unknown as { getDirectory: () => Promise<FileSystemDirectoryHandle> }).getDirectory !== 'function') {
|
||||
throw new Error('OPFS is not supported in this browser');
|
||||
}
|
||||
filesystem = new OPFSAdapterSimple();
|
||||
|
||||
console.log('Initializing OPFS filesystem...');
|
||||
filesystem = new OPFSAdapterSimple({ debug: true });
|
||||
|
||||
// Test basic filesystem operations to ensure OPFS works correctly
|
||||
try {
|
||||
await filesystem.mkdir('/test-opfs', { recursive: true });
|
||||
await filesystem.writeFile('/test-opfs/test.txt', 'test');
|
||||
const testContent = await filesystem.readFile('/test-opfs/test.txt', 'utf8');
|
||||
if (testContent !== 'test') {
|
||||
throw new Error('OPFS test failed: content mismatch');
|
||||
}
|
||||
await filesystem.unlink('/test-opfs/test.txt');
|
||||
await filesystem.rmdir('/test-opfs');
|
||||
console.log('OPFS filesystem test passed');
|
||||
} catch (testError) {
|
||||
console.warn('OPFS filesystem test failed:', testError);
|
||||
throw new Error(`OPFS filesystem test failed: ${testError}`);
|
||||
}
|
||||
} else {
|
||||
// Default to LightningFS
|
||||
console.log('Initializing LightningFS filesystem...');
|
||||
const lightningFS = new LightningFS('shakespeare-fs');
|
||||
filesystem = new LightningFSAdapter(lightningFS.promises);
|
||||
}
|
||||
|
||||
setFS(filesystem);
|
||||
setError(null);
|
||||
console.log(`Successfully initialized ${config.filesystemType === 'opfs' ? 'OPFS' : 'LightningFS'} filesystem`);
|
||||
} catch (err) {
|
||||
console.error('Failed to initialize filesystem:', err);
|
||||
setError(err instanceof Error ? err.message : 'Failed to initialize filesystem');
|
||||
const errorMessage = err instanceof Error ? err.message : 'Failed to initialize filesystem';
|
||||
|
||||
// Fallback to LightningFS if OPFS fails
|
||||
if (config.filesystemType === 'opfs') {
|
||||
console.warn('OPFS initialization failed, falling back to LightningFS...');
|
||||
try {
|
||||
const lightningFS = new LightningFS('shakespeare-fs');
|
||||
const fallbackFs = new LightningFSAdapter(lightningFS.promises);
|
||||
setFS(fallbackFs);
|
||||
console.warn('Falling back to LightningFS due to OPFS initialization error');
|
||||
setError(null);
|
||||
console.log('Successfully fell back to LightningFS');
|
||||
} catch (fallbackErr) {
|
||||
setError(`Failed to initialize both OPFS and LightningFS: ${fallbackErr}`);
|
||||
console.error('LightningFS fallback also failed:', fallbackErr);
|
||||
setError(`Failed to initialize both OPFS and LightningFS: ${errorMessage}; Fallback error: ${fallbackErr}`);
|
||||
}
|
||||
} else {
|
||||
setError(errorMessage);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+361
-111
@@ -6,8 +6,11 @@ import type { JSRuntimeFS, DirectoryEntry } from './JSRuntime';
|
||||
*/
|
||||
export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
private root: Promise<FileSystemDirectoryHandle>;
|
||||
private debugMode: boolean = false;
|
||||
|
||||
constructor(options?: { debug?: boolean }) {
|
||||
this.debugMode = options?.debug || false;
|
||||
|
||||
constructor() {
|
||||
// Check if OPFS is available
|
||||
if (!('storage' in navigator) ||
|
||||
typeof (navigator.storage as unknown as { getDirectory: () => Promise<FileSystemDirectoryHandle> }).getDirectory !== 'function') {
|
||||
@@ -16,6 +19,22 @@ export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
|
||||
// Get the root directory handle for OPFS
|
||||
this.root = (navigator.storage as unknown as { getDirectory: () => Promise<FileSystemDirectoryHandle> }).getDirectory();
|
||||
|
||||
if (this.debugMode) {
|
||||
console.log('OPFSAdapterSimple initialized with debug mode enabled');
|
||||
}
|
||||
}
|
||||
|
||||
private log(...args: unknown[]) {
|
||||
if (this.debugMode) {
|
||||
console.log('[OPFSAdapter]', ...args);
|
||||
}
|
||||
}
|
||||
|
||||
private logError(...args: unknown[]) {
|
||||
if (this.debugMode) {
|
||||
console.error('[OPFSAdapter]', ...args);
|
||||
}
|
||||
}
|
||||
|
||||
async readFile(path: string): Promise<Uint8Array>;
|
||||
@@ -23,10 +42,14 @@ export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
async readFile(path: string, encoding: string): Promise<string>;
|
||||
async readFile(path: string, encoding?: string): Promise<string | Uint8Array>;
|
||||
async readFile(path: string, encoding?: string): Promise<string | Uint8Array> {
|
||||
this.log(`readFile called: path="${path}", encoding="${encoding}", type: ${typeof encoding}`);
|
||||
|
||||
try {
|
||||
// Basic path validation
|
||||
if (!path || typeof path !== 'string') {
|
||||
const error = new Error('ENOENT: no such file or directory, open \'undefined\'') as NodeJS.ErrnoException;
|
||||
// Basic path validation - handle isomorphic-git calling with undefined paths
|
||||
// Note: isomorphic-git sometimes calls readFile with undefined paths to test filesystem capabilities
|
||||
if (!path || typeof path !== 'string' || path === 'undefined') {
|
||||
this.log(`Filesystem capability test with invalid path: ${path} (type: ${typeof path}) - this is normal`);
|
||||
const error = new Error(`ENOENT: no such file or directory, open '${path || 'undefined'}'`) as NodeJS.ErrnoException;
|
||||
error.code = 'ENOENT';
|
||||
error.errno = -2;
|
||||
error.syscall = 'open';
|
||||
@@ -37,61 +60,187 @@ export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
const fileHandle = await this.getFileHandle(path);
|
||||
const file = await fileHandle.getFile();
|
||||
|
||||
this.log(`File found: size=${file.size}, type="${file.type}", lastModified=${file.lastModified}`);
|
||||
|
||||
// Additional validation for Git files
|
||||
if (path.includes('.git/') && file.size === 0) {
|
||||
this.logError(`Warning: Git file is empty: ${path}`);
|
||||
}
|
||||
|
||||
// Handle encoding parameter exactly like LightningFS
|
||||
if (encoding === 'utf8') {
|
||||
return await file.text();
|
||||
} else if (encoding) {
|
||||
// Any other encoding value, return as text
|
||||
return await file.text();
|
||||
// Key insight: isomorphic-git sometimes passes options objects as encoding parameter
|
||||
// We need to distinguish between text files (config, refs, etc.) and binary files (pack, index, objects)
|
||||
|
||||
// Git binary files that should ALWAYS be returned as Uint8Array
|
||||
const isGitBinaryFile = path.includes('.git/objects/pack/') ||
|
||||
(path.includes('.git/objects/') && !path.includes('.git/objects/info/')) ||
|
||||
path.endsWith('.pack') ||
|
||||
path.endsWith('.idx') ||
|
||||
path.includes('.git/index');
|
||||
|
||||
// Git text files that should be returned as text when no explicit binary encoding is requested
|
||||
const isGitTextFile = path.includes('.git/config') ||
|
||||
path.includes('.git/HEAD') ||
|
||||
path.includes('.git/refs/') ||
|
||||
path.includes('.git/logs/') ||
|
||||
path.includes('.git/info/') ||
|
||||
path.includes('.git/hooks/') ||
|
||||
path.includes('.git/description');
|
||||
|
||||
// Determine if we should return text:
|
||||
// 1. Explicit utf8 encoding request
|
||||
// 2. Git text files (unless explicit binary encoding)
|
||||
// 3. Non-Git files (unless explicit binary encoding)
|
||||
const shouldReturnText = (encoding === 'utf8' && typeof encoding === 'string') ||
|
||||
(!isGitBinaryFile && (isGitTextFile || !path.includes('.git/'))) ||
|
||||
(isGitTextFile && typeof encoding !== 'string');
|
||||
|
||||
this.log(`File type analysis: isGitBinaryFile=${isGitBinaryFile}, isGitTextFile=${isGitTextFile}, shouldReturnText=${shouldReturnText}, encoding type=${typeof encoding}`);
|
||||
|
||||
if (shouldReturnText) {
|
||||
const text = await file.text();
|
||||
this.log(`Returning text content for encoding "${encoding}", length=${text.length}`);
|
||||
return text;
|
||||
} else {
|
||||
// No encoding or undefined, return as Uint8Array (binary data)
|
||||
const arrayBuffer = await file.arrayBuffer();
|
||||
return new Uint8Array(arrayBuffer);
|
||||
let arrayBuffer: ArrayBuffer;
|
||||
|
||||
try {
|
||||
arrayBuffer = await file.arrayBuffer();
|
||||
if (!arrayBuffer) {
|
||||
throw new Error('ArrayBuffer is null or undefined');
|
||||
}
|
||||
} catch (bufferError) {
|
||||
this.logError(`Failed to get ArrayBuffer for ${path}:`, bufferError);
|
||||
throw new Error(`Failed to read binary data from file: ${path}`);
|
||||
}
|
||||
|
||||
// Create a proper Uint8Array that behaves like Node.js Buffer/Uint8Array
|
||||
// This is critical for isomorphic-git compatibility
|
||||
let uint8Array: Uint8Array;
|
||||
|
||||
try {
|
||||
uint8Array = new Uint8Array(arrayBuffer);
|
||||
|
||||
// For Git pack files and other binary Git objects, we need to be extra careful
|
||||
// isomorphic-git expects very specific behavior from these arrays
|
||||
if (path.includes('.git/')) {
|
||||
// Create a fresh Uint8Array to avoid any browser-specific quirks
|
||||
const gitCompatibleArray = new Uint8Array(uint8Array.length);
|
||||
gitCompatibleArray.set(uint8Array);
|
||||
|
||||
// Ensure the array has proper prototype and methods
|
||||
// Some isomorphic-git operations check for specific array methods
|
||||
if (!gitCompatibleArray.slice || typeof gitCompatibleArray.slice !== 'function') {
|
||||
this.logError(`Uint8Array missing slice method for Git file: ${path}`);
|
||||
}
|
||||
if (!gitCompatibleArray.subarray || typeof gitCompatibleArray.subarray !== 'function') {
|
||||
this.logError(`Uint8Array missing subarray method for Git file: ${path}`);
|
||||
}
|
||||
|
||||
uint8Array = gitCompatibleArray;
|
||||
}
|
||||
|
||||
// Validate the array before returning
|
||||
if (!uint8Array || uint8Array.length === undefined) {
|
||||
throw new Error(`Invalid Uint8Array created for file: ${path}`);
|
||||
}
|
||||
|
||||
this.log(`Returning binary content: ${uint8Array.length} bytes, constructor: ${uint8Array.constructor.name}, isGitFile: ${path.includes('.git/')}`);
|
||||
return uint8Array;
|
||||
} catch (arrayError) {
|
||||
this.logError(`Failed to create Uint8Array for ${path}:`, arrayError);
|
||||
throw new Error(`Failed to create binary array from file: ${path}`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
// Convert DOMException to Node.js style error for isomorphic-git compatibility
|
||||
this.logError(`readFile failed for path="${path}":`, error);
|
||||
|
||||
// Enhanced error handling for isomorphic-git compatibility
|
||||
let finalError: Error & NodeJS.ErrnoException;
|
||||
|
||||
if (error instanceof Error && (error.message.includes('NotFound') || error.name === 'NotFoundError')) {
|
||||
const nodeError = new Error(`ENOENT: no such file or directory, open '${path}'`) as NodeJS.ErrnoException;
|
||||
nodeError.code = 'ENOENT';
|
||||
nodeError.errno = -2;
|
||||
nodeError.syscall = 'open';
|
||||
nodeError.path = path;
|
||||
throw nodeError;
|
||||
finalError = new Error(`ENOENT: no such file or directory, open '${path}'`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'ENOENT';
|
||||
finalError.errno = -2;
|
||||
finalError.syscall = 'open';
|
||||
finalError.path = path;
|
||||
} else if (error instanceof Error) {
|
||||
// Wrap any other error to ensure it has required properties
|
||||
finalError = error as NodeJS.ErrnoException;
|
||||
if (!finalError.code) finalError.code = 'EIO';
|
||||
if (!finalError.errno) finalError.errno = -5;
|
||||
if (!finalError.syscall) finalError.syscall = 'read';
|
||||
if (!finalError.path) finalError.path = path;
|
||||
} else {
|
||||
// Convert non-Error objects to proper Error
|
||||
finalError = new Error(String(error)) as NodeJS.ErrnoException;
|
||||
finalError.code = 'EIO';
|
||||
finalError.errno = -5;
|
||||
finalError.syscall = 'read';
|
||||
finalError.path = path;
|
||||
}
|
||||
|
||||
// For any other error, ensure it has the properties isomorphic-git expects
|
||||
if (error instanceof Error) {
|
||||
const nodeError = error as NodeJS.ErrnoException;
|
||||
// If it doesn't have the expected properties, add them
|
||||
if (!nodeError.code) {
|
||||
nodeError.code = 'UNKNOWN';
|
||||
}
|
||||
if (!nodeError.errno) {
|
||||
nodeError.errno = -1;
|
||||
}
|
||||
if (!nodeError.syscall) {
|
||||
nodeError.syscall = 'read';
|
||||
}
|
||||
if (!nodeError.path) {
|
||||
nodeError.path = path;
|
||||
}
|
||||
// Ensure the error has the original error information
|
||||
if (error instanceof Error && error !== finalError) {
|
||||
// finalError.cause = error; // Not available in older TypeScript
|
||||
finalError.stack = error.stack;
|
||||
}
|
||||
|
||||
throw error;
|
||||
throw finalError;
|
||||
}
|
||||
}
|
||||
|
||||
async writeFile(path: string, data: string | Uint8Array, _encoding?: string): Promise<void> {
|
||||
const fileHandle = await this.getFileHandle(path, { create: true });
|
||||
const writable = await fileHandle.createWritable();
|
||||
try {
|
||||
const fileHandle = await this.getFileHandle(path, { create: true });
|
||||
const writable = await fileHandle.createWritable();
|
||||
|
||||
if (typeof data === 'string') {
|
||||
await writable.write(data);
|
||||
} else {
|
||||
await writable.write(data);
|
||||
if (typeof data === 'string') {
|
||||
await writable.write(data);
|
||||
} else {
|
||||
// For binary data, ensure we write it correctly
|
||||
// Some browsers may have issues with Uint8Array variants
|
||||
if (data instanceof Uint8Array) {
|
||||
await writable.write(data);
|
||||
} else {
|
||||
// Convert ArrayBuffer or other array-like objects to Uint8Array
|
||||
const uint8Array = new Uint8Array(data);
|
||||
await writable.write(uint8Array);
|
||||
}
|
||||
}
|
||||
|
||||
await writable.close();
|
||||
} catch (error) {
|
||||
// Enhanced error handling for write operations
|
||||
let finalError: Error & NodeJS.ErrnoException;
|
||||
|
||||
if (error instanceof Error && (error.message.includes('NotFound') || error.name === 'NotFoundError')) {
|
||||
finalError = new Error(`ENOENT: no such file or directory, open '${path}'`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'ENOENT';
|
||||
finalError.errno = -2;
|
||||
finalError.syscall = 'open';
|
||||
finalError.path = path;
|
||||
} else if (error instanceof Error) {
|
||||
finalError = error as NodeJS.ErrnoException;
|
||||
if (!finalError.code) finalError.code = 'EIO';
|
||||
if (!finalError.errno) finalError.errno = -5;
|
||||
if (!finalError.syscall) finalError.syscall = 'write';
|
||||
if (!finalError.path) finalError.path = path;
|
||||
} else {
|
||||
finalError = new Error(String(error)) as NodeJS.ErrnoException;
|
||||
finalError.code = 'EIO';
|
||||
finalError.errno = -5;
|
||||
finalError.syscall = 'write';
|
||||
finalError.path = path;
|
||||
}
|
||||
|
||||
if (error instanceof Error && error !== finalError) {
|
||||
finalError.stack = error.stack;
|
||||
}
|
||||
|
||||
throw finalError;
|
||||
}
|
||||
|
||||
await writable.close();
|
||||
}
|
||||
|
||||
async readdir(path: string): Promise<string[]>;
|
||||
@@ -191,16 +340,37 @@ export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
// isSymbolicLink: () => false,
|
||||
};
|
||||
} catch (dirError) {
|
||||
// Convert DOMException to Node.js style error for isomorphic-git compatibility
|
||||
// Enhanced error handling for isomorphic-git compatibility
|
||||
let finalError: Error & NodeJS.ErrnoException;
|
||||
|
||||
if (dirError instanceof Error && (dirError.message.includes('NotFound') || dirError.name === 'NotFoundError')) {
|
||||
const nodeError = new Error(`ENOENT: no such file or directory, stat '${path}'`) as NodeJS.ErrnoException;
|
||||
nodeError.code = 'ENOENT';
|
||||
nodeError.errno = -2;
|
||||
nodeError.syscall = 'stat';
|
||||
nodeError.path = path;
|
||||
throw nodeError;
|
||||
finalError = new Error(`ENOENT: no such file or directory, stat '${path}'`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'ENOENT';
|
||||
finalError.errno = -2;
|
||||
finalError.syscall = 'stat';
|
||||
finalError.path = path;
|
||||
} else if (dirError instanceof Error) {
|
||||
// Wrap any other error to ensure it has required properties
|
||||
finalError = dirError as NodeJS.ErrnoException;
|
||||
if (!finalError.code) finalError.code = 'UNKNOWN';
|
||||
if (!finalError.errno) finalError.errno = -1;
|
||||
if (!finalError.syscall) finalError.syscall = 'stat';
|
||||
if (!finalError.path) finalError.path = path;
|
||||
} else {
|
||||
// Convert non-Error objects to proper Error
|
||||
finalError = new Error(String(dirError)) as NodeJS.ErrnoException;
|
||||
finalError.code = 'UNKNOWN';
|
||||
finalError.errno = -1;
|
||||
finalError.syscall = 'stat';
|
||||
finalError.path = path;
|
||||
}
|
||||
throw dirError;
|
||||
|
||||
// Ensure error has original error information
|
||||
if (dirError instanceof Error && dirError !== finalError) {
|
||||
finalError.stack = dirError.stack;
|
||||
}
|
||||
|
||||
throw finalError;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -253,34 +423,37 @@ export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
// Remove any trailing newlines and return the target
|
||||
return content.trim();
|
||||
} catch (error) {
|
||||
// Convert DOMException to Node.js style error for isomorphic-git compatibility
|
||||
// Enhanced error handling for isomorphic-git compatibility
|
||||
let finalError: Error & NodeJS.ErrnoException;
|
||||
|
||||
if (error instanceof Error && (error.message.includes('NotFound') || error.name === 'NotFoundError')) {
|
||||
const nodeError = new Error(`ENOENT: no such file or directory, readlink '${path}'`) as NodeJS.ErrnoException;
|
||||
nodeError.code = 'ENOENT';
|
||||
nodeError.errno = -2;
|
||||
nodeError.syscall = 'readlink';
|
||||
nodeError.path = path;
|
||||
throw nodeError;
|
||||
finalError = new Error(`ENOENT: no such file or directory, readlink '${path}'`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'ENOENT';
|
||||
finalError.errno = -2;
|
||||
finalError.syscall = 'readlink';
|
||||
finalError.path = path;
|
||||
} else if (error instanceof Error) {
|
||||
// Wrap any other error to ensure it has required properties
|
||||
finalError = error as NodeJS.ErrnoException;
|
||||
if (!finalError.code) finalError.code = 'UNKNOWN';
|
||||
if (!finalError.errno) finalError.errno = -1;
|
||||
if (!finalError.syscall) finalError.syscall = 'readlink';
|
||||
if (!finalError.path) finalError.path = path;
|
||||
} else {
|
||||
// Convert non-Error objects to proper Error
|
||||
finalError = new Error(String(error)) as NodeJS.ErrnoException;
|
||||
finalError.code = 'UNKNOWN';
|
||||
finalError.errno = -1;
|
||||
finalError.syscall = 'readlink';
|
||||
finalError.path = path;
|
||||
}
|
||||
|
||||
// For any other error, ensure it has properties isomorphic-git expects
|
||||
if (error instanceof Error) {
|
||||
const nodeError = error as NodeJS.ErrnoException;
|
||||
if (!nodeError.code) {
|
||||
nodeError.code = 'UNKNOWN';
|
||||
}
|
||||
if (!nodeError.errno) {
|
||||
nodeError.errno = -1;
|
||||
}
|
||||
if (!nodeError.syscall) {
|
||||
nodeError.syscall = 'readlink';
|
||||
}
|
||||
if (!nodeError.path) {
|
||||
nodeError.path = path;
|
||||
}
|
||||
// Ensure error has original error information
|
||||
if (error instanceof Error && error !== finalError) {
|
||||
finalError.stack = error.stack;
|
||||
}
|
||||
|
||||
throw error;
|
||||
throw finalError;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,34 +471,37 @@ export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
await writable.write(target);
|
||||
await writable.close();
|
||||
} catch (error) {
|
||||
// Convert DOMException to Node.js style error for isomorphic-git compatibility
|
||||
// Enhanced error handling for isomorphic-git compatibility
|
||||
let finalError: Error & NodeJS.ErrnoException;
|
||||
|
||||
if (error instanceof Error && (error.message.includes('NotFound') || error.name === 'NotFoundError')) {
|
||||
const nodeError = new Error(`ENOENT: no such file or directory, symlink '${path}'`) as NodeJS.ErrnoException;
|
||||
nodeError.code = 'ENOENT';
|
||||
nodeError.errno = -2;
|
||||
nodeError.syscall = 'symlink';
|
||||
nodeError.path = path;
|
||||
throw nodeError;
|
||||
finalError = new Error(`ENOENT: no such file or directory, symlink '${path}'`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'ENOENT';
|
||||
finalError.errno = -2;
|
||||
finalError.syscall = 'symlink';
|
||||
finalError.path = path;
|
||||
} else if (error instanceof Error) {
|
||||
// Wrap any other error to ensure it has required properties
|
||||
finalError = error as NodeJS.ErrnoException;
|
||||
if (!finalError.code) finalError.code = 'UNKNOWN';
|
||||
if (!finalError.errno) finalError.errno = -1;
|
||||
if (!finalError.syscall) finalError.syscall = 'symlink';
|
||||
if (!finalError.path) finalError.path = path;
|
||||
} else {
|
||||
// Convert non-Error objects to proper Error
|
||||
finalError = new Error(String(error)) as NodeJS.ErrnoException;
|
||||
finalError.code = 'UNKNOWN';
|
||||
finalError.errno = -1;
|
||||
finalError.syscall = 'symlink';
|
||||
finalError.path = path;
|
||||
}
|
||||
|
||||
// For any other error, ensure it has properties isomorphic-git expects
|
||||
if (error instanceof Error) {
|
||||
const nodeError = error as NodeJS.ErrnoException;
|
||||
if (!nodeError.code) {
|
||||
nodeError.code = 'UNKNOWN';
|
||||
}
|
||||
if (!nodeError.errno) {
|
||||
nodeError.errno = -1;
|
||||
}
|
||||
if (!nodeError.syscall) {
|
||||
nodeError.syscall = 'symlink';
|
||||
}
|
||||
if (!nodeError.path) {
|
||||
nodeError.path = path;
|
||||
}
|
||||
// Ensure error has original error information
|
||||
if (error instanceof Error && error !== finalError) {
|
||||
finalError.stack = error.stack;
|
||||
}
|
||||
|
||||
throw error;
|
||||
throw finalError;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,22 +523,47 @@ export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
try {
|
||||
currentHandle = await currentHandle.getDirectoryHandle(part, options);
|
||||
} catch (error) {
|
||||
// Convert DOMException to Node.js style error for better compatibility
|
||||
// Enhanced error handling for isomorphic-git compatibility
|
||||
let finalError: Error & NodeJS.ErrnoException;
|
||||
|
||||
if (error instanceof Error && (error.message.includes('NotFound') || error.name === 'NotFoundError')) {
|
||||
if (options?.create) {
|
||||
// If we're supposed to create, this shouldn't happen, but re-throw with better error
|
||||
throw new Error(`Failed to create directory part '${part}' in path '${path}': ${error.message}`);
|
||||
finalError = new Error(`Failed to create directory part '${part}' in path '${path}': ${error.message}`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'EIO';
|
||||
finalError.errno = -5;
|
||||
finalError.syscall = 'mkdir';
|
||||
finalError.path = path;
|
||||
} else {
|
||||
// Directory doesn't exist and we're not creating it
|
||||
const nodeError = new Error(`ENOENT: no such file or directory, stat '${path}'`) as NodeJS.ErrnoException;
|
||||
nodeError.code = 'ENOENT';
|
||||
nodeError.errno = -2;
|
||||
nodeError.syscall = 'stat';
|
||||
nodeError.path = path;
|
||||
throw nodeError;
|
||||
finalError = new Error(`ENOENT: no such file or directory, stat '${path}'`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'ENOENT';
|
||||
finalError.errno = -2;
|
||||
finalError.syscall = 'stat';
|
||||
finalError.path = path;
|
||||
}
|
||||
} else if (error instanceof Error) {
|
||||
// Wrap any other error to ensure it has required properties
|
||||
finalError = error as NodeJS.ErrnoException;
|
||||
if (!finalError.code) finalError.code = 'UNKNOWN';
|
||||
if (!finalError.errno) finalError.errno = -1;
|
||||
if (!finalError.syscall) finalError.syscall = 'stat';
|
||||
if (!finalError.path) finalError.path = path;
|
||||
} else {
|
||||
// Convert non-Error objects to proper Error
|
||||
finalError = new Error(String(error)) as NodeJS.ErrnoException;
|
||||
finalError.code = 'UNKNOWN';
|
||||
finalError.errno = -1;
|
||||
finalError.syscall = 'stat';
|
||||
finalError.path = path;
|
||||
}
|
||||
throw error;
|
||||
|
||||
// Ensure error has original error information
|
||||
if (error instanceof Error && error !== finalError) {
|
||||
finalError.stack = error.stack;
|
||||
}
|
||||
|
||||
throw finalError;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,13 +573,62 @@ export class OPFSAdapterSimple implements JSRuntimeFS {
|
||||
private async getFileHandle(path: string, options?: { create?: boolean }): Promise<FileSystemFileHandle> {
|
||||
// Basic path validation
|
||||
if (!path || typeof path !== 'string') {
|
||||
throw new Error('ENOENT: no such file or directory');
|
||||
const error = new Error('ENOENT: no such file or directory, open \'undefined\'') as NodeJS.ErrnoException;
|
||||
error.code = 'ENOENT';
|
||||
error.errno = -2;
|
||||
error.syscall = 'open';
|
||||
error.path = 'undefined';
|
||||
throw error;
|
||||
}
|
||||
|
||||
const parentPath = this.getParentPath(path);
|
||||
const fileName = this.getBaseName(path);
|
||||
const parentHandle = await this.getDirectoryHandle(parentPath);
|
||||
return parentHandle.getFileHandle(fileName, options);
|
||||
try {
|
||||
const parentPath = this.getParentPath(path);
|
||||
const fileName = this.getBaseName(path);
|
||||
const parentHandle = await this.getDirectoryHandle(parentPath);
|
||||
return parentHandle.getFileHandle(fileName, options);
|
||||
} catch (error) {
|
||||
// Enhanced error handling for isomorphic-git compatibility
|
||||
let finalError: Error & NodeJS.ErrnoException;
|
||||
|
||||
if (error instanceof Error && (error.message.includes('NotFound') || error.name === 'NotFoundError')) {
|
||||
if (options?.create) {
|
||||
// If we're supposed to create, this shouldn't happen
|
||||
finalError = new Error(`ENOENT: no such file or directory, open '${path}'`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'ENOENT';
|
||||
finalError.errno = -2;
|
||||
finalError.syscall = 'open';
|
||||
finalError.path = path;
|
||||
} else {
|
||||
// File doesn't exist and we're not creating it
|
||||
finalError = new Error(`ENOENT: no such file or directory, open '${path}'`) as NodeJS.ErrnoException;
|
||||
finalError.code = 'ENOENT';
|
||||
finalError.errno = -2;
|
||||
finalError.syscall = 'open';
|
||||
finalError.path = path;
|
||||
}
|
||||
} else if (error instanceof Error) {
|
||||
// Wrap any other error to ensure it has required properties
|
||||
finalError = error as NodeJS.ErrnoException;
|
||||
if (!finalError.code) finalError.code = 'UNKNOWN';
|
||||
if (!finalError.errno) finalError.errno = -1;
|
||||
if (!finalError.syscall) finalError.syscall = 'open';
|
||||
if (!finalError.path) finalError.path = path;
|
||||
} else {
|
||||
// Convert non-Error objects to proper Error
|
||||
finalError = new Error(String(error)) as NodeJS.ErrnoException;
|
||||
finalError.code = 'UNKNOWN';
|
||||
finalError.errno = -1;
|
||||
finalError.syscall = 'open';
|
||||
finalError.path = path;
|
||||
}
|
||||
|
||||
// Ensure error has original error information
|
||||
if (error instanceof Error && error !== finalError) {
|
||||
finalError.stack = error.stack;
|
||||
}
|
||||
|
||||
throw finalError;
|
||||
}
|
||||
}
|
||||
|
||||
private getParentPath(path: string): string {
|
||||
|
||||
@@ -150,15 +150,65 @@ export class ProjectsManager {
|
||||
|
||||
// Clone the repository (Git class now handles Nostr URIs automatically)
|
||||
try {
|
||||
await this.git.clone({
|
||||
console.log(`Starting clone operation: ${repoUrl} -> ${projectPath}`);
|
||||
console.log(`Clone options:`, { singleBranch: true, depth: options?.depth });
|
||||
|
||||
// Add a timeout to prevent hanging
|
||||
const cloneTimeout = 60000; // 60 seconds
|
||||
const clonePromise = this.git.clone({
|
||||
dir: projectPath,
|
||||
url: repoUrl,
|
||||
singleBranch: true,
|
||||
depth: options?.depth, // Use depth if provided, otherwise clone full history
|
||||
});
|
||||
|
||||
const timeoutPromise = new Promise<never>((_, reject) => {
|
||||
setTimeout(() => {
|
||||
reject(new Error(`Clone operation timed out after ${cloneTimeout}ms`));
|
||||
}, cloneTimeout);
|
||||
});
|
||||
|
||||
await Promise.race([clonePromise, timeoutPromise]);
|
||||
console.log(`Successfully cloned repository to: ${projectPath}`);
|
||||
} catch (error) {
|
||||
console.error(`Failed to clone repository ${repoUrl} to ${projectPath}:`, error);
|
||||
|
||||
// Log additional debugging information
|
||||
if (error instanceof Error) {
|
||||
console.error(`Error name: ${error.name}`);
|
||||
console.error(`Error message: ${error.message}`);
|
||||
console.error(`Error stack:`, error.stack);
|
||||
|
||||
// Check if it's a filesystem-related error that suggests OPFS incompatibility
|
||||
const isOPFSCompatibilityIssue =
|
||||
error.message.includes('Cannot read properties of undefined') ||
|
||||
error.message.includes('readObjectPacked') ||
|
||||
error.message.includes('reading \'error\'') ||
|
||||
error.message.includes('TypeError') && error.stack?.includes('isomorphic-git');
|
||||
|
||||
if (isOPFSCompatibilityIssue) {
|
||||
console.error('🚨 DETECTED: Filesystem compatibility issue with isomorphic-git and OPFS');
|
||||
console.error('📋 ISSUE: isomorphic-git expects Node.js-style filesystem behavior, but OPFS has subtle differences');
|
||||
console.error('💡 SOLUTION: This project works best with LightningFS for Git operations');
|
||||
console.error('⚙️ RECOMMENDATION: Change filesystem setting to "lightningfs" in preferences');
|
||||
|
||||
// Provide a more user-friendly error message
|
||||
throw new Error(
|
||||
'Git clone failed due to filesystem compatibility issues. ' +
|
||||
'OPFS (Origin Private File System) has some compatibility limitations with Git operations. ' +
|
||||
'Please switch to LightningFS in your preferences for better Git support.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up the failed project directory
|
||||
try {
|
||||
await this.deleteDirectory(projectPath);
|
||||
console.log(`Cleaned up failed project directory: ${projectPath}`);
|
||||
} catch (cleanupError) {
|
||||
console.warn(`Failed to clean up project directory after clone failure:`, cleanupError);
|
||||
}
|
||||
|
||||
throw new Error(`Failed to clone repository: ${error}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -377,7 +377,7 @@ export function DataSettings() {
|
||||
</span>
|
||||
<span className="text-sm text-muted-foreground">
|
||||
{opfsAvailable
|
||||
? "Modern browser API with better performance and larger storage limits."
|
||||
? "Modern browser API with better performance and larger storage limits. Note: May have compatibility issues with Git operations."
|
||||
: "Not available in this browser. Use Chrome, Edge, or Firefox 111+."
|
||||
}
|
||||
</span>
|
||||
@@ -396,6 +396,15 @@ export function DataSettings() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{opfsAvailable && filesystemType === 'opfs' && (
|
||||
<div className="flex items-center gap-2 p-3 bg-blue-50 dark:bg-blue-950/20 rounded-md border border-blue-200 dark:border-blue-800">
|
||||
<Info className="h-4 w-4 text-blue-600 dark:text-blue-400" />
|
||||
<div className="text-sm text-blue-800 dark:text-blue-200">
|
||||
<p><strong>Git Compatibility Note:</strong> OPFS may have compatibility issues with Git clone operations. If you experience problems creating projects, switch to LightningFS for better Git support.</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="text-xs text-muted-foreground">
|
||||
<p><strong>Note:</strong> Changing filesystem type will refresh the page and may cause data loss if not properly exported first.</p>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user