File tree Expand file tree Collapse file tree 5 files changed +28
-7
lines changed
Expand file tree Collapse file tree 5 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -140,14 +140,14 @@ cursor-web [port] [cors-port]
140140cursor-web 8080 9080 # defaults
141141```
142142
143- Then open ` http://localhost:8080 ` in your browser . The full desktop workbench loads with all Cursor AI features:
143+ Then open the URL shown in the terminal (includes ` ?cors_port= ` parameter) . The full desktop workbench loads with all Cursor AI features:
144144- ** Composer** — multi-file AI editing
145145- ** Agent mode** — autonomous coding agent
146146- ** Chat** — AI chat panel
147147- ** CursorTab** — AI autocomplete
148148- ** Model selection** — choose between Claude, GPT-4, etc.
149149
150- Open a specific folder: ` http://localhost:8080/?folder=/path/to/project `
150+ Open a specific folder: ` http://localhost:8080/?cors_port=9080& folder=/path/to/project `
151151
152152Install as a PWA via your browser's "Install" menu for a native app experience.
153153
@@ -192,6 +192,8 @@ The patch script (`patch-cursor-web.sh`) applies these modifications to make the
192192| 7o. migrate_editor_mode | Disable Statsig gate that forces Agent mode on every load |
193193| 7p. Onboarding Ic() | Disable Agent mode force in onboarding callback |
194194| 7q. Onboarding render | Skip onboarding walkthrough entirely (forces Agent mode on completion) |
195+ | 7r. Sandbox notification | Suppress terminal sandbox AppArmor warning (no sandbox helper in serve-web) |
196+ | 7s. Update notification | Suppress "New update available" banner (auto-update N/A for serve-web/RPM) |
195197
196198### Server JS (` server-main.js ` )
197199| Patch | Description |
Original file line number Diff line number Diff line change @@ -153,8 +153,9 @@ d['extensionsGallery'] = {
153153# Disable telemetry
154154d['enableTelemetry'] = False
155155d['enabledTelemetryLevels'] = {'error': False, 'usage': False}
156- # Keep statsigClientKey — Statsig feature flags are needed for model loading
157- # d.pop('statsigClientKey', None)
156+ # Ensure statsigClientKey is present — Statsig feature flags are needed for model loading
157+ if 'statsigClientKey' not in d:
158+ d['statsigClientKey'] = 'client-Bm4HJ0aDjXHQVsoACMREyLNxm5p6zzuzhO50MgtoT5D'
158159d.pop('statsigLogEventProxyUrl', None) # Disable event logging proxy only
159160d.pop('crashReporterId', None)
160161d.pop('appInsightsConnectionString', None)
Original file line number Diff line number Diff line change 2121
2222echo " ==> Starting Cursor Web on port $PORT ..."
2323echo " CORS proxy on port $CORS_PORT "
24- echo " Open http://localhost:$PORT in your browser"
24+ echo " Open http://localhost:$PORT /?cors_port= $CORS_PORT in your browser"
2525echo " Install as PWA: Browser menu → Install Cursor..."
2626echo " "
2727
Original file line number Diff line number Diff line change @@ -444,6 +444,24 @@ if old in js:
444444elif new in js and 'sC_' in js:
445445 print(' sC_ onboarding already patched')
446446
447+ # 7r. Suppress terminal sandbox AppArmor notification (always fires on Linux >= 6.2 without sandbox helper)
448+ old = '!this._rawSandboxSupported&&e?.linuxKernelVersion?this._showSandboxUnsupportedNotification(e.linuxKernelVersion)'
449+ new = '!this._rawSandboxSupported&&e?.linuxKernelVersion?void 0'
450+ if old in js:
451+ js = js.replace(old, new, 1)
452+ changed = True
453+ print(' sandbox AppArmor notification suppressed')
454+ elif new in js:
455+ print(' sandbox notification already suppressed')
456+
457+ # 7s. Suppress "New update available" notification (auto-update not applicable for serve-web/RPM)
458+ old = 'minor-version-notification-text>New update available'
459+ new = 'minor-version-notification-text>New update available" style="display:none'
460+ if old in js and 'style="display:none' not in js[js.find(old):js.find(old)+200] if old in js else True:
461+ js = js.replace(old, new, 1)
462+ changed = True
463+ print(' update notification suppressed')
464+
447465if changed:
448466 open(f, 'w').write(js)
449467PATCH_DESKTOP_EOF
Original file line number Diff line number Diff line change 88// Intercept and route through local proxy.
99{
1010 const _originalFetch = window . fetch ;
11- const PROXY_PORT = 9080 ;
11+ const PROXY_PORT = parseInt ( new URLSearchParams ( window . location . search ) . get ( 'cors_port' ) || ' 9080' , 10 ) ;
1212 // Match Cursor API endpoints + Statsig feature flag domains (CORS-blocked in browser)
1313 const _cursorApiRe = / h t t p s ? : \/ \/ (?: [ a - z 0 - 9 - ] * \. ? (?: a p i [ 2 - 5 ] \. c u r s o r \. s h ) | a p i \. s t a t s i g c d n \. c o m | f e a t u r e a s s e t s \. o r g | p r o d r e g i s t r y v 2 \. o r g | s t a t s i g a p i \. n e t ) / ;
1414 // Rewrite vscode-remote:// URLs to local HTTP resource endpoint
@@ -689,7 +689,7 @@ async function seedAuthTokens() {
689689 }
690690 // One-time layout reset: undo damage from migrate_editor_mode migration
691691 // (now disabled via workbench patch 7o) and prevent onboarding from forcing Agent mode.
692- const _layoutFixVersion = '7 ' ;
692+ const _layoutFixVersion = '8 ' ;
693693 const _layoutFixKey = _storagePrefix + 'cursorWeb/layoutFixApplied' ;
694694 if ( localStorage . getItem ( _layoutFixKey ) !== _layoutFixVersion ) {
695695 // Reset Agent mode hidden flags
You can’t perform that action at this time.
0 commit comments