fix: improve cross-platform compatibility for macOS and Linux#95
Open
mitre88 wants to merge 1 commit intopablodelucca:mainfrom
Open
fix: improve cross-platform compatibility for macOS and Linux#95mitre88 wants to merge 1 commit intopablodelucca:mainfrom
mitre88 wants to merge 1 commit intopablodelucca:mainfrom
Conversation
- Handle fs.watch errors gracefully with platform-specific guidance (e.g., inotify limit hint on Linux) - Normalize asset file paths using path.posix/path.win32 for consistent cross-platform path handling in furniture catalog loading - Add platform/arch logging on startup for easier debugging - Log fs.watch errors in layout file watcher instead of silently swallowing
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
Improves cross-platform robustness for macOS and Linux, addressing the "Windows-only testing" known limitation noted in the README.
Changes
1. Graceful
fs.watcherror handling (fileWatcher.ts)errorevent handler on thefs.watchwatcher to prevent unhandled errors from crashing the extensionfs.watchcan fail withENOSPCwhen the system runs out of inotify watchers — the error message now includes a hint to increasefs.inotify.max_user_watches2. Cross-platform asset path normalization (
assetLoader.ts)/). The path comparison (startsWith("assets/")) worked correctly, but the resolved path could theoretically mix separators on Windowspath.posix/path.win32and splits on/when joining, ensuring consistent behavior across all platforms3. Platform logging on startup (
PixelAgentsViewProvider.ts)process.platformandprocess.archat startup for easier debugging of platform-specific issues4. Layout watcher error logging (
layoutPersistence.ts)fs.watcherror handler for the layout file watcher previously swallowed errors silently — now logs them for debuggingTesting
npm run build) passes on macOS (arm64, Darwin)Notes
After reviewing the codebase thoroughly, the extension is already well-architected for cross-platform use:
path.join()consistentlygetProjectDirPath) matches Claude Code's own convention across platformsThese changes are defensive improvements that handle edge cases (fs.watch errors, path normalization) and improve debuggability on non-Windows platforms.