mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
* fix(mobile): shim `process` so the bundle survives module-eval on mobile Follow-up to #2576 (preview issue #125). After the EventEmitter fix, mobile now crashes at load with "ReferenceError: Can't find variable: process". Cause: Agent Mode is desktop-only but its modules are statically imported, so they're evaluated on every platform. Several read the Node global `process` at module scope (e.g. `InstallCommandRow.tsx`'s `const DEFAULT_LABEL = process.platform === "win32" ? ...`, the codex/claude/opencode descriptors), and bundled Node deps read `process.env` at init. Mobile's WebView has no `process`, so evaluating any of them throws during import and kills the plugin. Fix: prepend a minimal `process` shim in the esbuild banner — `var process = globalThis.process || { env:{}, platform:"", ... }`. Desktop (Electron) has a real `globalThis.process` and uses it unchanged; mobile gets the stub, so module evaluation no longer throws. The desktop-only code paths that actually use `process` never run on mobile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(test-vault): copy-deploy into iCloud-synced vaults for mobile testing `npm run test:vault` symlinks main.js/styles.css by default, but iCloud syncs file contents, not link targets, so a symlinked build never reaches the phone. Detect iCloud vaults (path under "/Mobile Documents/") and copy real files instead, so deploying to an iCloud vault makes the build testable on Obsidian mobile. Mirrors the existing WSL copy-mode rule. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(mobile): keep agent mode off load path * test(mobile): add load smoke check * fix(mobile): share agent chat mode constant --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| stubs | ||
| test-fixtures | ||
| mobile-load-smoke.cjs | ||
| patchRendererUnsafeUnref.js | ||
| printPromptDebug.js | ||
| printPromptDebugEntry.ts | ||
| seed-skills-scenarios.sh | ||
| test-reset-data.sh | ||
| test-vault.sh | ||