Make Terminal a native feature

- Move the Terminal plugin into src/lib/features/terminal/ on the host Svelte runtime, with xterm 6.0.0 and addon-fit 0.11.0.
- Buttons, shortcuts, Help rows, and the close guard follow the Terminal switch. The first use loads the module.
- Add Settings → Terminal and the terminal settings section. The first start copies the old runestone.terminal key.
- The 16 ANSI colors come from the --rs-ansi-* tokens.
- Off asks first when a shell runs in any window (pty_running).
- Rust: no pty-data or pty-exit events, an owner check for write, resize, and close, output joined up to 64 KiB or 8 ms, and the sessions of a reloaded page close.
- Remove api.pty, the terminal contribution, TerminalSlot, and the plugin loader of the smoke harness.
- Check only the tested switches in the Background smoke test.
- Update the tests, the menu inventory, the docs, and UI-058.
This commit is contained in:
Knotty Wyvern
2026-10-29 19:02:58 -07:00
parent 53b9cea7f0
commit 833f793244
78 changed files with 2971 additions and 659 deletions
+17
View File
@@ -591,6 +591,7 @@ The overlay retains the source hue. Selected glyph backgrounds stay transparent,
Evidence: RuneStone_Terminal/.audit/terminal-selection-evidence.json records source colors, alpha, composites, and contrast.
Screenshots cover both themes at 620 and 1440 pixels. Measured text contrast is 8.94:1 in dark and 11.80:1 in light.
Native shell, background image, and desktop acceptance remain open.
Update 2026-10-29: The native Terminal feature keeps the 65% cap on `--rs-selection` ([UI-058](#ui-058--settings--terminal-and-theme-colors-in-the-terminal)).
### UI-030 — Settings installation checkbox theme drift
@@ -813,6 +814,7 @@ Native shell, background image, and desktop acceptance remain open.
- Evidence: The applied colors and the Source colors of each tag group are the same as before stage 5a-1, for every built-in theme and a saved schema 2 custom theme. `tests/unit/theme/customThemes.spec.ts` covers schema 3, `base`, and the conversion of old syntax names.
- Replaces / replaced by: The template format of [UI-028](#ui-028--adjustable-surface-transparency-and-fixed-custom-palettes). Its transparency rule remains.
- Limits: Browser checks use desktop service mocks. Native desktop acceptance remains open.
- Update 2026-10-29: The native Terminal feature uses the terminal roles ([UI-058](#ui-058--settings--terminal-and-theme-colors-in-the-terminal)).
### UI-043 — Opaque menus
@@ -1059,3 +1061,18 @@ Native shell, background image, and desktop acceptance remain open.
- Evidence: `tests/smoke/features/background.smoke.mjs` and the updated `tests/smoke/appearance/background*.smoke.mjs`, with screenshots in both themes and at 360 pixels in `output/smoke/features/background/`.
- Replaces / replaced by: The Background image section of Appearance and the Background Slideshow plugin. The rules of [UI-015](#ui-015--slower-slideshow-fades) and [UI-020](#ui-020--per-image-slideshow-layout) stay.
- Limits: Each window has its own timer, so windows can show different images. The settings window runs no slideshow. The old package stays installed until the user removes it.
### UI-058 — Settings → Terminal and theme colors in the terminal
- Type: Rule change
- Date: 2026-10-29
- Status: Implemented for user review
- Decision source: The owner decisions of Phase 7, stage 7-3 (2026-10-29), and decision 5C. The card "Use the host terminal colors".
- Previous rule: The Terminal plugin (`runestone.terminal` 0.1.11) kept its settings in a modal dialog with **Save settings** and **Cancel**. It saved them in the `runestone.terminal` key of `localStorage`. Its ANSI colors came from the status and accent tokens. Thus blue was the accent color, and most bright colors were the same as the normal colors.
- New rule: Terminal is a native feature with a switch in Settings → Features. **Settings → Terminal** shows only while Terminal is on. It has **Default profile** (a shared action menu without the JavaScript Debug Terminal), **Font size**, **Scrollback lines**, and **Blink cursor**. Each change saves at once to the `terminal` section of `settings.json`. Open terminals take the font, the scrollback, and the cursor. **Terminal settings** in the profile menu opens Settings. The 16 ANSI colors come from the `--rs-ansi-*` tokens. Text is `--rs-text`, the cursor is `--rs-accent` on `--rs-bg`, and the selection is `--rs-selection` with at most 65% alpha. Off asks first when a window runs a shell, with the words of the close guard.
- Reason: The owner chose response time and memory over the plugin API. Settings apply at once on one Settings page, as the [Settings](ui-design.md#settings) rules require. Terminal colors keep their ANSI meaning in every theme.
- Scope: Settings → Terminal, Settings → Features, the terminal panel, terminal windows, and Help.
- Shared implementation: `src/lib/features/terminal/` (`theme.ts` for the colors), `src/lib/features/TerminalSettings.svelte`, `src/lib/features/terminalSettings.ts`, `src/lib/features/terminalKeys.ts`, `src/lib/theme/roles.ts`, and `src-tauri/src/pty.rs`.
- Evidence: `tests/smoke/features/terminal.smoke.mjs` and `tests/unit/features/terminal.spec.ts`, with screenshots in both themes and at 360 pixels in `output/smoke/features/terminal/`.
- Replaces / replaced by: The settings dialog and the ANSI color map of the Terminal plugin. The terminal roles of [UI-042](#ui-042--theme-file-format-3-and-terminal-colors) and the selection cap of [UI-029](#ui-029--text-selection-transparency) stay.
- Limits: The smoke tests use mock shells. Real shells, dictation, and native desktop appearance need user review. The old package stays installed until the user removes it.
+14 -10
View File
@@ -64,7 +64,7 @@ Windows is the primary platform. macOS and Linux builds are experimental.
| `plugin_sources.rs` | Plugin downloads from Gitea releases |
| `git.rs` | The Git service of the Git feature. It runs the `git` program. |
| `features.rs` | Reads the old plugin packages of the native features one time, for the first-start migration. It changes no plugin file. |
| `pty.rs`, `terminal_platform.rs` | Pseudo-terminals for the Terminal plugin |
| `pty.rs`, `terminal_platform.rs` | The shell sessions of the Terminal feature, the shell search, and terminal windows. A session belongs to the window and the page that opened it. |
| `browser.rs` | The process of the built-in browser engine |
| `backgrounds.rs` | The image folder of the Background feature: the folder dialog, the kept folder (`background-folder.json` in the app data folder), the image list and reads, the sidecar file, and the folder migration from the Background Slideshow plugin |
| `spelling.rs` | Spelling suggestions from the operating system (Windows) |
@@ -88,7 +88,7 @@ A new command needs an entry in `generate_handler!` in `lib.rs`, in the command
| `settings/` | The settings store (`store.ts`), and the code that moves the old browser values to the settings file (`migration.ts`) |
| `plugins/` | The plugin runtime, the host types (`sdk.ts`, which also exports the SDK types), and Settings → Plug-ins |
| `browser/` | The interface of the built-in browser |
| `features/` | The native features with an off switch: the catalog (`catalog.ts`), the switches (`state.ts`), the first-start migration, the loader, the launch rules, the Background settings (`backgroundSettings.ts`), and one folder for each feature (`git/`, `background/`). See [Native features](#native-features). |
| `features/` | The native features with an off switch: the catalog (`catalog.ts`), the switches (`state.ts`), the first-start migration, the loader, the launch rules, the Background settings (`backgroundSettings.ts`), and one folder for each feature (`git/`, `background/`, `terminal/`). The main-bundle files of Terminal are `terminalKeys.ts`, `terminalSettings.ts`, `terminalHost.ts`, `TerminalHost.svelte`, and `TerminalSettings.svelte`. See [Native features](#native-features). |
| `completion/` | Contracts and services that plugins use |
| `git/` | The Git service and its types, for the Git feature and the line history in the status bar |
| `theme/` | Appearance settings, palettes, and the theme tokens (`tokens.css`) |
@@ -116,7 +116,7 @@ A new command needs an entry in `generate_handler!` in `lib.rs`, in the command
| Documents | Ordinary files in the workspace folder |
| Workspace state: tab order, pins, bookmarks, templates, Project Management boards | `.runestone/` in the workspace |
| Installed plugins and their settings | The app data folder. See [plugin storage](plugin-host.md#storage-and-recovery). |
| Preferences: general settings, appearance, custom themes, display language, feature switches, Background | `settings.json` in the app config folder |
| Preferences: general settings, appearance, custom themes, display language, feature switches, Background, Terminal | `settings.json` in the app config folder |
| The image folder of Background | `background-folder.json` in the app data folder. The image of the image source stays in the WebView storage (IndexedDB). |
| Browser profiles, bookmarks, history, browser settings, and Chromium caches | `browser/` in the local app data folder. On Windows, this is `%LOCALAPPDATA%\com.runestone.app\browser\`. See [Built-in browser runtime](#built-in-browser-runtime). |
| Window layout and the open tabs of each workspace | The WebView storage (`localStorage`) of the app. RuneStone can lose these values without harm. |
@@ -136,14 +136,15 @@ On macOS, it is `~/Library/Application Support/<identifier>/`. On Linux, it is `
"customThemes": [],
"customThemesLegacy": [],
"language": "en",
"features": { "git": true, "background": true },
"background": { "source": "folder", "seconds": 60, "order": "name", "paused": false, "targets": ["app"], "overlay": 0, "position": "center", "size": "cover" }
"features": { "git": true, "background": true, "terminal": true },
"background": { "source": "folder", "seconds": 60, "order": "name", "paused": false, "targets": ["app"], "overlay": 0, "position": "center", "size": "cover" },
"terminal": { "defaultProfile": "", "fontSize": 13, "scrollback": 10000, "cursorBlink": true }
}
```
| Rule | Detail |
| --- | --- |
| Sections | `general`, `appearance`, `customThemes`, `customThemesLegacy` (the original version 1 themes), `language`, `features` (the switches of the native features), and `background` (the source, the timing, the targets, and the folder layout of Background). The host does not interpret their values. The frontend normalizes each section. |
| Sections | `general`, `appearance`, `customThemes`, `customThemesLegacy` (the original version 1 themes), `language`, `features` (the switches of the native features), `background` (the source, the timing, the targets, and the folder layout of Background), and `terminal` (the default profile, the font size, the scrollback, and the cursor of Terminal). The host does not interpret their values. The frontend normalizes each section. |
| Size | At most 8 MiB in total. The appearance can hold an image data URL of up to 3,000,000 characters. |
| Writes | `settings_write` replaces one section. The host writes a complete temporary file and renames it. Then it sends `settings-changed` to all windows with the section, the revision, and the value. |
| Damaged file | The host moves the file to `settings.corrupt-<seconds>.json` and writes a new file with the defaults. The first window that reads the settings shows a message one time. |
@@ -208,7 +209,7 @@ Errors of the plugin API stay in English, because they are for plugin developers
## Native features
Git and Background are native features: host code with an off switch in **Settings → Features**. They do not use the plugin API.
Git, Background, and Terminal are native features: host code with an off switch in **Settings → Features**. They do not use the plugin API.
| Part | File |
| --- | --- |
@@ -224,6 +225,10 @@ Git and Background are native features: host code with an off switch in **Settin
- A command without a view loads the feature and calls `FeatureInstance.run`. A launch rule starts the instance at once when it wants it, and again after each change of its settings.
- Background has a launch rule: it loads when the `background` section selects a folder, or an image that exists. Its settings section and its "has a source" test are in `src/lib/features/backgroundSettings.ts`, in the main bundle. It also runs in browser windows. In the settings window, only its settings component loads (`mountSettings`).
- The first start makes the `background` section from the kept settings of the Background Slideshow plugin and from the old background image. `background_migrate` copies the folder of the old plugin grant to the host only when the host has no folder.
- Terminal has no view and no launch rule. `TerminalHost.svelte` puts the panel in the workbench and in the terminal window, and the first use loads the module. `terminalKeys.ts` holds the shortcuts and the Help rows. Settings → Terminal (`TerminalSettings.svelte`) loads no xterm.
- `@xterm/xterm` and `@xterm/addon-fit` are host dependencies. `pnpm check:features` keeps them out of the start chunks.
- The first start makes the `terminal` section from the `runestone.terminal` key of `localStorage`, which the Terminal plugin wrote. The old key stays.
- Before Terminal goes off, Settings asks `pty_running` for the shells of all windows. Off closes the sessions of each window.
- Host code never imports a feature folder statically. `pnpm check:features` builds the app. It fails when a feature module, or a library that only a feature needs, is in a chunk that loads at start.
- Saved tabs and tab transfers keep the ID of the old plugin package as the owner ID, for example `runestone.git`. `builtInPackages` in `external.ts` lists the old package, so it never loads.
- Off stops the feature at once in each window and closes its views. The loaded module stays in memory until the window reloads.
@@ -270,7 +275,6 @@ A test states what it needs near its top. The runner skips the test, with the re
| Line | Requirement |
| --- | --- |
| `// @requires plugin:terminal` | The compiled Terminal plugin |
| `// @requires repo:RuneStone_Local_Autocomplete/src` | A file or folder in a sibling plugin checkout |
| `// @requires electron` | The browser engine dependencies. Run `npm ci --prefix browser-runtime`. |
| `// @known-issue <defect>` | The test fails because of a known app defect. The run reports it as `known`. If the test passes, the run fails, so that someone removes the line. |
@@ -279,14 +283,14 @@ A test states what it needs near its top. The runner skips the test, with the re
| --- | --- |
| `SMOKE_URL` | The frontend address. The default is `http://127.0.0.1:1420`. When the runner starts Vite, it uses the port of this address, so two checkouts can run tests at the same time. |
| `RUNESTONE_PLUGIN_REPOS` | The folder of the sibling plugin checkouts. The default is the parent folder of this repository. |
| `RUNESTONE_TERMINAL_DIST` | The compiled Terminal plugin. The default is `RuneStone_Terminal/dist` in that folder. |
| `RUNESTONE_CSP` | `1` sends and checks the content security policy. `--csp` sets it. |
| `CHROME_PATH` | A Chromium browser for Playwright |
| `PLAYWRIGHT_MODULE` | A different Playwright package |
To write a smoke test, start from an existing test in the same area. The harness in `tests/smoke/_harness/index.mjs` starts the browser, mocks the Tauri commands, and gives an in-memory workspace.
The harness also has default handlers for the settings file and for tab transfers. All pages of one browser context share them.
The harness also has default handlers for the settings file, for tab transfers, and for the `pty_*` shells of Terminal. All pages of one browser context share them.
The mock shell sends its output through the channel of `pty_open`. To send more, use `window.__TEST__.pty.output(id, text)` and `window.__TEST__.pty.exit(id, code)`.
To seed preferences, set the old `localStorage` keys before the first load. The app then migrates them.
To read or change a section later, use `window.__TEST__.settings(section)` and `window.__TEST__.writeSettings(section, value)`.
A failed test saves `failure.png` in its output folder and prints the page console errors and warnings.
+47 -20
View File
@@ -1,29 +1,30 @@
# Terminal guide
[RuneStone](../../README.md) · [User guide](../user-guide.md) · [Install a plugin](../plugins.md#install-a-plugin)
[RuneStone](../../README.md) · [User guide](../user-guide.md)
This guide explains how to use shells, scripts, and workspace tasks with the optional Terminal plugin.
This guide explains how to use shells, scripts, and workspace tasks in the terminal of RuneStone.
Install and enable the Terminal plugin first. The shells and script runtimes that you use must be installed on your computer.
Terminal is part of RuneStone and is on by default. The shells and script runtimes that you use must be installed on your computer. To turn Terminal off, see [Turn Terminal off](#turn-terminal-off).
## Open and arrange terminals
| Action | How |
| --- | --- |
| Show or hide the terminal panel | Ctrl+` or Ctrl+J. Sessions and scrollback stay. |
| Show or hide the terminal panel | **Terminal** in the left ribbon, Ctrl+`, or Ctrl+J. Sessions and scrollback stay. |
| New terminal | Ctrl+Shift+` or the + button |
| Split the active terminal | Ctrl+Shift+5. The new pane uses the same folder and profile. |
| New terminal window | Ctrl+Shift+Alt+` |
| Split the active terminal | Ctrl+Shift+5 or **Split terminal**. The new pane uses the same folder and profile. |
| New terminal window | Ctrl+Shift+Alt+`, or **New terminal window** in the profile menu |
| End the active session | **Kill terminal**, or Delete while an entry in the terminal list has focus |
| Change the panel size | **Maximize panel** or **Restore panel**. Shells do not restart. |
| End all sessions in the panel | **Close terminal (end all sessions)** |
The terminal list shows only when more than one session is open.
Closing a separate terminal window ends its sessions.
Closing a terminal window ends its sessions. When you close a workspace window with running sessions, RuneStone asks first.
You can type before a shell starts. RuneStone sends the text when the shell is ready.
## Choose a shell
Open the menu beside the + button to start a terminal with a specific profile.
Open **Terminal profiles and tasks** (the arrow beside the + button) to start a terminal with a specific profile.
| System | Profiles |
| --- | --- |
@@ -31,10 +32,26 @@ Open the menu beside the + button to start a terminal with a specific profile.
| macOS and Linux | Bash and PowerShell |
The menu shows only the shells that RuneStone finds on your computer.
The same menu has **Split Terminal with Profile**, **Select Default Profile**, **Configure Terminal Settings**, and the task commands.
Terminal settings set the font size, scrollback lines, cursor blink, and default profile. RuneStone keeps them on this computer.
The same menu has **Split terminal with profile**, **Terminal settings**, **Select the default profile**, and the task commands.
New terminals get the RuneStone environment, including `PATH`.
## Change the terminal settings
Open **Settings → Terminal**, or choose **Terminal settings** in the profile menu. The page shows only while Terminal is on.
| Setting | Values |
| --- | --- |
| **Default profile** | The shell of a new terminal. The JavaScript Debug Terminal is not a choice. |
| **Font size** | 9 to 28 pixels. The default is 13. |
| **Scrollback lines** | 100 to 100,000 lines. The default is 10,000. |
| **Blink cursor** | The cursor blinks in the focused terminal. On by default. |
A change saves at once and applies to all windows. Open terminals take the new font size, scrollback, and cursor. The default profile applies to new terminals.
After an update, the first start copies the settings of the old Terminal plugin.
The terminal colors come from the color theme. The text, the cursor, and the selection use the theme colors. The 16 ANSI colors use the `ansi-*` keys of the theme.
To change them, see [Edit a theme](themes.md#edit-a-theme) and [Color keys](themes.md#color-keys).
## Copy and paste
- Drag across terminal text to select it.
@@ -48,24 +65,25 @@ Open **More terminal actions** for these commands:
| Command | Result |
| --- | --- |
| **Run Active File** | Saves and runs the active file in the terminal. |
| **Run Selected Text** | Sends the text that is selected in the editor to the terminal. |
| **Clear Terminal** | Clears the scrollback. |
| **Run Recent Command…** (Ctrl+Alt+R) | Runs a command from this session again. |
| **Go to Recent Directory…** (Ctrl+G) | Changes to a recent folder. |
| **Scroll to Previous Command** / **Next Command** (Ctrl+Up / Ctrl+Down) | Moves between command prompts. |
| **Scroll to the previous command** / **Scroll to the next command** (Ctrl+Up / Ctrl+Down) | Moves between command prompts. |
| **Clear the terminal** | Clears the scrollback. |
| **Run the active file** | Saves and runs the active file in the terminal. |
| **Run selected text** | Sends the text that is selected in the editor to the terminal. |
| **Start dictation** | Starts Windows voice typing. See [Debug JavaScript and use dictation](#debug-javascript-and-use-dictation). |
| **Go to a recent folder…** (Ctrl+G) | Changes to a recent folder. |
| **Run a recent command…** (Ctrl+Alt+R) | Runs a command from this session again. |
**Run Active File** supports Python, JavaScript, PowerShell, Bash, Ruby, Windows batch files, and executables.
**Run the active file** supports Python, JavaScript, PowerShell, Bash, Ruby, Windows batch files, and executables.
The terminal keeps command history in memory only. PowerShell and Bash record a command after it finishes. Command Prompt records the text that you submit.
## Configure workspace tasks
A task is a named command that you can start from a menu.
1. Choose **Configure Tasks…**. RuneStone creates or opens `.runestone/tasks.json`.
1. Choose **Configure tasks…**. RuneStone creates or opens `.runestone/tasks.json`.
2. Add an object to the `tasks` array with `label` and `command`.
3. Optionally, add `profile` with one of these IDs: `powershell`, `pwsh`, `git-bash`, `cmd`, or `bash`.
4. Choose **Run Task…** and select the task.
4. Choose **Run a task…** and select the task.
Example (`.runestone/tasks.json`):
@@ -84,5 +102,14 @@ Each task runs in its own terminal at the workspace root. Tasks run only when yo
**JavaScript Debug Terminal** in the profile menu starts a Node.js REPL with a local inspector on a free port.
Attach an external debugger to the address that the terminal shows. RuneStone does not include a debugger.
**Start Dictation** starts Windows voice typing (Win+H) in the focused terminal. Set up the microphone and voice typing in Windows first.
**Start dictation** starts Windows voice typing (Win+H) in the focused terminal. Set up the microphone and voice typing in Windows first.
On other systems, use the dictation shortcut of the operating system.
## Turn Terminal off
1. Open **Settings → Features**.
2. Clear **Terminal**.
3. If a window runs a shell, RuneStone asks "Terminal sessions will end. Turn off Terminal?". Confirm to continue.
Off ends the terminal sessions of every window. The Terminal buttons, shortcuts, and Help rows do not show. A terminal window shows "Terminal is off. Turn it on in Settings → Features."
Your terminal settings and `.runestone/tasks.json` stay. Turn Terminal on again in the same place.
+2 -2
View File
@@ -70,10 +70,10 @@ Voice typing is not part of the Linux checks.
| Editors | Edit Markdown, source code, tables, images, and diagrams. Check undo, keyboard shortcuts, and both themes. |
| Clipboard and dialogs | Copy and paste text, tables, and images. Check folder selection, external links, and file reveal. |
| Plugins | Install plugin ZIPs through Settings, enable them, restart, disable them, and remove them. Check that plugin data stays. |
| Terminal plugin | Install the Terminal ZIP. Bash starts in the workspace, accepts Unicode, resizes, and exits when its session closes. |
| Terminal | Open the terminal panel. Bash starts in the workspace, accepts Unicode, resizes, and exits when its session closes. |
| Settings | Change preferences, restart, and make sure that they stay. Check separate workspace windows. |
For the Terminal ZIP, see [Build examples](plugin-development.md#build-examples) and the [plugin installation guide](plugins.md).
For the use of Terminal, see the [Terminal guide](guides/terminal.md).
Check terminal profiles after a desktop launch too. A desktop launcher can have a different `PATH` from an interactive shell.
Known Linux limits:
+23 -24
View File
@@ -3,7 +3,6 @@
"scope": [
"RuneStone",
"RuneStone_Project_Management",
"RuneStone_Terminal",
"RuneStone_Background_Slideshow",
"RuneStone_Local_Autocomplete",
"RuneStone_PDF_Viewer",
@@ -241,29 +240,6 @@
"design": "Shared choice adapter; native selects hidden on current host, older-host fallback retained",
"check": "RuneStone_Project_Management/tests/menu-audit.spec.ts; tests/shared-menu.spec.ts; tests/relations-menu.spec.ts; tests/list-limits.spec.ts; tests/all-tasks.spec.ts; tests/card-board-details.spec.ts"
},
"RuneStone_Terminal/src/TerminalDock.svelte": {
"counts": {
"action": 1
},
"design": "Synchronized shared action menu snapshot",
"check": "RuneStone_Terminal/scripts/terminal.smoke.mjs"
},
"RuneStone_Terminal/src/TerminalPicker.svelte": {
"counts": {
"picker": 2,
"localPopup": 3
},
"design": "Shared searchable picker",
"check": "RuneStone_Terminal/scripts/terminal.smoke.mjs"
},
"RuneStone_Terminal/src/TerminalSettings.svelte": {
"counts": {
"action": 1,
"localPopup": 1
},
"design": "Synchronized shared action menu snapshot",
"check": "RuneStone_Terminal/scripts/terminal.smoke.mjs"
},
"RuneStone_Background_Slideshow/src/contracts.ts": {
"counts": {
"action": 1
@@ -336,6 +312,29 @@
},
"design": "Shared action menu for the fit and the position of one image. The image list is the shared searchable picker (rs-picker).",
"check": "tests/smoke/features/background.smoke.mjs"
},
"RuneStone/src/lib/features/terminal/TerminalDock.svelte": {
"counts": {
"action": 1
},
"design": "Shared action menu through showActionMenu",
"check": "tests/smoke/features/terminal.smoke.mjs"
},
"RuneStone/src/lib/features/terminal/TerminalPicker.svelte": {
"counts": {
"picker": 2,
"localPopup": 3
},
"design": "Shared searchable picker",
"check": "tests/smoke/features/terminal.smoke.mjs"
},
"RuneStone/src/lib/features/TerminalSettings.svelte": {
"counts": {
"action": 1,
"localPopup": 1
},
"design": "Shared action menu for the default profile in Settings → Terminal",
"check": "tests/smoke/features/terminal.smoke.mjs"
}
}
}
+14 -52
View File
@@ -11,7 +11,6 @@ This reference gives the package contract, the build procedure, and the API for
- [Versions and releases](#versions-and-releases)
- [Plugin API](#plugin-api)
- [Use the SDK instead of native calls](#use-the-sdk-instead-of-native-calls)
- [Terminal API](#terminal-api)
- [Folder grants](#folder-grants)
- [Plugin services](#plugin-services)
- [Background API](#background-api)
@@ -146,22 +145,21 @@ In user instructions, do not tell users to load JSON, select a build folder, ren
Each example is specific to one plugin. Read the package scripts of a plugin before you build it.
For the RuneStone source setup, see [Run from source](development.md#run-from-source).
### Example: Terminal
### Example: CSV Viewer
Source: [Terminal repository](https://git.knottywyvern.com/kwyvern/RuneStone_Terminal), its `package.json`, and its `scripts/build.mjs`.
Source: [CSV Viewer repository](https://git.knottywyvern.com/kwyvern/RuneStone_CSV_Viewer), its `package.json`, `plugin.json`, `scripts/build.mjs`, and `README.md`.
| Item | Value |
| --- | --- |
| Prerequisites | Node.js 24 and pnpm 10. Run `pnpm install --frozen-lockfile` in the Terminal folder. |
| Working folder | The Terminal repository root |
| Prerequisites | Node.js 24 or later and pnpm. Run `pnpm install --frozen-lockfile` in the CSV Viewer folder. Put the RuneStone source checkout beside it, in a folder with the name `RuneStone`. The source imports shared interface files from `../../RuneStone/src/lib/ui/`. |
| Working folder | The CSV Viewer repository root |
| Command | `pnpm build` |
| Output | `releases/runestone.terminal-<version>.zip` in the Terminal folder |
| Output | `releases/runestone.csv-viewer-<version>.zip` in the CSV Viewer folder. `<version>` is the `version` of `plugin.json`, for example `0.1.3`. |
The build compiles the Svelte interface and its dependencies into `dist/` (`main.js`, `style.css`, `plugin.json`, and `README.md`). Then it makes the ZIP.
The build stops when the versions in `package.json` and `plugin.json` are different.
To compile into `dist/` without a ZIP, run `node scripts/build.mjs --no-package`.
RuneStone supplies the native terminal sessions. The plugin supplies the interface, shortcuts, and session controls.
For use of the terminal, see the [Terminal guide](guides/terminal.md).
The build compiles `src/index.js` with esbuild into a readable `dist/main.js`. It copies `plugin.json` and `README.md` into `dist/` and writes `dist/build.json`.
Then it runs `scripts/packagePlugin.mjs` of the RuneStone checkout on `dist/`. Set `RUNESTONE_ROOT` to use another RuneStone checkout for this step.
The build stops when the versions in `package.json` and `plugin.json` are different. It also stops when the release ZIP of the version exists. Set the next version in both files first.
To compile into `dist/` without a ZIP, run `pnpm compile`.
### Example: Workspace overview
@@ -216,8 +214,8 @@ The SDK feature checks do this. Their error names each missing feature and tells
```ts
import { hasFeature, requireFeature, requireFeatures } from "@runestone/plugin-sdk";
requireFeatures(api, ["pty", "workspace.readBytes"]);
const pty = requireFeature(api, "pty");
requireFeatures(api, ["files", "workspace.readBytes"]);
const files = requireFeature(api, "files");
if (hasFeature(api, "settings.subscribe")) watchSettings();
```
@@ -264,7 +262,6 @@ Older hosts ignore unknown fields in objects that you pass to the host, such as
| `assets.read(path)` | | Read a package file as a `Uint8Array`. |
| `ui.showActionMenu(options)` | yes | Open the shared RuneStone action menu. See [Menus](#menus). |
| `completion` | yes | Autocomplete fields and providers. See the [completion API](completion.md). |
| `pty` | yes | Terminal sessions. See [Terminal API](#terminal-api). |
| `files` | yes | Folders outside the workspace that the user granted to the plugin. See [Folder grants](#folder-grants). |
| `services` | yes | Data that one plugin offers to other plugins. See [Plugin services](#plugin-services). |
| `backgrounds` | yes | Background image frames. See [Background API](#background-api). |
@@ -385,10 +382,9 @@ Only one enabled plugin can own each key. The host removes contributions before
| Key | Purpose | Owner |
| --- | --- | --- |
| `terminal` | Mounts terminal controls in a host element. Returns update, command, and dispose functions. | Terminal plugin |
| `browser` | The built-in browser. `newTab(url?)` opens a browser tab. `open(url)` returns false when the system browser must open a web link, for example before the engine is installed. | RuneStone |
A terminal contribution must stop its controls and native sessions before its cleanup finishes.
Earlier hosts also had `api.pty` and a `terminal` key for the Terminal plugin. They are gone, because RuneStone now includes Terminal as a native feature.
### Theme tokens
@@ -423,46 +419,12 @@ The window sends a `runestone-theme-changed` event after each theme change. A pl
## Use the SDK instead of native calls
Do not call `invoke`, `listen`, or other `@tauri-apps/api` functions from a plugin. Do not read the private files of other plugins.
Use the `api` members below. They check plugin shutdown, and they will stay available when a later host runs each plugin in its own isolated context.
Make sure that an optional member exists before you use it. Keep the native call only as a fallback for older hosts.
Use the `api` members of the [API reference](#api-reference). They check plugin shutdown, and they will stay available when a later host runs each plugin in its own isolated context.
Make sure that an optional member exists before you use it.
The host still accepts the native calls of released plugins. A later host can remove them.
| Plugin | Current call | Purpose | Use instead |
| --- | --- | --- | --- |
| Terminal | `invoke("pty_open")`, `listen("pty-data")`, `listen("pty-exit")` | Start a shell and receive its output and exit code | `api.pty.open({ ..., onData, onExit })` |
| Terminal | `invoke("pty_write")`, `invoke("pty_resize")`, `invoke("pty_close")` | Send input, change the size, stop the shell | `write`, `resize`, and `close` of the session from `api.pty.open` |
| Terminal | `invoke("pty_profiles")` | List the installed shells | `api.pty.profiles()` |
| Terminal | `invoke("pty_new_window")` | Open a terminal window | `api.pty.openWindow()` |
| Terminal | `invoke("pty_dictation")` | Start Windows voice typing | `api.pty.dictation()` |
| Terminal | `invoke("workspace_read", { rel: ".runestone/tasks.json" })` | Read the task list of the workspace | `api.workspace.read(path)` |
The Project Management, Local Autocomplete, PDF Viewer, and CSV Viewer plugins make no native calls.
Their test scripts replace `window.__TAURI_INTERNALS__` with a test double. That is test code and does not go into the package.
## Terminal API
`api.pty` (`version: 1`) starts shells in pseudo terminals. The SDK types are `PtyApi` and `PtySession`.
| Member | Contract |
| --- | --- |
| `profiles()` | Returns the installed shells as `{ id, title, kind }`. |
| `open(options)` | Starts a shell and returns a session. See the options below. |
| `openWindow()` | Opens a terminal window for the workspace of the current window. |
| `dictation()` | Starts Windows voice typing. Focus the terminal first. Fails on other systems. |
| Option | Rule |
| --- | --- |
| `cwd` | Required. The workspace root of the window. The start fails when the workspace changed. |
| `cols`, `rows` | Required. Positive integers. |
| `profile` | A profile `id` from `profiles()`. Without it, the host uses the first installed shell. |
| `directory` | A start folder other than the workspace root. |
| `onData(data)` | Required. Receives the output as a `Uint8Array`. A UTF-8 character can be split between two calls. |
| `onExit(code)` | Receives the exit code, or `null`. |
A session has `id`, `write(text)`, `resize(cols, rows)`, and `close()`. `close()` stops the shell, and more calls return the same promise.
Output goes only to the session that started the shell, as raw bytes.
When the plugin stops, the host stops the output, runs the plugin cleanup, and then closes the sessions that are still open.
## Folder grants
`api.files` (`version: 1`) gives access to folders outside the workspace. The user selects each folder. The plugin cannot supply a path.
+9 -11
View File
@@ -33,7 +33,7 @@ The browser preview (`pnpm dev`) has no installed plugins unless a smoke test su
The built-in browser and the theme editor use the plugin API, but they are not packages. `builtInModules` in `src/lib/plugins/external.ts` lists them. The host starts them in each window, and the plugin menus do not list their tools. A browser window starts only the browser.
`builtInPackages` lists the IDs of old packages for features that RuneStone now includes. The host never loads such a package. Settings → Plug-ins shows it as included with RuneStone, so that the user can remove it.
Native features, such as Git and Background, do not use the plugin API. `syncFeatures` in `external.ts` gives each feature that is on a feature session (`src/lib/features/session.ts`) under the ID of its old package, so that its views share the tab model of plugin views. A launch rule (`src/lib/features/launch.ts`) can start a feature at once: Background starts when a folder or an image is selected. Browser windows start only the features with a browser window rule, which is Background. See [Native features](development.md#native-features).
Native features, such as Git, Background, and Terminal, do not use the plugin API. `syncFeatures` in `external.ts` gives each feature that is on a feature session (`src/lib/features/session.ts`) under the ID of its old package, so that its views share the tab model of plugin views. A launch rule (`src/lib/features/launch.ts`) can start a feature at once: Background starts when a folder or an image is selected. Browser windows start only the features with a browser window rule, which is Background. See [Native features](development.md#native-features).
`features_legacy` (`src-tauri/src/features.rs`) reads the catalog row and the kept `plugin-data/<id>/settings.json` of an old package. It accepts only the IDs of native features and changes no file.
### Scans
@@ -160,7 +160,7 @@ The policy stops a script that comes in through rendered content, for example a
| --- | --- | --- |
| `default-src` | `'self'` | All other types come only from the app. |
| `script-src` | `'self' blob: 'wasm-unsafe-eval'` | `blob:`: plugin entry modules, which `external.ts` loads from Blob URLs. `'wasm-unsafe-eval'`: the PDF Viewer decodes JPEG 2000 and JBIG2 images and color profiles with WebAssembly in its worker. It does not permit `eval`. |
| `style-src` | `'self' 'unsafe-inline'` | Svelte `style` attributes, the `style` attribute in `src/app.html`, Mermaid SVG styles, and the `<style>` elements of CodeMirror, the Vite dev server, and plugins (Terminal, CSV Viewer, PDF Viewer). |
| `style-src` | `'self' 'unsafe-inline'` | Svelte `style` attributes, the `style` attribute in `src/app.html`, Mermaid SVG styles, and the `<style>` elements of CodeMirror, xterm in the Terminal feature, the Vite dev server, and plugins (CSV Viewer, PDF Viewer). |
| `img-src` | `'self' data: blob: https: http:` | `data:`: workspace images, browser frames, tab and site icons, and icons in CSS. `blob:`: background images. `https:` and `http:`: remote images in Markdown previews. |
| `font-src` | `'self' data:` | `'self'`: fonts that the app serves. The app serves no font now. `data:`: fonts that the PDF Viewer embeds. |
| `connect-src` | `'self' ipc: http://ipc.localhost blob:` | `ipc:` and `http://ipc.localhost`: Tauri commands. `blob:`: the blur worker of the Background feature reads its image from a Blob URL. |
@@ -186,17 +186,18 @@ Workers that the app loads from its own files get no policy. Workers from Blob U
| Capability | Windows | Plugins | Commands |
| --- | --- | --- | --- |
| `default.json` | `main`, `workspace-*`, `terminal-*` | All enabled plugins | All app commands |
| `settings.json` | `settings-main`, `settings-workspace-*` | All enabled plugins | Settings, plugins, the Background folder, folder grants, completion, browser |
| `settings.json` | `settings-main`, `settings-workspace-*` | All enabled plugins | Settings, plugins, the Background folder, folder grants, completion, browser, `pty_profiles`, and `pty_running` |
| `browser.json` | `browser-*` | Only the built-in browser (`builtInModules` in `src/lib/plugins/external.ts`) | Browser, `plugins_snapshot`, settings, spelling, window controls, and the read commands of the Background folder (`background_folder`, `background_list`, `background_read`, `background_read_sidecar`) |
A browser window loads no installed plugin, so its capability has no workspace, file, Git, terminal, or plugin package commands. The Background feature runs there to show the background behind a blank tab, so the window can read the Background folder. `tests/unit/plugins/windowCapabilities.spec.ts` and `tests/smoke/browser/window.smoke.mjs` check this.
The other windows load every enabled plugin. A smaller command set for them would limit only the app code, not the plugins. That split belongs to the plugin isolation work. Findings for that work:
- Terminal windows use the plugin host commands, `pty_*` through the Terminal plugin, and `core:window:allow-destroy`. Other plugins in the same window expect the full host API.
- Settings windows use no `workspace_*`, `git_*`, or `pty_*` commands, but plugin settings views run there.
- Terminal windows use the `pty_*` commands of the Terminal feature, the plugin host commands, and `core:window:allow-destroy`. Other plugins in the same window expect the full host API.
- Settings windows use no `workspace_*` or `git_*` commands, but plugin settings views run there. Of the `pty_*` commands, they use only `pty_profiles` for Settings → Terminal and `pty_running` before Terminal goes off.
- Commands that need a workspace (`workspace_*`, `git_*`, `pty_open`, `pty_new_window`) fail in a window without a bound workspace.
- `pty_write`, `pty_resize`, and `pty_close` do not check the window that opened the terminal.
- `pty_write`, `pty_resize`, and `pty_close` act only on the sessions of the calling window. A session of another window counts as a missing session.
- `pty_open` needs an output channel and a page ID. The first open of a new page in a window, after a reload, closes the sessions of the earlier page. The host refuses a late open from an old page.
- `folders_*` need a plugin lease of the calling window. The `background_*` commands of the Background feature need no lease. They take no path: the host keeps the folder that the folder dialog gave.
- `browser_request` needs the session token that `browser_connect` gives the window. A plugin lease does not replace it.
- A new command for plugins goes in `default.json` and, if settings views need it, in `settings.json`. Add it to `browser.json` only when the built-in browser needs it.
@@ -209,7 +210,7 @@ The other windows load every enabled plugin. A smaller command set for them woul
| `src-tauri/src/plugin_sources.rs` | Gitea link parsing and release downloads |
| `src-tauri/src/backgrounds.rs` | The image folder of the native Background feature. Plugins use folder grants |
| `src-tauri/src/folders.rs` | Folder grants for `api.files`: the picker, stored grants, listing, reads, and settings files beside the images |
| `src-tauri/src/pty.rs` | Terminal sessions for `api.pty`. A session with an IPC channel gets raw output bytes; a session without one gets the older window events |
| `src-tauri/src/pty.rs` | The shell sessions of the Terminal feature. Output goes as raw bytes through the channel of `pty_open`, in messages of up to 64 KiB or 8 ms. `pty_running` counts the sessions of all windows |
| `src/lib/plugins/sdk.ts` | The public package API types |
| `src/lib/plugins/externalSession.ts` | Activation, API checks, contributions, mounts, and shutdown |
| `src/lib/plugins/external.ts` | Native state sync, module loading, scans, views, tabs, and document types |
@@ -219,7 +220,7 @@ The other windows load every enabled plugin. A smaller command set for them woul
| `src/lib/plugins/PluginSettings.svelte` | Plugin configuration pages in Settings |
| `src/lib/plugins/PluginTools.svelte` / `PluginEditor.svelte` | Dialog views and editor views |
| `src/lib/plugins/backgrounds.ts` | Background frames |
| `src/lib/plugins/nativeServices.ts` | The host side of `api.pty` and `api.files`. It binds the plugin ID; the plugin never sends it |
| `src/lib/plugins/nativeServices.ts` | The host side of `api.files`. It binds the plugin ID. The plugin never sends it |
| `src/lib/plugins/services.ts` | `api.services`: services that one plugin offers to another in the same window |
| `src/lib/completion/` | The [completion API](completion.md) |
| `scripts/packagePlugin.mjs` | The packager for plugin authors |
@@ -229,9 +230,6 @@ The other windows load every enabled plugin. A smaller command set for them woul
Run these commands from the RuneStone repository root.
For the general checks, see [Checks](development.md#checks). For the browser setup, see [Browser smoke tests](development.md#browser-smoke-tests).
The feature smoke tests read the compiled Terminal plugin from `../RuneStone_Terminal/dist/`.
To make it without a release ZIP, run `node scripts/build.mjs --no-package` in the Terminal folder. Set `RUNESTONE_TERMINAL_DIST` to use another folder.
Unit tests:
```powershell
+4 -4
View File
@@ -2,15 +2,15 @@
[RuneStone](../README.md) · [User guide](user-guide.md)
This guide explains how to install, enable, update, and remove optional plugins such as Terminal, PDF Viewer, and CSV Viewer.
This guide explains how to install, enable, update, and remove optional plugins such as Project Management, PDF Viewer, and CSV Viewer.
Manage all plugins in **Settings → Plug-ins**. The built-in browser, table formulas, and Git are part of RuneStone and are not plugins. To turn Git off, see [Turn features on or off](user-guide.md#turn-features-on-or-off).
Manage all plugins in **Settings → Plug-ins**. The built-in browser, table formulas, Git, Background, and Terminal are part of RuneStone and are not plugins. To turn Git, Background, or Terminal off, see [Turn features on or off](user-guide.md#turn-features-on-or-off).
Plugins run with the full access of RuneStone, including your files. There is no permission sandbox, and the author field does not prove who published the plugin. Enable only code that you trust.
## Install a plugin
Get the release ZIP of the plugin, such as `runestone.terminal-<version>.zip`. Do not extract it.
Get the release ZIP of the plugin, such as `runestone.csv-viewer-<version>.zip`. Do not extract it.
1. Open **Settings → Plug-ins**.
2. Choose **Install plugin ZIP**.
@@ -75,7 +75,6 @@ RuneStone uses the token for this request only and does not save it.
| Plugin | Guide |
| --- | --- |
| Terminal | [Terminal guide](guides/terminal.md) |
| Project Management | [Project Management guide](https://git.knottywyvern.com/kwyvern/RuneStone_PM/src/branch/main/project-management.md) |
| Local Autocomplete | [Local Autocomplete trial guide](https://git.knottywyvern.com/kwyvern/RuneStone_LocalModel/src/branch/main/docs/trial-guide.md) |
| PDF Viewer | [PDF Viewer README](https://git.knottywyvern.com/kwyvern/RuneStone_PDFViewer/src/branch/master/README.md) |
@@ -95,6 +94,7 @@ RuneStone uses the token for this request only and does not save it.
| An old Browser plugin shows in the list | Uninstall it. The built-in browser keeps your profiles and bookmarks. |
| An old Git plugin shows in the list | Uninstall it. RuneStone includes Git, and the first start after the update kept the plugin state. See [Turn features on or off](user-guide.md#turn-features-on-or-off). |
| An old Background Slideshow plugin shows in the list | Uninstall it. RuneStone includes Background, and the first start after the update took the folder and the settings of the plugin. See [Show a background](guides/themes.md#show-a-background). |
| An old Terminal plugin shows in the list | RuneStone includes Terminal. The plugin stays inactive and shows **Included with RuneStone**. Uninstall it. The first start after the update kept the plugin state and its terminal settings. See the [Terminal guide](guides/terminal.md). |
| An old Table Formulas plugin shows in the list | Uninstall it. RuneStone does not run it. Your formulas stay in your files. See [Calculate with table formulas](guides/document-tools.md#calculate-with-table-formulas). |
To see the installed files of a plugin, choose **Show files** beside it. **Open plugins folder** opens the folder for all plugins.
+2
View File
@@ -38,6 +38,8 @@ Correct a wrong color in the theme data or in the derivation rule. Do not add lo
| Surfaces and dividers | `--rs-bg`, `--rs-bg-elevated`, `--rs-bg-active`, `--rs-border`, `--rs-line-highlight`, `--rs-scrim`, `--rs-image-*` tints | Support the content. Choose their strength by function. |
| Disabled states | Role tokens of the control | Keep labels readable. Do not apply disabled opacity to enabled content. |
The Terminal feature uses these tokens directly (`src/lib/features/terminal/theme.ts`). Text is `--rs-text`, the cursor is `--rs-accent` on `--rs-bg`, and the selection is `--rs-selection` with at most 65% alpha. The 16 ANSI colors are the `--rs-ansi-*` tokens. The terminal reads them again after each theme change.
Do not fade a whole badge, row, or container when only its background needs transparency.
Plugins use the same tokens. [Theme tokens](plugin-development.md#theme-tokens) lists them for plugin authors.
+3 -2
View File
@@ -174,17 +174,18 @@ Decisions: [UI-004](design-decisions.md#ui-004--detached-tab-work-area), [UI-039
- General offers the interface language through the shared action menu.
- **Features** lists each native feature in one card: its name, one line of description, and a switch. The page sits between Appearance and Plug-ins, and the `toggle` icon marks it. A failed load shows its cause under the switch in the error color.
- A feature that is off shows no controls: no navigation button, ribbon button, command, or tab. A settings section of an off feature shows one line that names Settings → Features.
- **Terminal** is a Settings page with the `terminal` icon, after Plug-ins and Browser. It shows only while Terminal is on. **Terminal settings** in the profile menu of the terminal panel opens it. No dialog of the panel holds terminal settings.
- The transparency slider covers 0% to 100% and uses the accent and surface tokens of the current theme.
- Appearance shows a preview card for each theme. The arrow keys move between the cards and select a theme. The current card has the selection outline and a check mark.
- **Edit theme** opens the theme editor as a workbench tab in the window that opened Settings. The editor shows every color role in groups, with a swatch, a hex field, the lowest contrast result, and a reset button. Each change shows at once in that window. Save writes a short schema 3 theme with a base.
- Custom theme files use schema 3: one `mode`, an optional built-in `base` theme, the `colors` that differ from the base, and `fonts` stacks for interface, prose, headings, and code. The export writes every color and font. Schema 1 and 2 imports convert to schema 3. A schema 1 import selects the palette of the current appearance.
Decisions: [UI-028](design-decisions.md#ui-028--adjustable-surface-transparency-and-fixed-custom-palettes), [UI-042](design-decisions.md#ui-042--theme-file-format-3-and-terminal-colors), [UI-047](design-decisions.md#ui-047--theme-editor-tab-and-theme-cards), [UI-055](design-decisions.md#ui-055--settings--features-and-native-git), [UI-057](design-decisions.md#ui-057--background-replaces-background-image-and-background-slideshow).
Decisions: [UI-028](design-decisions.md#ui-028--adjustable-surface-transparency-and-fixed-custom-palettes), [UI-042](design-decisions.md#ui-042--theme-file-format-3-and-terminal-colors), [UI-047](design-decisions.md#ui-047--theme-editor-tab-and-theme-cards), [UI-055](design-decisions.md#ui-055--settings--features-and-native-git), [UI-057](design-decisions.md#ui-057--background-replaces-background-image-and-background-slideshow), [UI-058](design-decisions.md#ui-058--settings--terminal-and-theme-colors-in-the-terminal).
## Typography and tables
- The interface uses `--rs-font-ui`. Prose uses `--rs-font-prose`. Headings use `--rs-font-heading`.
- Source and Terminal share `--rs-font-mono` and `--rs-code-font-weight` (default 300). The monospace stack starts with Cascadia Mono, then Cascadia Code, JetBrains Mono, Fira Code, and Consolas. Terminal font size is a separate setting.
- Source and Terminal share `--rs-font-mono` and `--rs-code-font-weight` (default 300). The monospace stack starts with Cascadia Mono, then Cascadia Code, JetBrains Mono, Fira Code, and Consolas. Terminal font size is a separate setting in Settings → Terminal.
- Document headings use space between sections, not separator lines. Heading fold controls use the shared chevron and take keyboard focus.
- Tables use shared cell padding and line height. Entering a cell does not change its row height.
- A table row needs an unescaped pipe. Write and Read use the same row rule. A paragraph after a table stays a paragraph when the separator line is removed.
+7 -4
View File
@@ -16,7 +16,7 @@ This guide explains how to work with files, documents, tabs, settings, and the b
| Change the language or colors | [Change settings](#change-settings) and [Appearance](guides/themes.md) |
| Review changes and commit with Git | [Git guide](guides/git.md) |
| Turn a built-in feature on or off | [Turn features on or off](#turn-features-on-or-off) |
| Add Terminal or other plugins | [Install and manage plugins](plugins.md) |
| Add plugins | [Install and manage plugins](plugins.md) |
| Browse websites | [Use the built-in browser](#use-the-built-in-browser) |
| Run commands or scripts | [Terminal guide](guides/terminal.md) |
@@ -200,19 +200,22 @@ Settings apply at once to all workspaces on this computer and update all open wi
| --- | --- |
| General | Display language, **File name title**, **Keep line breaks**, **Table formulas**, **Show .runestone folder**, and auto-save |
| Appearance | Color theme, transparency, background (a folder slideshow or one image), and custom themes. See [Appearance and custom themes](guides/themes.md). |
| Features | Turn Git and Background on or off. See [Turn features on or off](#turn-features-on-or-off). |
| Features | Turn Git, Background, and Terminal on or off. See [Turn features on or off](#turn-features-on-or-off). |
| Plug-ins | Install, enable, update, and remove plugins. See [Install and manage plugins](plugins.md). |
| Browser | Homepage, search engine, profiles, ad blocking, and web data |
| Terminal | Default profile, font size, scrollback lines, and cursor blink. The page shows only while Terminal is on. See [Change the terminal settings](guides/terminal.md#change-the-terminal-settings). |
### Turn features on or off
Git and Background are built-in features with an off switch. Open **Settings → Features** and use the switch beside the feature.
Git, Background, and Terminal are built-in features with an off switch. Open **Settings → Features** and use the switch beside the feature.
- A feature that is on uses no extra memory until you first use it, for example when you open Source control. Background loads at the start only when you selected a folder or an image.
- A feature that is on uses no extra memory until you first use it, for example when you open Source control or the terminal panel. Background loads at the start only when you selected a folder or an image.
- A feature that is off does not load. Its buttons, commands, and tabs do not show.
- Terminal off ends the terminal sessions of every window. When a window runs a shell, RuneStone asks first.
- A change applies at once in all windows. The code that a window loaded stays in memory until you restart RuneStone.
After an update, Git takes the state of its old plugin package: on when the package was enabled, off when it was disabled. Without an old package, Git starts on.
Terminal does the same with the old Terminal plugin, and it copies the terminal settings of that plugin.
Background starts on for every user. It takes the folder, the timing, and the targets of the Background Slideshow plugin when that plugin was on. Otherwise it shows your old background image, if you had one. See [Show a background](guides/themes.md#show-a-background).
Settings → Plug-ins shows an old package as **Included with RuneStone**. You can uninstall it.