Skip to content

Commit b2fa241

Browse files
committed
fix: resolve macos tmpdir symlink in remote-access tests and regenerate 256px windows icon
1 parent e56294e commit b2fa241

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ services/local-voice/**/*.pyc
3030
.pi
3131
docs/AGENT-DO-NOT-READ.md
3232
.worktrees/
33-
33+
.crewcoder
3434
# Local license/file backups
3535
.backup/
3636
docs/releasing.md

‎build/icon.ico‎

15.9 KB
Binary file not shown.

‎src/main/remote-access-server.test.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
import { mkdtempSync, mkdirSync, readFileSync } from 'fs'
1+
import { mkdtempSync, mkdirSync, readFileSync, realpathSync } from 'fs'
22
import { join } from 'path'
3-
import { tmpdir } from 'os'
3+
import { tmpdir as osTmpdir } from 'os'
44
import { afterEach, describe, expect, it } from 'vitest'
55
import { CREWCODE_REMOTE_PROTOCOL_VERSION } from '../shared/remote-access-types'
66
import { startRemoteAccessServer, type RunningRemoteAccessServer } from './remote-access-server'
77
import WebSocket from 'ws'
88

9+
// The server realpaths every incoming path before checking it against the
10+
// allowed roots. On macOS os.tmpdir() is /var/folders/... which is a symlink to
11+
// /private/var/folders/..., so an unresolved root matches nothing and every
12+
// workspace call comes back 403 / "path escapes root". Resolve once, up front.
13+
const tmpdir = (): string => realpathSync.native(osTmpdir())
14+
915
let running: RunningRemoteAccessServer | null = null
1016
afterEach(async () => { await running?.close(); running = null })
1117

‎src/renderer/src/App.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2712,7 +2712,7 @@ export default function App() {
27122712
case 'start-crew': startCrewFromAnywhere(); return
27132713
case 'start-canvas': startCanvasFromAnywhere(); return
27142714
case 'updates': window.electronAPI?.updaterCheck?.(); return
2715-
case 'docs': window.electronAPI?.openExternal?.('https://crewcode-docs.cortex-ai.icu'); return
2715+
case 'docs': window.electronAPI?.openExternal?.('https://crewcode-docs.logixhub.icu'); return
27162716
}
27172717
}, [activeWs, tabs, setActiveTabId, handleNewTab, setPaletteOpen, setTweak, tweaks.showTerminal, startCanvasFromAnywhere, startCrewFromAnywhere])
27182718

0 commit comments

Comments
 (0)