Repository navigation
feat(code): a Developer-mode code workspace with preview, checks and tests - #1760
Merged
gregpriday merged 8 commits intoNov 28, 2026
Merged
gregpriday merged 8 commits into
gregpriday merged 8 commits into
Conversation
…de, its preview, checks and tests - Lists, reads and saves the project's own code files under src/, refusing links, other spellings, hidden and credential-named parts, and files the app writes; a save replaces only what was read - Frames the code component editor in one workspace with a file list, a passive preview, and checks - Compiles every Svelte file from the shared cache, and runs the project's declared npm test on Electron's Node, bounded, masked, stoppable with its whole process tree, ended before a close lets the lock go - Hands a file or the project folder to the editor chosen in Settings; a script on Windows is shown, never run; automated runs record the hand-off - Attributes a preview frame's load failure to its frame; measuring frames leave the canvas's retry marker - Makes an outside replacement of the editor's text its own undo step
…he compile cache to the files there are - Cmd/Ctrl+S on a removed component's code no longer reaches the old save - The Svelte check forgets compile outcomes of files no longer in the project
…-upgrade-the-in-app-code-workspace-with
…-upgrade-the-in-app-code-workspace-with # Conflicts: # src/renderer/src/store.ts
…, and swap a file the disk cannot renumber - Adds the code.workspace row for the Code workspace command - The save's identity check is tested with the read file moved aside, since a deleted file's inode can be reused on Linux
…-upgrade-the-in-app-code-workspace-with # Conflicts: # src/main/controller.ts
…-upgrade-the-in-app-code-workspace-with
# Conflicts: # src/main/index.ts # src/preload/index.ts
gregpriday
deleted the
feature/issue-1483-upgrade-the-in-app-code-workspace-with
branch
November 28, 2026 16:44
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.
Developer mode gets one code workspace for the project's code. It covers code components and the project's own files: helpers under
src/lib/, endpoints, loaders, hooks and pages of its own undersrc/routes/. Each file is edited beside a preview of what was last saved. The project's checks and tests run below it, and a file or the whole project hands off to the developer's own code editor.Resolves #1483
What changes
ComponentSourceEditor, extracted fromSourceModal). Without Developer mode, the dialog is only that component's editor, as before.src/main/project/code-files.ts,src/shared/code-workspace.ts) are every plain.svelte,.js,.ts,.cssor.jsonfile undersrc/that the app neither writes nor will write (ProjectSession.appWrites).node_modules, credential-named parts andsrc/lib/siteorigin/are refused.WorkspacePreview.tsx). A code component is shown on its own with its default content. Anything else shows the canvas's page, or any address of the site typed in. It loads again after each save, so a changed loader or hook runs again.index.ts), and the canvas acts only on its own. Measuring frames leave the canvas's route-retry marker alone (bridge.client.js).WorkspaceChecks.tsx):testscript the project's package.json declares, through the npm shipped with the app on Electron's Node (runtime/project-tests.ts). Anodeon the PATH points to that Node, so it works without Node installed. It runs only while the project's setup is still what was trusted and its tools are set up. Output is bounded and its secrets are masked; there is a five-minute deadline and Stop. The whole process tree is ended: its process group on macOS and Linux,taskkill /Ton Windows.external-editor.ts) hands the file, the component's file or the project's folder to Settings › Code editor. That is the system's default app, or an application chosen with the system's chooser and checked in the main process. A settings patch from the editor window can only set it back to the default. It starts with an argument list and never a shell. On Windows the system default would run a.jsfile, so a script is shown in File Explorer instead. In automated runs the hand-off is recorded (open-editorintent) and nothing starts.CodeEditorhighlights JavaScript, TypeScript, CSS and JSON (@codemirror/lang-cssis now declared; it was already installed). A replacement of its text from outside is now its own undo step, so Undo brings your edits back holds however soon after typing it comes.Testing
code-files,project-tests(real npm runs plus a Windows case with an injected spawn),code-workspace-controller,external-editor,external-editor-settings,code-workspace-browser.source-refused-browser,code-props-sync-browser,headless-desktop,measuring-frame,developer-mode-lock,command-menu-enter-browser,project-switch,read-only-controller,own-saves,session,runtime,compile-cache,pending-scroll,preview-journey, settings tests: all green.npm run typecheckgreen.tests/e2e/code.mjs, which needs a build, and the test runner on a real Windows machine. There, thenodethe script finds is anode.cmdbatch file, which a program that startsnodewithout a shell does not find, and a helper left running after npm exits is not ended (no Job Object).