You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a5fe254
Browse filesBrowse the repository at this point in the historyBrowse files
Hand over URLs reliably and keep dev data apart from the installed app
From review of the main process:
- The debugging port stays closed whenever the data folder is the default
one, also when CONSOLE_EDITOR_USER_DATA names it (links and relative
paths resolved), not only when the variable is unset.
- CONSOLE_EDITOR_USER_DATA may be relative; it used to crash at startup.
- A URL handed over by a second launch while the app is still starting
replaces the one it was about to open, instead of being overwritten by
it (new e2e test, which fails without the fix). On macOS, URLs sent to
the running app arrive as open-url and take the same path.
- Runs from source use a separate 'Console Editor (dev)' data folder, so
npm run dev works while an installed copy is open and never touches
its overrides or logins.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ npm run dev # the app, with hot reload
22
22
npm run demo-site # in another terminal: pages to try it on (port 5174)
23
23
```
24
24
25
-
Node.js 22.18 or newer is required. On Linux as root (containers), start Electron without its sandbox: `npm run dev -- --noSandbox`.
25
+
Node.js 22.18 or newer is required. Runs from source keep their data in a `Console Editor (dev)` folder, apart from an installed copy's, so both can run at once. On Linux as root (containers), start Electron without its sandbox: `npm run dev -- --noSandbox`.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ Type a URL in the preview's address bar (`https://…` or `localhost:3000`), pic
114
114
|`http://127.0.0.1:5174/`| Files built to be awkward: gzip, SRI, a hashed bundle, source maps |
115
115
|`http://127.0.0.1:5174/frames.html`| Cross-site and nested iframes |
116
116
117
-
To open a URL on start, pass it to the app (`console-editor https://example.com` after installing the Linux package) or set `CONSOLE_EDITOR_URL`: `CONSOLE_EDITOR_URL=https://example.com npm run dev`. Launching the app again while it runs opens the URL in the existing window.
117
+
To open a URL on start, pass it to the app (`console-editor https://example.com` after installing the Linux package) or set `CONSOLE_EDITOR_URL`: `CONSOLE_EDITOR_URL=https://example.com npm run dev`. On Linux and Windows, starting the app again with a URL opens it in the window that's already running.
118
118
119
119
<details>
120
120
<summary><b>Keyboard shortcuts</b></summary>
@@ -187,7 +187,7 @@ Everything stays on your machine: no telemetry, no uploads.
187
187
| Open tabs, unsaved drafts, last page |`session/`|
188
188
| The site's cookies, logins, storage | A persistent browser profile used only by the site view |
189
189
190
-
The data folder is `~/.config/Console Editor` on Linux, `~/Library/Application Support/Console Editor` on macOS and `%APPDATA%\Console Editor` on Windows. Uninstalling the app keeps it. Set `CONSOLE_EDITOR_USER_DATA` to use another one.
190
+
The data folder is `~/.config/Console Editor` on Linux, `~/Library/Application Support/Console Editor` on macOS and `%APPDATA%\Console Editor` on Windows. Uninstalling the app keeps it. Running from source uses a separate `Console Editor (dev)` folder next to it, so a dev build never touches your real data. Set `CONSOLE_EDITOR_USER_DATA` to use another folder.
Copy file name to clipboardExpand all lines: docs/SPEC.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,8 +245,8 @@ Auto-attach uses `filter: [{type: 'iframe'}, {exclude: true}]` on every session;
245
245
- A page's `beforeunload` guard cannot block reloads or navigation: editor-initiated reloads after a save must win, and Electron would cancel them without showing a dialog.
246
246
-**Trade-off:** Chromium's Local Network Access checks are disabled for the whole app (feature switches are process-wide), because documents served through `Fetch.fulfillRequest` have no address space and would otherwise be blocked from reaching localhost/intranet hosts (§6.5). Any page opened in the app can therefore reach local-network addresses, as in Chrome before these checks shipped. Browse only sites you are working on.
247
247
- Packaged builds flip Electron's fuses: `ELECTRON_RUN_AS_NODE`, `NODE_OPTIONS` and the `--inspect` switches are ignored, the app loads only from its `app.asar`, whose integrity is checked on macOS and Windows, and the site view's cookies are encrypted with the OS keystore (not yet on macOS: an ad-hoc signed app would be asked for the Keychain password after every update). `file://` keeps its extra privileges because the editor UI and its module workers load from it.
248
-
- Packaged builds drop `--remote-debugging-port`/`--remote-debugging-pipe`unless `CONSOLE_EDITOR_USER_DATA`points elsewhere, as Chrome does for its default profile: otherwise any local program could start the app with a port and read the site view's logins.
249
-
- One instance per data folder (`app.requestSingleInstanceLock`), so two processes never write the same overrides and session files. A second launch hands its URL to the running window and exits.
248
+
- Packaged builds drop `--remote-debugging-port`/`--remote-debugging-pipe`when the data folder is the default one (compared after resolving links, so pointing `CONSOLE_EDITOR_USER_DATA`at it doesn't count as another), as Chrome does for its default profile: otherwise any local program could start the app with a port and read the site view's logins.
249
+
- One instance per data folder (`app.requestSingleInstanceLock`), so two processes never write the same overrides and session files. A second launch hands its URL to the running window and exits; if the first is still starting, that URL replaces the one it was about to open. On macOS, where reopening the app starts no second process, URLs arrive as `open-url` and take the same path. Runs from source use a separate `… (dev)` data folder, so they never share one with an installed copy.
250
250
- IPC inputs are type-checked; matchers are validated before storage; settings are filtered to known boolean keys.
251
251
- The site sees a standard Chrome user agent (Electron tokens removed).
252
252
- All data stays local: nothing is uploaded, and there are no telemetry or network calls besides the page and out-of-page fetches for the files you open.
0 commit comments