Rewrite the documentation and the agent instructions
Move the agent instructions from AGENTS.md to CLAUDE.md. AGENTS.md now points to CLAUDE.md. The UI rules move to docs/ui-design.md. The version and release policy moves to the new docs/releases.md. Rewrite the README, the user guides, and the developer references. Check each claim against the code. Remove old version history and repeated warnings. Link to Gitea at git.knottywyvern.com instead of the LAN address. Move the October 13 menu audit to the archive.
This commit is contained in:
@@ -9,6 +9,7 @@ These records preserve past checks, decisions, and proposals. They do not define
|
||||
| [macOS validation, 0.1.44](macos-validation-0.1.44.md) | Apple silicon DMG, source commit, checksums, checks, and acceptance limits |
|
||||
| [Linux installer 0.1.44](linux-validation-0.1.44.md) | Debian build, checksum, automated checks, and remaining validation gaps |
|
||||
| [Linux validation, October 14–15](linux-validation-2026-10.md) | Native builds, desktop smoke checks, Debian/AppImage packages, and test limits for 0.1.34 |
|
||||
| [Menu and color review, October 13](menu-audit-2026-10-13.md) | Menu coverage, palette corrections, contrast measurements, and the 0.1.32 builds |
|
||||
| [Plugin release trial, October 5](plugin-release-trial-2026-10-05.md) | Simulated Gitea downloads, native installation, and repeat steps |
|
||||
| [Kanban review, October 8](kanban-review-2026-10-08.md) | Scope, assignments, checks, and the 0.1.13 test builds |
|
||||
| [Kanban changes, October 8](kanban-changes-2026-10-08.md) | Editor, settings, browser, and plugin changes |
|
||||
|
||||
@@ -13,7 +13,7 @@ The Windows configuration uses a per-user NSIS installer and blocks downgrades.
|
||||
The 0.1.15 release notes tell users to run the installer directly, but also identify native installer behavior as untested.
|
||||
This difference needs reproduction on an installed copy before implementation.
|
||||
|
||||
Sources: [project rules](../../AGENTS.md#windows-installer), [Windows configuration](../../src-tauri/tauri.windows.conf.json), and [0.1.15 release notes](../release-0.1.15.md).
|
||||
Sources: [project rules](../../CLAUDE.md#windows-installer), [Windows configuration](../../src-tauri/tauri.windows.conf.json), and the 0.1.15 release notes (no longer in the repository).
|
||||
|
||||
## Proposed first milestone
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Menu, theme, and Git graph changes
|
||||
|
||||
These changes cover three To Do cards from the RuneStone and RuneStone_Git boards on October 8, 2026.
|
||||
The [local test builds](../release-0.1.17.md) are RuneStone 0.1.17 and Git 0.1.4.
|
||||
The local test builds were RuneStone 0.1.17 and Git 0.1.4.
|
||||
|
||||
## Changes
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ Prose lint for this record: 1.45 issues per 100 words.
|
||||
The user requested distributable builds for desktop testing.
|
||||
RuneStone 0.1.13 is available as `src-tauri/target/release/bundle/nsis/RuneStone_0.1.13_x64-setup.exe`.
|
||||
Project Management 0.2.18 is available as `../RuneStone_ProjectManagement/plugin-packages/runestone.pm-0.2.18.zip`.
|
||||
See the [installation notes](../release-0.1.13.md).
|
||||
The 0.1.13 installation notes are no longer in the repository.
|
||||
|
||||
Both builds completed and passed artifact integrity checks. Previous release files remain intact.
|
||||
The installer includes the existing browser runtime. Its application version is 0.1.13 and downgrades remain disabled.
|
||||
|
||||
@@ -20,4 +20,4 @@ Build procedure: frozen pnpm install; Browser npm ci, checks, tests, engine test
|
||||
|
||||
Artifact: `releases/0.1.44/RuneStone_0.1.44_aarch64.dmg`. Logs and packaging scripts remain under `output/macos-installer-0.1.44/`.
|
||||
|
||||
Published alongside the existing Windows installer in the [Gitea 0.1.44 release](http://10.0.0.5:6610/kwyvern/RuneStone/releases/tag/v0.1.44), with `macos-release-notes.md` as a separate attachment. The existing release tag was retained.
|
||||
Published alongside the existing Windows installer in the [Gitea 0.1.44 release](https://git.knottywyvern.com/kwyvern/RuneStone/releases/tag/v0.1.44), with `macos-release-notes.md` as a separate attachment. The existing release tag was retained.
|
||||
|
||||
@@ -6,7 +6,7 @@ Reference cards remain in Backlog. They supply evidence and do not count as impl
|
||||
## Menu coverage
|
||||
|
||||
The source audit covers RuneStone, Project Management, Terminal, Background Slideshow, Local Autocomplete, Git, PDF Viewer, and Table Formulas.
|
||||
The [inventory](menu-surfaces.json) records 38 source files, their design route, and their check.
|
||||
The [inventory](../menu-surfaces.json) records 38 source files, their design route, and their check.
|
||||
Project Management has 21 distinct menu, choice, and picker routes in its detailed local inventory.
|
||||
PDF Viewer and Table Formulas contain no independent menu renderer. Git's commit list is a persistent listbox.
|
||||
|
||||
+148
-118
@@ -1,162 +1,192 @@
|
||||
# Build and package RuneStone
|
||||
# Build RuneStone
|
||||
|
||||
[Development](development.md) · [Installation](installation.md)
|
||||
[Development](development.md) · [Releases](releases.md) · [Installation](installation.md)
|
||||
|
||||
This guide is for maintainers. Users install a supplied package through the installation guide.
|
||||
This guide tells maintainers how to build RuneStone installers and packages. Users install a supplied file with the [installation guide](installation.md).
|
||||
|
||||
Use the [release policy](releases.md) to select the version, store the files, and publish them.
|
||||
|
||||
## Build the Windows installer
|
||||
|
||||
Build on 64-bit Windows with the tools in the [development guide](development.md#run-from-source).
|
||||
The commands below use the checked-in dependency versions.
|
||||
`pnpm build:installer` builds an NSIS setup file for 64-bit Windows (x64). The script stops on other operating systems.
|
||||
|
||||
```sh
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm check
|
||||
pnpm test
|
||||
pnpm build:installer
|
||||
```
|
||||
Prerequisites:
|
||||
|
||||
The last command builds the interface, compiles the release app, and creates an NSIS setup executable.
|
||||
The first build needs internet access to download the packaging tools and the WebView2 bootstrapper.
|
||||
Find the installer in:
|
||||
- The source setup in [Run from source](development.md#run-from-source).
|
||||
- A Windows Browser runtime staged in `src-tauri/browser-engine`. See [Built-in browser runtime](development.md#built-in-browser-runtime). The installer bundles that folder.
|
||||
- Internet access for the first build. Tauri downloads NSIS and the WebView2 bootstrapper.
|
||||
|
||||
```text
|
||||
releases/<version>/RuneStone_<version>_x64-setup.exe
|
||||
```
|
||||
Procedure, in the RuneStone repository root:
|
||||
|
||||
Distribute this setup file. Users do not need the repository, a local server, or build tools.
|
||||
Build output stays outside version control.
|
||||
The build moves the completed installer into `releases/<version>/` with its `host.json` metadata.
|
||||
The toolchain bundle folder does not retain a second installer copy.
|
||||
1. Run `pnpm install --frozen-lockfile`.
|
||||
2. Run `pnpm check`.
|
||||
3. Run `pnpm test`.
|
||||
4. Select the version with the [version policy](releases.md#versions).
|
||||
5. Run `pnpm build:installer --version <version>`.
|
||||
|
||||
## Installer settings
|
||||
Without `--version`, the script uses the version in `package.json`.
|
||||
|
||||
Tauri automatically merges `src-tauri/tauri.windows.conf.json` into the base configuration on Windows.
|
||||
This file selects NSIS for ordinary `pnpm tauri build` commands too.
|
||||
It uses the existing RuneStone icon and installs the app for the current Windows account.
|
||||
Tauri supplies the setup screens, Start menu shortcut, launch option, and uninstaller.
|
||||
Output:
|
||||
|
||||
The installer includes the WebView2 bootstrapper.
|
||||
If WebView2 is missing, setup downloads the runtime. An existing runtime needs no setup download.
|
||||
The configuration blocks version downgrades.
|
||||
| File | Contents |
|
||||
| --- | --- |
|
||||
| `releases/<version>/RuneStone_<version>_x64-setup.exe` | The setup file to distribute |
|
||||
| `releases/<version>/host.json` | The release version, the encoded toolchain and Windows versions, the path, the size in bytes, and the SHA-256 hash |
|
||||
|
||||
The script prints `Installer available: <path>` when it completes.
|
||||
After a successful build, the version fields keep the new version.
|
||||
|
||||
Example, from the 0.1.44 download link in the README: version `0.1.44` gives `releases/0.1.44/RuneStone_0.1.44_x64-setup.exe`.
|
||||
|
||||
### What the script does
|
||||
|
||||
Source: `scripts/buildInstaller.mjs`.
|
||||
|
||||
1. Reads the version and makes sure that all version fields match the current version.
|
||||
2. Makes sure that downgrade protection stays on in `tauri.conf.json` and `tauri.windows.conf.json`.
|
||||
3. Stops if the setup file or `host.json` exists in the bundle folder or in `releases/<version>/`.
|
||||
4. Saves copies of the four version files as `*.before` in `output/installer-build/<version>/`.
|
||||
It also writes the NSIS template and a configuration override to that folder.
|
||||
5. Writes the new version to `package.json`, `tauri.conf.json`, `Cargo.toml`, and `Cargo.lock`.
|
||||
6. Runs `tauri build --no-bundle -- --locked`. This runs `pnpm build` and compiles the release app.
|
||||
7. Runs `scripts/setWindowsVersion.ps1` to write the version resource of `runestone.exe`.
|
||||
8. Runs `tauri bundle --bundles nsis` with the RuneStone template from `src-tauri/windows/installer.nsi`.
|
||||
9. Moves the setup file into `releases/<version>/`, writes `host.json`, and removes the bundle-folder copy.
|
||||
|
||||
### Failure and rollback
|
||||
|
||||
If a step fails, the script restores the four version files.
|
||||
It moves partial setup files and `host.json` into `output/installer-build/<version>/` with a `.failed-<timestamp>` suffix.
|
||||
|
||||
Ctrl+C stops the script before this cleanup. The version files then keep the new version.
|
||||
Before you run the script again, copy the `*.before` files from `output/installer-build/<version>/` back to their original names.
|
||||
A new run with the same version replaces those copies.
|
||||
|
||||
## Installer requirements
|
||||
|
||||
Keep these properties when you change the installer configuration or template:
|
||||
|
||||
| Requirement | Implementation |
|
||||
| --- | --- |
|
||||
| Reinstall is the default when RuneStone is installed, also for the same version. | The NSIS maintenance page preselects the reinstall option. |
|
||||
| Users do not uninstall RuneStone before an update or a reinstall. | Updates and reinstalls replace the app in place. |
|
||||
| Updates and reinstalls keep workspace files and user settings. | Workspaces stay outside the installation folder. Settings stay in application data. |
|
||||
| Older versions cannot replace a newer installation. | `allowDowngrades` is `false`. `pnpm build:installer` stops if this setting changes. |
|
||||
| The app identity stays the same across upgrades. | The identifier stays `com.runestone.app`. |
|
||||
| WebView2 is available. | The installer embeds the WebView2 bootstrapper. If the runtime is missing, setup downloads it. |
|
||||
|
||||
The installer uses the RuneStone icon, installs for the current Windows account, and adds a Start menu shortcut and an uninstaller.
|
||||
It does not register document types or start RuneStone when Windows starts.
|
||||
|
||||
See [Tauri's Windows installer documentation](https://v2.tauri.app/distribute/windows-installer/) for the packaging options.
|
||||
Local installers are unsigned. Configure Windows code signing with [Tauri's signing guide](https://v2.tauri.app/distribute/sign/windows/) before public distribution.
|
||||
The NSIS template comes from Tauri CLI 2.11.4. When you update Tauri, compare the template with the new Tauri version.
|
||||
See [Tauri's Windows installer documentation](https://v2.tauri.app/distribute/windows-installer/) for packaging options.
|
||||
|
||||
## Hotfix installer versions
|
||||
|
||||
Hotfix installer versions use the same letter sequence as plugin versions: `a`, `b`, `c`, through `z`, then `aa`, `ab`.
|
||||
Use `pnpm build:installer --version 0.1.23a` to produce that release.
|
||||
The build command checks matching versions, preserves existing installers, and restores previous version fields if the build fails.
|
||||
Cargo and Tauri accept only SemVer versions. The Windows version resource accepts only four numbers.
|
||||
`scripts/releaseVersion.mjs` encodes a hotfix version for those fields. The encoding does not create a separate build or change the release version.
|
||||
|
||||
`package.json`, Cargo release metadata, installer metadata, the app version display, and release filenames retain the literal release version.
|
||||
Cargo and Tauri require SemVer. The adapter encodes `0.1.23a` as `0.1.23+1` in their version fields.
|
||||
Windows requires four numeric parts. The adapter encodes the same version as `0.1.23.1` in the numeric version resource.
|
||||
The executable's FileVersion and ProductVersion strings retain `0.1.23a`.
|
||||
These internal encodings represent the same release. They do not create a separate build or increase the numeric release version.
|
||||
The suffix index counts `a` = 1 through `z` = 26, then `aa` = 27. A regular version has index 0.
|
||||
|
||||
The shared NSIS comparison orders the numeric release first, then the hotfix suffix.
|
||||
For example: `0.1.23 < 0.1.23a < 0.1.23b < 0.1.23z < 0.1.23aa < 0.1.24`.
|
||||
The installer blocks downgrades before uninstall or update actions, including silent and passive installs.
|
||||
Unknown version formats also block replacement. Reinstall and upgrade retain the existing installation by default.
|
||||
Windows stores the SemVer encoding in its compatibility version field for older installers.
|
||||
It stores the literal release version in `RuneStoneReleaseVersion` for the updated installer.
|
||||
The app and installer version strings and release filenames use `0.1.23a`. Windows Apps can show the equivalent internal value `0.1.23+1`.
|
||||
This keeps older numeric installers from treating a hotfix as an unknown or older release.
|
||||
| Field | Value for `0.1.23a` |
|
||||
| --- | --- |
|
||||
| `package.json`, `[package.metadata.runestone]`, the setup file name, the version in Settings, and the executable `FileVersion` and `ProductVersion` strings | `0.1.23a` |
|
||||
| `tauri.conf.json`, the Cargo package version, and `Cargo.lock` | `0.1.23+1` |
|
||||
| The numeric Windows version resource of the executable and the installer | `0.1.23.1` |
|
||||
| Registry value `RuneStoneReleaseVersion` | `0.1.23a` |
|
||||
| Registry value `DisplayVersion`, which Windows shows in installed apps | `0.1.23+1` |
|
||||
|
||||
The Windows numeric resource limits each part and the hotfix index to 65535.
|
||||
The adapter rejects versions outside those limits before it changes version fields.
|
||||
The NSIS template derives from Tauri CLI 2.11.4. Check its changes when updating Tauri.
|
||||
Each numeric part and the suffix index must not exceed 65535. The last valid suffix is `crxo`.
|
||||
The script rejects other versions before it changes a file.
|
||||
|
||||
## Prepare a release
|
||||
|
||||
Each project uses its own `zz.yy.xx` version. Routine source edits and checks retain the current version.
|
||||
Increase `xx` once for each completed regular build. For a hotfix, increase the letter suffix. Failed attempts do not consume a version.
|
||||
Keep version fields consistent, and restore them if no build completes.
|
||||
Increase `yy` or `zz` only for a user-directed release, then reset the lower fields as defined in [the version policy](../AGENTS.md#versioning).
|
||||
Publishing an existing artifact does not change its version.
|
||||
|
||||
1. Select the release version under the shared version policy.
|
||||
2. Run the checks above.
|
||||
3. Run `pnpm build:installer --version <version>`. The adapter sets matching release and toolchain versions.
|
||||
4. Test the installer on a clean Windows account with the checks below.
|
||||
5. Attach only installer binaries to the repository release or your chosen download page.
|
||||
|
||||
Keep `com.runestone.app` as the app identifier so upgrades retain the same app identity.
|
||||
Publish installers on the [repository release page](http://10.0.0.5:6610/kwyvern/RuneStone/releases).
|
||||
After you publish an installer, add its download link to the README.
|
||||
Keep notes, checksums, metadata, logs, and screenshots out of release attachments.
|
||||
Keep the release description empty so users reach the downloads directly. Put release notes, test results, and installation instructions in repository documentation.
|
||||
Keep build records in the local release directory. Publish installation checksums in `docs/checksums/<version>/` and link them from the installation guide.
|
||||
|
||||
Local installers are unsigned until the maintainer configures Windows code signing.
|
||||
Use [Tauri's signing guide](https://v2.tauri.app/distribute/sign/windows/) before public distribution.
|
||||
The installer comparison in `src-tauri/windows/versionCompare.nsh` sorts the numeric release first, then the suffix:
|
||||
`0.1.23 < 0.1.23a < 0.1.23b < 0.1.23z < 0.1.23aa < 0.1.24`.
|
||||
The installer reads `RuneStoneReleaseVersion` and uses `DisplayVersion` when that value is missing.
|
||||
An installed version with an unknown format counts as newer, so setup blocks replacement.
|
||||
Older RuneStone installers read `DisplayVersion` as SemVer and treat `0.1.23+1` as newer than `0.1.23`. Thus an older `0.1.23` installer does not replace the hotfix.
|
||||
|
||||
## Installer checks
|
||||
|
||||
Do these checks on a separate Windows test account or virtual machine. A successful build does not prove them.
|
||||
|
||||
| Check | Expected result |
|
||||
| --- | --- |
|
||||
| Install on an account without Node.js or Rust | Setup completes and RuneStone opens |
|
||||
| Install without WebView2, with internet access | Setup installs the runtime and RuneStone opens |
|
||||
| Open RuneStone from the Start menu | The app opens without a terminal or development server |
|
||||
| Create a workspace outside the installation folder | Notes save and reopen |
|
||||
| Install a newer version | Setup updates the app and preserves workspace files |
|
||||
| Reinstall the same version | Setup defaults to reinstall and preserves workspace files and settings |
|
||||
| Try to install an older version | Setup blocks the downgrade |
|
||||
| Remove RuneStone through Windows Settings | The app and shortcuts disappear, and the separate workspace remains |
|
||||
|
||||
These checks require a Windows test account or virtual machine. A successful build alone does not confirm them.
|
||||
| Install on an account without Node.js or Rust | Setup completes and RuneStone opens. |
|
||||
| Install without WebView2, with internet access | Setup installs the runtime and RuneStone opens. |
|
||||
| Open RuneStone from the Start menu | The app opens without a terminal or a development server. |
|
||||
| Create a workspace outside the installation folder | Notes save and open again. |
|
||||
| Install a newer version | Setup updates the app and keeps workspace files. |
|
||||
| Install the same version again | Setup selects reinstall and keeps workspace files and settings. |
|
||||
| Install an older version | Setup blocks the downgrade. |
|
||||
| Install a hotfix over its base version | Setup updates the app. |
|
||||
| Remove RuneStone through Windows Settings | The app and shortcuts are removed. The separate workspace stays. |
|
||||
|
||||
## Build Linux packages
|
||||
|
||||
Prepare the Browser runtime and complete the [Linux development checks](linux.md) on the target processor architecture.
|
||||
Run the commands from the RuneStone repository root.
|
||||
The examples use the Tauri CLI from [package.json](../package.json) and [Linux bundle configuration](../src-tauri/tauri.linux.conf.json).
|
||||
Prerequisites:
|
||||
|
||||
Choose the package format for the build. Each example produces a package in the output folder listed below:
|
||||
- The [Linux development prerequisites](linux.md) on the processor architecture of the package.
|
||||
- A Linux Browser runtime for that architecture, staged in `src-tauri/browser-engine`.
|
||||
- The new version in all RuneStone version fields. No Linux script sets or restores them. See [Versions](releases.md#versions).
|
||||
|
||||
```sh
|
||||
# Example: Debian package
|
||||
pnpm tauri build --bundles deb -- --locked
|
||||
Procedure, in the RuneStone repository root. The commands use the Tauri CLI from `package.json` and the bundle settings in `src-tauri/tauri.linux.conf.json`.
|
||||
|
||||
# Example: AppImage
|
||||
pnpm tauri build --bundles appimage -- --locked
|
||||
```
|
||||
1. Build the package format that you need:
|
||||
|
||||
Do not use `pnpm build:installer` on Linux. That command selects the Windows installer.
|
||||
These direct Tauri commands do not manage the project release version or archive a
|
||||
release. Before making a distributable, select the next version using the
|
||||
[version policy](../AGENTS.md#versioning), keep all four version fields consistent,
|
||||
and restore them if packaging fails. Move completed packages into
|
||||
`releases/<version>/` together with checksums and the recorded source/test results;
|
||||
do not leave duplicate completed packages in the toolchain bundle directory.
|
||||
Packages appear under `src-tauri/target/release/bundle/deb/` or `src-tauri/target/release/bundle/appimage/`.
|
||||
```sh
|
||||
# Debian package
|
||||
pnpm tauri build --bundles deb -- --locked
|
||||
|
||||
Use the [Linux installation procedure](installation.md#install-on-linux) when testing a Debian package.
|
||||
Test launch without development tools, same-version reinstall, upgrade, and removal on a separate test account.
|
||||
Reinstall and upgrade must preserve settings and workspace files. Removal must preserve workspaces outside the installation folder.
|
||||
# AppImage
|
||||
pnpm tauri build --bundles appimage -- --locked
|
||||
```
|
||||
|
||||
For shared packages, build on the oldest distribution you intend to support that supplies WebKitGTK 4.1.
|
||||
A package built on a newer system can require libraries unavailable on an older system.
|
||||
An AppImage does not remove this compatibility limit.
|
||||
See [Tauri's AppImage guidance](https://v2.tauri.app/distribute/appimage/) and [Debian packaging guidance](https://v2.tauri.app/distribute/debian/).
|
||||
2. Find the package in `src-tauri/target/release/bundle/deb/` or `src-tauri/target/release/bundle/appimage/`.
|
||||
3. Move the package into `releases/<version>/`. Do not leave a copy in the bundle folder.
|
||||
4. Put the checksums, the source commit, the environment, the test results, and the untested cases in the same folder.
|
||||
|
||||
Call a distribution supported only after its native tests and package checks pass.
|
||||
Repeat the automated checks on a Linux runner before each Linux release.
|
||||
Keep the source commit, environment, results, and untested cases with each release.
|
||||
See the [October 2026 validation records](archive/linux-validation-2026-10.md) for earlier package checks and their limits.
|
||||
If the build fails, restore the previous version fields.
|
||||
|
||||
## Experimental macOS packages
|
||||
Example, from the 0.1.44 download link in the README: the x86_64 Debian build of version `0.1.44` is `RuneStone_0.1.44_amd64.deb`.
|
||||
|
||||
Build on macOS with the correct Browser runtime.
|
||||
`pnpm build:installer` does not build Linux packages. It stops on operating systems other than Windows.
|
||||
No Linux script encodes hotfix versions, and Tauri rejects a letter suffix in `tauri.conf.json`. Report this blocker before a Linux hotfix build.
|
||||
|
||||
On macOS, a local application bundle can use:
|
||||
The Debian package depends on `libc6 (>= 2.39)`, as set in `tauri.linux.conf.json`.
|
||||
A package built on a newer system can need libraries that an older system does not have. An AppImage does not remove this limit.
|
||||
For a shared package, build on the oldest distribution that you support and that supplies WebKitGTK 4.1.
|
||||
See [Tauri's Debian guide](https://v2.tauri.app/distribute/debian/) and [Tauri's AppImage guide](https://v2.tauri.app/distribute/appimage/).
|
||||
|
||||
Test a Debian package with the [Linux installation procedure](installation.md#install-on-linux) on a separate test account:
|
||||
|
||||
| Check | Expected result |
|
||||
| --- | --- |
|
||||
| Launch without development tools | RuneStone opens. |
|
||||
| Install the same version again | Settings and workspace files stay. |
|
||||
| Install a newer version | Settings and workspace files stay. |
|
||||
| Remove the package | Workspaces outside the installation folder stay. |
|
||||
|
||||
Call a distribution supported only after its native tests and package checks pass. Repeat the automated checks on a Linux runner before each Linux release.
|
||||
For an example record, see the [Linux 0.1.44 validation](archive/linux-validation-0.1.44.md).
|
||||
|
||||
## macOS packages
|
||||
|
||||
macOS packages are experimental. RuneStone has no validated macOS release procedure.
|
||||
|
||||
Prerequisites: a Mac, the source setup, and a Browser runtime packaged and staged on that Mac.
|
||||
|
||||
In the RuneStone repository root, run:
|
||||
|
||||
```sh
|
||||
pnpm tauri build --bundles app -- --locked
|
||||
```
|
||||
|
||||
Tauri places the bundle under `src-tauri/target/release/bundle/macos/`.
|
||||
This command is a test route, not a validated RuneStone release workflow.
|
||||
Check the [Tauri application bundle guide](https://v2.tauri.app/distribute/macos-application-bundle/) for platform packaging behavior.
|
||||
Signing, notarization, architecture coverage, Browser packaging, and desktop acceptance remain unresolved for RuneStone on macOS.
|
||||
Tauri puts the application bundle in `src-tauri/target/release/bundle/macos/`. No script sets the version fields on macOS.
|
||||
|
||||
Example, from the [macOS 0.1.44 record](archive/macos-validation-0.1.44.md): the 0.1.44 DMG used manual steps after this build.
|
||||
Those steps replaced the bundled Browser resources with a copy that keeps the Electron framework symbolic links.
|
||||
Then they applied ad hoc signatures and created the DMG.
|
||||
|
||||
Developer ID signing, notarization, Intel builds, and desktop acceptance tests are not done for macOS.
|
||||
See [Tauri's macOS application bundle guide](https://v2.tauri.app/distribute/macos-application-bundle/).
|
||||
|
||||
+82
-22
@@ -1,8 +1,22 @@
|
||||
# Completion plugin API
|
||||
|
||||
This source update adds `api.completion`, capability version 1. It is optional in package API version 1.
|
||||
[Plugin development](plugin-development.md) · [Plugin API](plugin-development.md#plugin-api)
|
||||
|
||||
Plugins must feature-detect it. The existing 0.1.7 installer does not contain this source update.
|
||||
`api.completion` (`version: 1`) lets plugins show autocomplete in RuneStone editors and in their own text fields, and supply the suggestions.
|
||||
|
||||
`api.completion` is optional. Older hosts do not have it, and `transport` can be absent. Make sure that a member exists before you call it.
|
||||
The types are in `src/lib/completion/contracts.ts`.
|
||||
|
||||
| Member | Contract |
|
||||
| --- | --- |
|
||||
| `registerInput(element, options)` | Add autocomplete to an `<input>` or `<textarea>`. Returns a handle. |
|
||||
| `registerSurface(surface)` | Add autocomplete to a custom editor. Returns a handle. |
|
||||
| `registerProvider(provider)` | Supply suggestions. Returns a cleanup function. |
|
||||
| `invalidate()` | Dismiss all visible suggestions. |
|
||||
| `transport(request, signal, onLine)` | Optional. Send a request to a local model server. |
|
||||
|
||||
The host adds the plugin ID as a prefix to field and provider IDs. Each field ID must be unique among the active fields.
|
||||
The host disposes all registrations when the plugin stops.
|
||||
|
||||
## Register a field
|
||||
|
||||
@@ -18,40 +32,86 @@ if (completion?.version === 1) {
|
||||
}
|
||||
```
|
||||
|
||||
The host prefixes field IDs with the owning plugin ID and disposes registrations when the plugin stops. IDs must be unique per active owner.
|
||||
`registerInput` options are `id`, `kind` (`"prose"` default, or `"code"`), and `sensitive`.
|
||||
The host shows the suggestion in a box below the field. It treats inputs of types other than `text` and `search` as sensitive.
|
||||
|
||||
Inputs and text areas use a preview below the field. Custom editors use `registerSurface` with snapshot, preview, and insert callbacks.
|
||||
| Key | Action |
|
||||
| --- | --- |
|
||||
| Tab | Accept the suggestion. |
|
||||
| Escape | Dismiss the suggestion. |
|
||||
| Ctrl+Alt+Space (Cmd+Alt+Space on macOS) | Request a suggestion now. |
|
||||
| Ctrl+Alt+Right (Cmd+Alt+Right on macOS) | Accept the next word. |
|
||||
|
||||
Snapshots include document identity, revision, caret, selection, focus, composition, sensitivity, read-only state, and prose or code kind.
|
||||
The RuneStone Markdown editor and code editor are also completion surfaces. They show the suggestion as faded italic text at the caret.
|
||||
|
||||
The host validates the snapshot before acceptance. Custom insert callbacks must make one undoable transaction and reject stale expected text.
|
||||
### Custom editors
|
||||
|
||||
`registerSurface({ id, snapshot, preview, insert })` connects a custom editor.
|
||||
|
||||
- `snapshot()` returns the current state: `documentId`, `revision`, `text`, `caret`, `selectionEnd`, `focused`, `composing`, `sensitive`, `readOnly`, `kind`, and `language`.
|
||||
- `preview(text)` shows a suggestion. `null` removes it.
|
||||
- `insert(text, expected)` inserts the accepted text. Do it as one undoable edit. Return `false` when the editor state no longer matches `expected`.
|
||||
|
||||
The returned handle has `changed()`, `request()`, `accept(word?)`, `dismiss()`, and `dispose()`. Call `changed()` after each edit.
|
||||
|
||||
### When the host asks for a suggestion
|
||||
|
||||
The host asks only when all of these conditions are true:
|
||||
|
||||
- The field has focus, and no selection.
|
||||
- The field is not read-only or sensitive, and no IME composition is in progress.
|
||||
- The text before the caret contains more than spaces.
|
||||
- For prose, the caret is not in a table row, a link target, or an HTML tag.
|
||||
- For prose, the caret is not in inline code, a code fence, or front matter.
|
||||
|
||||
## Register a provider
|
||||
|
||||
`registerProvider` accepts an ID, delay, deadline, and an asynchronous completion function. Only one provider can be active in a window.
|
||||
```javascript
|
||||
const stop = api.completion.registerProvider({
|
||||
id: "local",
|
||||
delayMs: 200,
|
||||
timeoutMs: 1000,
|
||||
async complete(request, publish) {
|
||||
const text = await suggest(request.prefix, request.suffix, request.signal);
|
||||
return text;
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
The function receives bounded prefix and suffix text, document and surface identity, language, mode, and an abort signal.
|
||||
Only one provider can be active in a window. A second registration throws an error.
|
||||
|
||||
It can publish partial text through its callback and return the final insertion. No candidate enters the document before acceptance.
|
||||
| Field | Rule |
|
||||
| --- | --- |
|
||||
| `delayMs` | Wait after the last edit. Default 200, from 100 to 1,000 milliseconds. |
|
||||
| `timeoutMs` | Time limit for an automatic request. Default 1,000, from 300 to 5,000 milliseconds. A manual request has 10 seconds. |
|
||||
| `complete(request, publish)` | Returns the final text, or `null`. Call `publish(text)` to show partial text before the end. |
|
||||
|
||||
Call `invalidate()` when settings or reference context changes.
|
||||
The request contains `surfaceId`, `documentId`, `revision`, `prefix`, `suffix`, `kind`, `language`, `manual`, and an abort `signal`.
|
||||
`prefix` has at most 3,000 characters before the caret. `suffix` has at most 600 characters after the caret.
|
||||
The host ignores a suggestion longer than 2,000 characters or one with control characters.
|
||||
No text goes into the document until the user accepts it. Then the host makes sure that the document revision and the caret did not change.
|
||||
Call `invalidate()` when the provider settings or its context change.
|
||||
|
||||
## Local transport
|
||||
|
||||
`transport(request, signal, onLine)` sends a bounded request through the desktop host. Each callback receives one response line.
|
||||
`transport(request, signal, onLine)` sends one request to a model server on the same computer, through the desktop host.
|
||||
It calls `onLine` once for each response line. It is not a general HTTP API.
|
||||
|
||||
Supported routes are `/v1/models`, `/v1/chat/completions`, `/api/tags`, and `/api/generate`.
|
||||
| Item | Rule |
|
||||
| --- | --- |
|
||||
| `endpoint` | `http` or `https` on `127.0.0.1`, `[::1]`, or `localhost`, with path `/` or `/v1`. No credentials, query, or fragment. |
|
||||
| `route` | `/v1/models`, `/v1/chat/completions`, `/api/tags`, or `/api/generate`. |
|
||||
| `body` | Optional JSON text, at most 32 KiB. With a body, the host sends POST. Without one, it sends GET. |
|
||||
| `timeoutMs` | Default 5,000, from 100 to 15,000 milliseconds. The connection limit is 2 seconds. |
|
||||
| Response | At most 64 KiB for each line and 256 KiB in total. |
|
||||
| Concurrent requests | At most 16 across all windows. |
|
||||
|
||||
Only explicit loopback addresses are allowed. Redirects and system proxies are disabled. Request bodies and responses have size limits.
|
||||
The host does not follow redirects and does not use a system proxy. It sends no credentials.
|
||||
Abort stops the display at once. A blocked network read can continue until the request timeout.
|
||||
|
||||
The transport supports no remote credentials in this version. It is not a general HTTP API.
|
||||
## Trust
|
||||
|
||||
The host cancels display immediately. A blocked native read can continue until its bounded timeout.
|
||||
Plugins keep full application access. This API does not add a permission sandbox.
|
||||
The API does not include context sources, remote model servers, or credential storage.
|
||||
|
||||
## Current boundaries
|
||||
|
||||
Surface and provider APIs are available. Automatic context-source registration, remote adapters, and credential storage remain planned.
|
||||
|
||||
External plugins retain RuneStone's existing full-application trust level. This API does not add a permission sandbox.
|
||||
|
||||
See [the implementation](../src/lib/completion/contracts.ts), [host tests](../scripts/completion.spec.ts), and the [plugin trial guide](../../RuneStone_Local_Autocomplete/docs/trial-guide.md).
|
||||
For tests, see `scripts/completion.spec.ts`. For a provider plugin, see the [Local Autocomplete trial guide](https://git.knottywyvern.com/kwyvern/RuneStone_LocalModel/src/branch/main/docs/trial-guide.md).
|
||||
|
||||
+38
-43
@@ -1,25 +1,20 @@
|
||||
# Design decision log
|
||||
|
||||
[Interface design](ui-design.md) · [Agent instructions](../AGENTS.md)
|
||||
[Interface design](ui-design.md) · [Functional color](ui-color.md)
|
||||
|
||||
The design guide holds current rules. This log records intentional rule changes, recurring problems, and scoped exceptions for RuneStone and its plugins.
|
||||
An isolated correction belongs in its normal card or commit record. It does not need an entry here.
|
||||
This log records interface rule changes, recurring problems, and exceptions for RuneStone and its plugins. The [interface design guide](ui-design.md) holds the current rules and says when an entry is necessary.
|
||||
|
||||
## Use this log
|
||||
|
||||
Copy the matching template into Entries. Give each entry a unique sequential ID, such as UI-001, and a date.
|
||||
Replace every placeholder. Use relative links to guide sections, source files, and saved evidence where possible.
|
||||
Record missing evidence as pending. Do not claim acceptance or completed checks without evidence.
|
||||
For a rule change or exception, record the decision source, such as the user's direction or an accepted review.
|
||||
A proposed entry does not authorize a departure from the current guide.
|
||||
|
||||
Update the guide in the same change as an accepted rule change. Summarize an active exception beside its affected rule and link its entry.
|
||||
Record the scope as the app, named plugins, or specific controls. Avoid silently extending a local decision to every plugin.
|
||||
For recurring problems, link separate occurrences or a regression after a prior correction. Record unknown causes as unknown.
|
||||
Update an existing problem entry when it recurs. Mark it resolved only after the prevention action and relevant check pass.
|
||||
Keep earlier decisions when a later entry replaces them. Mark them superseded and link the replacement in both directions.
|
||||
When an exception ends, mark it retired and remove its active exception note from the guide.
|
||||
Entry status describes the record. It does not move a Kanban card to Done or replace user acceptance.
|
||||
- Copy the matching template to the end of Entries. Give the entry the next free ID (UI-NNN) and a date. Replace every placeholder.
|
||||
- Link guide sections, source files, cards, and saved evidence. Record missing evidence as pending. Do not claim a check or an acceptance without evidence.
|
||||
- Record the decision source of a rule change or an exception, such as the user's direction or an accepted review.
|
||||
- State the scope: the app, named plugins, or specific controls. Do not extend a local decision to every plugin.
|
||||
- Rule change: update the guide in the same change.
|
||||
- Recurring problem: update the existing entry when the problem returns. Mark it resolved only after the prevention and its check pass. Record an unknown cause as unknown.
|
||||
- Exception: put a short note beside the affected rule in the guide and link the entry. When the exception ends, mark it retired and remove the note.
|
||||
- Keep replaced entries. Mark them superseded and link old and new entries in both directions.
|
||||
- Entry status describes the record only. It does not move a card to Done or replace the user's acceptance.
|
||||
|
||||
## Templates
|
||||
|
||||
@@ -32,14 +27,14 @@ Entry status describes the record. It does not move a Kanban card to Done or rep
|
||||
- Date: YYYY-MM-DD
|
||||
- Status: Proposed / Accepted / Superseded
|
||||
- Decision source: User direction or review link
|
||||
- Previous rule: Prior behavior and guide section
|
||||
- New rule: Chosen behavior and current guide section
|
||||
- Reason: User benefit and relevant design principle
|
||||
- Scope: App, named plugins, and affected controls
|
||||
- Previous rule: Old behavior and guide section
|
||||
- New rule: New behavior and guide section
|
||||
- Reason: User benefit and design principle
|
||||
- Scope: App, plugins, and controls
|
||||
- Shared implementation: Component or token paths
|
||||
- Exceptions: None, or linked exception entries
|
||||
- Evidence: Reference images, check results, and review link, or pending items
|
||||
- Replaces / replaced by: None, or linked entries
|
||||
- Exceptions: None, or entry links
|
||||
- Evidence: Screenshots, check results, review link, or pending
|
||||
- Replaces / replaced by: None, or entry links
|
||||
```
|
||||
|
||||
### Recurring problem
|
||||
@@ -50,15 +45,15 @@ Entry status describes the record. It does not move a Kanban card to Done or rep
|
||||
- Type: Recurring problem
|
||||
- Date: YYYY-MM-DD
|
||||
- Status: Open / Resolved
|
||||
- Existing rule: Link to the rule that still applies
|
||||
- Scope: App, named plugins, and affected controls
|
||||
- Occurrences: Links to repeated violations or a regression and its prior correction
|
||||
- Cause: Evidence for the cause, or unknown with the next investigation step
|
||||
- Correction: How the current violation returns to the existing rule
|
||||
- Prevention: Shared component change, override removal, check, or needed rule clarification
|
||||
- Check: How to detect recurrence and the actual result, or pending
|
||||
- Evidence: Reference images and card, commit, or review links
|
||||
- Resolution / recurrence: Date and result, or pending. Reopen this entry if the problem returns.
|
||||
- Existing rule: Guide section that still applies
|
||||
- Scope: App, plugins, and controls
|
||||
- Occurrences: Links to each violation, or to the regression and its earlier fix
|
||||
- Cause: Evidence, or unknown and the next investigation step
|
||||
- Correction: How this occurrence returns to the rule
|
||||
- Prevention: Shared component change, override removal, check, or rule clarification
|
||||
- Check: How to detect a recurrence, and the result or pending
|
||||
- Evidence: Screenshots and card, commit, or review links
|
||||
- Resolution / recurrence: Date and result, or pending
|
||||
```
|
||||
|
||||
### Exception
|
||||
@@ -72,13 +67,13 @@ Entry status describes the record. It does not move a Kanban card to Done or rep
|
||||
- Decision source: User direction or review link
|
||||
- Current rule: Guide section and its exception note
|
||||
- Departure: Exact difference from the rule
|
||||
- User benefit: Why the standard pattern does not meet this need
|
||||
- Scope: Specific app or plugin controls and states where the exception applies
|
||||
- Shared implementation: Component or token paths and why a local difference is necessary
|
||||
- Review: Responsible person or role, plus a date or concrete trigger
|
||||
- Exit condition: When the standard pattern can replace the exception
|
||||
- Evidence: Reference images, accessibility and interaction checks, or pending items
|
||||
- Replaces / replaced by: None, or linked entries
|
||||
- User benefit: Why the standard pattern does not meet the need
|
||||
- Scope: Controls and states
|
||||
- Shared implementation: Component or token paths, and why a local difference is necessary
|
||||
- Review: Owner, and a date or trigger
|
||||
- Exit condition: When the standard pattern can return
|
||||
- Evidence: Screenshots, accessibility and interaction checks, or pending
|
||||
- Replaces / replaced by: None, or entry links
|
||||
```
|
||||
|
||||
## Entries
|
||||
@@ -140,7 +135,7 @@ Entry status describes the record. It does not move a Kanban card to Done or rep
|
||||
- Scope: Host action menus and plugin menus that use the host API, including theme, appearance, board, and list menus.
|
||||
- Shared implementation: [actionMenu.ts](../src/lib/ui/actionMenu.ts), [menu.css](../src/lib/ui/menu.css), and the `--rs-menu-*` tokens in [tokens.css](../src/lib/theme/tokens.css).
|
||||
- Exceptions: None. Existing older-host plugin fallbacks remain available.
|
||||
- Evidence: The [card reference](../output/pass3-ref-0ce1efe3-7e2a-40a8-99bb-64215aa9d977.png). Shared menu checks passed in both themes. Further screenshots accompany the card review.
|
||||
- Evidence: The card reference image `pass3-ref-0ce1efe3` (local `output/` file, not in the repository). Shared menu checks passed in both themes. Further screenshots accompany the card review.
|
||||
- Replaces / replaced by: The outline and radio presentation changed in [UI-003](#ui-003--quiet-menu-choices). Other rules remain.
|
||||
|
||||
### UI-001 — Separate design decisions from routine corrections
|
||||
@@ -150,10 +145,10 @@ Entry status describes the record. It does not move a Kanban card to Done or rep
|
||||
- Status: Accepted
|
||||
- Decision source: The user's request to implement this policy in the guide, agent instructions, and decision log.
|
||||
- Previous rule: The guide required UI review evidence but did not distinguish corrections, rule changes, recurring problems, and exceptions.
|
||||
- New rule: Use the [record categories](ui-design.md#current-rules-and-decision-history) and templates above. Keep current design rules in the guide.
|
||||
- New rule: Use the [record categories](ui-design.md#decision-records) and templates above. Keep current design rules in the guide.
|
||||
- Reason: Preserve useful design history without a log entry for every isolated correction.
|
||||
- Scope: Documentation and review workflow for the app and its plugins.
|
||||
- Shared implementation: [Agent instructions](../AGENTS.md#ui-work-record-design-decisions) and [review evidence](ui-design.md#evidence-for-review). No component or token change.
|
||||
- Shared implementation: [Decision records](ui-design.md#decision-records) and [review evidence](ui-design.md#review-checklist). No component or token change.
|
||||
- Exceptions: None.
|
||||
- Evidence: The user's explicit instruction in this chat. This entry changes documentation policy and has no visual reference image.
|
||||
- Replaces / replaced by: None.
|
||||
@@ -505,7 +500,7 @@ Replaced by: [UI-024](#ui-024--assertive-functional-color-by-default) strengthen
|
||||
- Scope: RuneStone and all plugins. The user's global skill applies the same preference to other UI work within its stated scope.
|
||||
- Shared implementation: [Functional color requirements](ui-color.md), theme tokens, project agent instructions, and the global ui-functional-color skill.
|
||||
- Exceptions: Explicit user direction and approved project exceptions retain their scope. Readability remains required.
|
||||
- Evidence: The [October 13 review](menu-audit.md), cards 093e372f and 4bb33e4f, and the user's direction in this chat.
|
||||
- Evidence: The [October 13 review](archive/menu-audit-2026-10-13.md), cards 093e372f and 4bb33e4f, and the user's direction in this chat.
|
||||
- Limits: This policy cannot guarantee future adherence. Reviews still need measured values and rendered screenshots.
|
||||
- Replaces: [UI-022](#ui-022--functional-color-without-an-artificial-ceiling) for the strength of the default and required evidence.
|
||||
- Release impact: Documentation and instructions only. No version or artifact change.
|
||||
|
||||
+162
-195
@@ -1,185 +1,159 @@
|
||||
# Development guide
|
||||
|
||||
[RuneStone](../README.md) · [Interface design](ui-design.md) · [Build and package](builds.md) · [Plugin development](plugin-development.md)
|
||||
[RuneStone](../README.md) · [Builds](builds.md) · [Releases](releases.md) · [Plugin development](plugin-development.md) · [Interface design](ui-design.md)
|
||||
|
||||
For task-based app help, use the [user guide](user-guide.md).
|
||||
Dated implementation records and proposals live in the [archive](archive/README.md).
|
||||
|
||||
## Test changes without a full rebuild
|
||||
|
||||
From the repository folder, run:
|
||||
|
||||
```powershell
|
||||
pnpm tauri dev
|
||||
```
|
||||
|
||||
For a fresh checkout, complete [Run from source](#run-from-source) first.
|
||||
|
||||
This command starts Vite and opens RuneStone in a native desktop window.
|
||||
Keep the terminal open while you edit the source.
|
||||
Svelte, TypeScript, and CSS changes update through hot module replacement (HMR), or a page reload when required.
|
||||
Frontend changes do not need a Rust rebuild or an installer.
|
||||
|
||||
The first launch compiles the Rust app and its dependencies.
|
||||
Later launches reuse Cargo's cached output.
|
||||
Rust changes still need compilation, but Cargo reuses unchanged build output.
|
||||
Tauri then restarts the app automatically.
|
||||
See [Tauri development](https://v2.tauri.app/develop/) and [Vite HMR](https://vite.dev/guide/features.html#hot-module-replacement) for details.
|
||||
|
||||
### Daily workflow
|
||||
|
||||
1. Start `pnpm tauri dev` in a terminal at the repository root.
|
||||
2. Open a test workspace with the folder button in the development window.
|
||||
3. Edit a source file in your code editor.
|
||||
4. Save the source file, then test the change in the development window.
|
||||
5. To stop the development session, press Ctrl+C in its terminal.
|
||||
|
||||
Use sample documents for feature tests. The desktop app reads and writes real files.
|
||||
Save open documents before a change that reloads or restarts the app.
|
||||
A reload can reset editor state, and a Rust restart ends terminal sessions.
|
||||
|
||||
`pnpm tauri dev` starts `pnpm dev` through `beforeDevCommand` in `src-tauri/tauri.conf.json`.
|
||||
Do not start a separate `pnpm dev` process for this workflow.
|
||||
The frontend uses port 1420, and Tauri loads `http://localhost:1420`.
|
||||
|
||||
### What needs a rebuild?
|
||||
|
||||
| Change or task | Action |
|
||||
| --- | --- |
|
||||
| Svelte, TypeScript, or CSS under `src/` | Save the source file. Vite updates the interface without a Rust rebuild. |
|
||||
| Plugin source in a sibling checkout | Run its documented checks and package command, then install the changed ZIP through Settings. |
|
||||
| Table Formulas source in `../RuneStone_Table_Formulas/` | Install that checkout's dependencies, then run `pnpm build:plugins` in RuneStone. Reinstall the changed ZIP through Settings. |
|
||||
| Rust code under `src-tauri/src/` | Save the source file. Tauri rebuilds the changed Rust code and restarts the app. |
|
||||
| Rust dependencies or build settings | Allow Cargo to compile the affected dependencies. These changes can take longer. |
|
||||
| JavaScript dependencies after a pull or branch change | Stop development, run `pnpm install --frozen-lockfile`, then start `pnpm tauri dev` again. |
|
||||
| Tauri configuration, capabilities, or Vite configuration | Restart `pnpm tauri dev` to check the new settings. Native changes can require compilation. |
|
||||
| Release or installer behavior | Use the [build guide](builds.md). Packaging requires a release build. |
|
||||
|
||||
Keep `src-tauri/target/` between sessions so Cargo can reuse its build cache.
|
||||
Do not run `cargo clean` as part of normal feature tests.
|
||||
An installed copy from the Start menu uses its packaged code and does not show source changes.
|
||||
Use the window that `pnpm tauri dev` opens.
|
||||
|
||||
## Stack
|
||||
|
||||
RuneStone uses Tauri 2 and Rust for the desktop host.
|
||||
The interface uses Svelte 5, TypeScript, and Vite.
|
||||
CodeMirror handles live Markdown editing, Monaco handles source editing, and xterm handles terminals.
|
||||
Windows is the first target. The older WriterHost component remains unused.
|
||||
|
||||
Use the [Linux development guide](linux.md) for source prerequisites, Browser preparation, and native desktop checks.
|
||||
Use the [Linux package build guide](builds.md#build-linux-packages) for Debian and AppImage builds.
|
||||
|
||||
See the setup steps below to install dependencies and run the desktop app.
|
||||
See the [user guide](user-guide.md) for current behavior and limits.
|
||||
See the [interface design reference](ui-design.md) for shared controls, dimensions, and visual checks. Agent instructions live in [AGENTS.md](../AGENTS.md).
|
||||
Use the [plugin development reference](plugin-development.md) for build examples, package requirements, releases, and the API.
|
||||
Use the [plugin host reference](plugin-host.md) for installation internals, recovery, and host checks.
|
||||
|
||||
## Product boundaries
|
||||
|
||||
RuneStone keeps workspace documents as ordinary local files.
|
||||
Basic Markdown table editing and rendering belong in the core.
|
||||
Users must retain access to workspace files when plugins are disabled.
|
||||
Store workspace display order, pins, and bookmarks in `.runestone/`.
|
||||
Store installed plugins and retained plugin settings in application data. See [plugin storage](plugin-host.md#storage-and-recovery).
|
||||
Prefer a local Git clone. Do not use a live network share as the sync path.
|
||||
|
||||
Native file access, file watching, search, Git, and terminal services belong in Rust.
|
||||
The [plugin development reference](plugin-development.md) defines the supported package format and host API.
|
||||
The [built-in browser runtime](#built-in-browser-runtime) has its own architecture and setup requirements.
|
||||
|
||||
The following remain outside the product scope:
|
||||
|
||||
- A plugin marketplace
|
||||
- Obsidian or VS Code plugin compatibility
|
||||
- Cloud sync, live collaboration, or mobile
|
||||
- A debugger or a full IDE
|
||||
- Auto-commit on save
|
||||
|
||||
Track future work and roadmaps in RuneStone Project Management.
|
||||
This guide is for developers who change RuneStone's source code. To use the app, see the [user guide](user-guide.md).
|
||||
|
||||
## Run from source
|
||||
|
||||
These steps are for developers. App users can use a supplied [Windows installer](installation.md). Linux and macOS source setup remains experimental.
|
||||
|
||||
### Requirements
|
||||
|
||||
- Node.js 24 and pnpm 10
|
||||
- A current stable Rust toolchain
|
||||
- Microsoft C++ Build Tools and Microsoft Edge WebView2 on Windows
|
||||
- Node.js 24 or later, and pnpm 10.
|
||||
- A current stable Rust toolchain.
|
||||
- The [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) for your platform.
|
||||
On Windows, these are the Microsoft C++ Build Tools and WebView2.
|
||||
On Linux, use the [Linux development guide](linux.md).
|
||||
|
||||
Use the [Tauri prerequisites guide](https://v2.tauri.app/start/prerequisites/) for native build dependencies.
|
||||
The [installation guide](installation.md) has separate Windows, Linux, and macOS routes.
|
||||
### First run
|
||||
|
||||
1. Download or clone this repository.
|
||||
2. Open a terminal in the repository folder.
|
||||
3. Run `pnpm install --frozen-lockfile`.
|
||||
4. Prepare the built-in Browser runtime using the [runtime steps](#built-in-browser-runtime) below.
|
||||
5. Run `pnpm tauri dev`.
|
||||
6. Use the folder button in the app to open a workspace or create one.
|
||||
1. Clone the repository: `https://git.knottywyvern.com/kwyvern/RuneStone`.
|
||||
2. In the repository folder, run `pnpm install --frozen-lockfile`.
|
||||
3. Prepare the browser runtime. See [Built-in browser runtime](#built-in-browser-runtime).
|
||||
4. Run `pnpm tauri dev`.
|
||||
5. In the app, use the folder button to open a test workspace.
|
||||
|
||||
See the [build guide](builds.md) to build a Windows installer.
|
||||
The first launch compiles the Rust app and its dependencies. Later launches reuse the Cargo cache in `src-tauri/target/`.
|
||||
Do not run `cargo clean` as part of normal work.
|
||||
|
||||
## Daily workflow
|
||||
|
||||
`pnpm tauri dev` starts Vite on port 1420 through `beforeDevCommand` in `src-tauri/tauri.conf.json`. Then it opens the app in a native window.
|
||||
Do not start a separate `pnpm dev` for this workflow.
|
||||
|
||||
| Change | What happens |
|
||||
| --- | --- |
|
||||
| Svelte, TypeScript, or CSS in `src/` | Vite updates the window. No Rust build. |
|
||||
| Rust code in `src-tauri/src/` | Cargo rebuilds the changed code, and Tauri restarts the app. |
|
||||
| Rust dependencies or build settings | Cargo compiles the affected crates. This can take several minutes. |
|
||||
| JavaScript dependencies, after a pull | Stop the session, run `pnpm install --frozen-lockfile`, and start it again. |
|
||||
| Tauri configuration, capabilities, or Vite configuration | Restart `pnpm tauri dev`. |
|
||||
| A plugin in a sibling repository | Build and package that plugin, then install the new ZIP through Settings. See [Build examples](plugin-development.md#build-examples). |
|
||||
| Installer or release behavior | Use the [build guide](builds.md). |
|
||||
|
||||
The app reads and writes real files. Use a test workspace with sample documents.
|
||||
Save open documents before a change that restarts the app. A Rust restart ends terminal sessions.
|
||||
An installed copy of RuneStone does not show source changes. Use the window that `pnpm tauri dev` opens.
|
||||
|
||||
To see frontend errors, press Ctrl+Shift+I in the development window to open the web inspector.
|
||||
Rust errors appear in the terminal that runs `pnpm tauri dev`.
|
||||
|
||||
## Architecture
|
||||
|
||||
RuneStone is a Tauri 2 app. A Rust host gives native services to a Svelte 5 and TypeScript interface.
|
||||
CodeMirror drives the Writer view, and Monaco drives the source editor.
|
||||
Windows is the primary platform. macOS and Linux builds are experimental.
|
||||
|
||||
### Desktop host: `src-tauri/src/`
|
||||
|
||||
| Module | Responsibility |
|
||||
| --- | --- |
|
||||
| `lib.rs` | App setup, command registration, window events |
|
||||
| `workspace.rs` | The workspace root of each window, path checks, atomic saves, the file watcher, search |
|
||||
| `plugins.rs` | Plugin package review, installation, enable state, removal, and recovery |
|
||||
| `plugin_sources.rs` | Plugin downloads from Gitea releases |
|
||||
| `git.rs` | The Git service for the Git plugin. It runs the `git` program. |
|
||||
| `pty.rs`, `terminal_platform.rs` | Pseudo-terminals for the Terminal plugin |
|
||||
| `browser.rs` | The process of the built-in browser engine |
|
||||
| `backgrounds.rs` | Background image folders for themes and plugins |
|
||||
| `spelling.rs` | Spelling suggestions from the operating system (Windows) |
|
||||
| `settings.rs`, `theme.rs` | The Settings window and theme export |
|
||||
| `completion.rs` | A local proxy to a completion model server |
|
||||
|
||||
The interface calls Rust commands through Tauri `invoke`. Most calls go through the wrappers in `src/lib/workspace/api.ts`.
|
||||
A new command needs an entry in `generate_handler!` in `lib.rs`, in the command list in `src-tauri/build.rs`, and in the capability files in `src-tauri/capabilities/`.
|
||||
|
||||
### Interface: `src/lib/`
|
||||
|
||||
| Folder | Responsibility |
|
||||
| --- | --- |
|
||||
| `layout/` | The app shell (`Workbench.svelte`), the file tree, tabs, panes, Settings, and dialogs |
|
||||
| `editor/` | The Writer view (`LiveWriter.svelte`), the source editor (`EditorHost.svelte`), tables, links, images, and editor menus |
|
||||
| `workspace/` | Tauri wrappers, document buffers, the note index and backlinks, paths, and templates |
|
||||
| `plugins/` | The plugin runtime, the SDK types (`sdk.ts`), and Settings → Plug-ins |
|
||||
| `browser/` | The interface of the built-in browser |
|
||||
| `completion/`, `git/` | Contracts and services that plugins use |
|
||||
| `theme/` | Appearance settings, palettes, and the theme tokens (`tokens.css`) |
|
||||
| `ui/` | Shared menus, pickers, and action icons |
|
||||
| `i18n/` | Interface text in English, French, Japanese, and Simplified Chinese |
|
||||
|
||||
### Other folders
|
||||
|
||||
| Folder | Content |
|
||||
| --- | --- |
|
||||
| `browser-runtime/` | The browser engine, its tests, filter lists, and third-party notices |
|
||||
| `scripts/` | Unit tests (`*.spec.ts`), browser smoke tests (`*.smoke.mjs`), and build and package tools |
|
||||
| `fixtures/` | Sample documents, a sample plugin, and a completion test page |
|
||||
| `docs/` | User and developer documentation |
|
||||
|
||||
### Where data lives
|
||||
|
||||
| Data | Location |
|
||||
| --- | --- |
|
||||
| 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). |
|
||||
|
||||
## Product boundaries
|
||||
|
||||
- Workspace documents stay ordinary local files. Users keep access to them when plugins are disabled.
|
||||
- The core includes basic Markdown table editing and rendering.
|
||||
- Native file access, file watching, search, Git, and terminals belong in Rust.
|
||||
- Optional features ship as plugins. The [plugin development reference](plugin-development.md) defines the package format and the API.
|
||||
- For sync, prefer a local Git clone. Do not use a live network share as the sync path.
|
||||
|
||||
These stay outside the product:
|
||||
|
||||
- A plugin marketplace
|
||||
- Compatibility with Obsidian or VS Code plugins
|
||||
- Cloud sync, live collaboration, or a mobile app
|
||||
- A debugger or a full IDE
|
||||
- Automatic commits on save
|
||||
|
||||
Track plans and roadmaps in RuneStone Project Management, not in these docs.
|
||||
|
||||
## Checks
|
||||
|
||||
Run checks from the repository folder in a second terminal.
|
||||
These commands do not require an installer.
|
||||
Run these commands from the repository folder. They do not need an installer.
|
||||
|
||||
For type errors while you edit:
|
||||
| Command | Checks |
|
||||
| --- | --- |
|
||||
| `pnpm check` | Svelte and TypeScript types |
|
||||
| `pnpm test` | Unit tests in `scripts/*.spec.ts` |
|
||||
| `cargo test --manifest-path src-tauri/Cargo.toml --lib` | Rust unit tests |
|
||||
| `pnpm build` | The production frontend build |
|
||||
| `pnpm check:menus` | The inventory of menu surfaces. See [Interface design](ui-design.md). |
|
||||
|
||||
```powershell
|
||||
pnpm check:watch
|
||||
```
|
||||
To run one test file, use `node --experimental-strip-types --test scripts/tableSelection.spec.ts`.
|
||||
For type errors while you edit, run `pnpm check:watch`.
|
||||
|
||||
For one test file:
|
||||
Some tests need files from outside this repository:
|
||||
|
||||
```powershell
|
||||
node --experimental-strip-types --test scripts/tableSelection.spec.ts
|
||||
```
|
||||
|
||||
For the full set of checks:
|
||||
|
||||
```sh
|
||||
pnpm build:plugins
|
||||
pnpm check
|
||||
pnpm test
|
||||
pnpm build
|
||||
cargo test --manifest-path src-tauri/Cargo.toml --lib --offline
|
||||
```
|
||||
|
||||
The offline Rust command requires cached dependencies. Omit `--offline` if Cargo needs to download them.
|
||||
`pnpm build` checks the production frontend build. It is not required after each source edit.
|
||||
`pnpm preview` serves the last frontend build and does not watch source changes.
|
||||
Use `pnpm tauri build` to build the release desktop app.
|
||||
|
||||
The Rust tests cover real terminal shells, working directories, Unicode output,
|
||||
resizing, exit status, and session termination. Native terminal tests launch each
|
||||
detected shell profile and check shell prompt integration.
|
||||
- `scripts/plugins.spec.ts` and `scripts/tableFormulas.spec.ts` import the compiled Table Formulas package. Run `pnpm build:plugins` first. See [Build examples](plugin-development.md#build-examples).
|
||||
- `scripts/installerVersion.spec.ts` needs the NSIS compiler that the Tauri CLI downloads on Windows.
|
||||
- The Rust terminal tests start the real shells on the computer.
|
||||
|
||||
## Browser smoke tests
|
||||
|
||||
`pnpm dev` starts only the Vite server at `http://127.0.0.1:1420`.
|
||||
A browser can show the interface, but real folder access, file writes, and terminals require the desktop host.
|
||||
Use `pnpm tauri dev` for manual tests of those features.
|
||||
Smoke tests run the real interface in headless Chromium with a mock of the desktop host.
|
||||
They do not replace tests in the native app. Real folder access, file writes, and terminals need `pnpm tauri dev`.
|
||||
|
||||
Before tests that use plugin packages, build each required plugin with its own command.
|
||||
Use the [Table Formulas example](plugin-development.md#example-table-formulas) and the [Terminal example](plugin-development.md#example-terminal).
|
||||
`pnpm build:plugins` builds only Table Formulas.
|
||||
See the [plugin host checks](plugin-host.md#modules-and-checks) for compiled package paths and overrides.
|
||||
These tests load the compiled packages through the production module loader.
|
||||
The browser tests use the real interface with mocked desktop communication.
|
||||
They do not replace native desktop tests.
|
||||
1. Make Playwright available. It is not a project dependency.
|
||||
Set `PLAYWRIGHT_MODULE` to the folder of an installed `playwright` package.
|
||||
If that package has no Chromium, set `CHROME_PATH` to an installed browser.
|
||||
2. Start the frontend with `pnpm dev`, or use the server of a running `pnpm tauri dev` session.
|
||||
3. In a second terminal, run one script, for example `node scripts/workbench.smoke.mjs`.
|
||||
|
||||
1. Install Playwright, or set `PLAYWRIGHT_MODULE` to a shared Playwright package.
|
||||
2. Start the frontend with `pnpm dev`, or reuse the server from an active `pnpm tauri dev` session.
|
||||
3. In a second terminal, run a smoke script, such as `node scripts/workbench.smoke.mjs`.
|
||||
|
||||
Playwright is not a dependency in `package.json`.
|
||||
Set `PLAYWRIGHT_MODULE` to the absolute path of an existing Playwright package if you use a shared installation.
|
||||
That package must have Chromium installed, or you must select an installed browser with `CHROME_PATH`.
|
||||
|
||||
For example, in PowerShell, replace these example paths with your local paths:
|
||||
Example for PowerShell. Replace the paths with your own:
|
||||
|
||||
```powershell
|
||||
$env:PLAYWRIGHT_MODULE = "C:\tools\browser-tests\node_modules\playwright"
|
||||
@@ -187,46 +161,39 @@ $env:CHROME_PATH = "C:\Program Files\Google\Chrome\Application\chrome.exe"
|
||||
node scripts/workbench.smoke.mjs
|
||||
```
|
||||
|
||||
| Script | Coverage |
|
||||
| Variable | Use |
|
||||
| --- | --- |
|
||||
| `scripts/workbench.smoke.mjs` | The Svelte, Monaco, and xterm interface |
|
||||
| `scripts/pluginInstall.smoke.mjs` | Package review, external commands and views, the uninstall confirmation, and cleanup |
|
||||
| `scripts/plugins.smoke.mjs` | Plugin toggles, formula source preservation, terminal cleanup, and preferences across windows |
|
||||
| `../RuneStone_Terminal/scripts/terminal.smoke.mjs` | Terminal groups, single-session layout, menus, profiles, history, tasks, settings, and editor actions |
|
||||
| `scripts/images.smoke.mjs` | Image drops, clipboard imports, source editing, zoom, undo, failed writes, and tab changes during imports |
|
||||
| `scripts/imageNavigation.smoke.mjs` | Navigator pointer drags, hidden image source, selection, context actions, inline/reference images, and drag cancellation |
|
||||
| `SMOKE_URL` | The frontend address. The default is `http://127.0.0.1:1420`. |
|
||||
| `RUNESTONE_TERMINAL_DIST` | The compiled Terminal plugin. The default is `../RuneStone_Terminal/dist`. |
|
||||
| `RUNESTONE_TABLE_FORMULAS_ROOT`, `RUNESTONE_GIT_ROOT` | Sibling plugin checkouts in other folders |
|
||||
|
||||
Additional smoke scripts live in `scripts/`.
|
||||
Smoke tests for plugins load compiled packages through the real module loader. Build those plugins first.
|
||||
`browserInteraction.smoke.mjs` and `browserFields.smoke.mjs` also start the browser engine from `browser-runtime`.
|
||||
|
||||
A few scripts attach to a running desktop app instead, through the WebView2 remote-debugging port.
|
||||
Examples: `spellingNative.smoke.mjs`, `kanbanNative.smoke.mjs`, and `browserNativeAcceptance.mjs`.
|
||||
Before you start the app, set `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=<port>`. Each script states its port and variables at the top.
|
||||
|
||||
## Built-in browser runtime
|
||||
|
||||
The browser interface is in `src/lib/browser/`. The browser engine, its tests, and its notices are in `browser-runtime/`.
|
||||
The installer includes the staged engine from `src-tauri/browser-engine/`.
|
||||
|
||||
1. Run `npm ci --prefix browser-runtime`.
|
||||
2. Run `pnpm browser:check` and `pnpm browser:test`.
|
||||
3. Run `pnpm browser:test:engine` for the native engine tests.
|
||||
4. Run `npm --prefix browser-runtime run package`.
|
||||
5. Run `pnpm browser:stage` before you build an installer.
|
||||
|
||||
Each browser window gets a session token at startup. Native requests check that token, and cleanup revokes it.
|
||||
|
||||
## Development help
|
||||
|
||||
| Problem | Action |
|
||||
| --- | --- |
|
||||
| Port 1420 is already in use | Stop the other RuneStone development server in its terminal, then retry. Vite uses a fixed port. |
|
||||
| The app still shows the old interface | Use the development window. Check the terminal for compile errors, then restart the development command if needed. |
|
||||
| Browser view says desktop features require `pnpm tauri dev` | Start that command and use its native window for real workspace and terminal tests. |
|
||||
| Windows cannot find `link.exe`, or Rust cannot link the app | Install the C++ build tools and Windows SDK from the Tauri prerequisites guide above. Open a new terminal. |
|
||||
| A smoke test cannot find Playwright or Chromium | Set `PLAYWRIGHT_MODULE` to an installed package. Install its Chromium browser or set `CHROME_PATH`. |
|
||||
| Cargo reports missing dependencies with `--offline` | Run the command without `--offline` while connected to the internet. |
|
||||
|
||||
Read Rust errors in the terminal that runs `pnpm tauri dev`.
|
||||
In the Windows development window, press Ctrl+Shift+I to open the web inspector.
|
||||
Use its console for frontend errors.
|
||||
See [Tauri's inspector instructions](https://v2.tauri.app/develop/#opening-the-web-inspector).
|
||||
## Built-in browser runtime
|
||||
|
||||
The browser interface lives in `src/lib/browser`. Its Electron runtime, tests, assets, and third-party notices live in `browser-runtime`.
|
||||
The host no longer needs a sibling Browser checkout. Keep the old checkout until its local work and history no longer need preservation.
|
||||
|
||||
1. Run `npm ci --prefix browser-runtime` to install the pinned runtime dependencies.
|
||||
2. Run `pnpm browser:check` and `pnpm browser:test` for source checks.
|
||||
3. Run `pnpm browser:test:engine` for native Electron checks.
|
||||
4. Run `npm --prefix browser-runtime run package` to prepare the runtime.
|
||||
5. Run `pnpm browser:stage` before a host installer build.
|
||||
|
||||
Runtime compilation and staging do not produce a new RuneStone installer version.
|
||||
The installer includes the staged runtime from `src-tauri/browser-engine`. Follow the project version policy when creating that installer.
|
||||
Use `scripts/browserInteraction.smoke.mjs` to check the host interface against a real runtime.
|
||||
Keep its results separate from the native Tauri window checks.
|
||||
|
||||
Browser startup obtains a session token for its window. Native requests check that token, and cleanup revokes it.
|
||||
| Port 1420 is in use | Stop the other development server, then try again. Vite uses a fixed port. |
|
||||
| The window shows the old interface | Look for compile errors in the terminal. Restart `pnpm tauri dev` if necessary. |
|
||||
| A page says that desktop features need `pnpm tauri dev` | You opened the Vite server in a browser. Use the native window. |
|
||||
| Windows cannot find `link.exe` | Install the C++ build tools and the Windows SDK from the Tauri prerequisites. Open a new terminal. |
|
||||
| A smoke test cannot find Playwright or Chromium | Set `PLAYWRIGHT_MODULE`. Install its Chromium, or set `CHROME_PATH`. |
|
||||
| `cargo test --offline` reports missing crates | Run the command without `--offline` one time while you are online. |
|
||||
|
||||
@@ -1,86 +1,108 @@
|
||||
# Images, diagrams, and tables
|
||||
|
||||
[User guide](../user-guide.md) · [Terminal guide](terminal.md)
|
||||
[RuneStone](../../README.md) · [User guide](../user-guide.md)
|
||||
|
||||
This guide explains how to insert and edit images, read diagrams, edit Markdown tables, and calculate in tables.
|
||||
|
||||
## Insert and edit images
|
||||
|
||||
Drag a workspace image from the navigator into a Markdown editor to insert a
|
||||
relative link to the existing file. An “Insert image” hint marks the editor.
|
||||
Escape cancels the drag. Dropping files from the system file explorer or pasting
|
||||
images copies them into `attachments/` with unique filenames. Undo removes the
|
||||
inserted links while keeping the image files.
|
||||
| Source | Result |
|
||||
| --- | --- |
|
||||
| Drag an image from the navigator into a Markdown editor | RuneStone inserts a relative link to the existing file. Press Escape to cancel the drag. |
|
||||
| Drop an image from your system file manager, or paste an image | RuneStone copies the image into the workspace `attachments/` folder with a unique name, then inserts a link. |
|
||||
|
||||
In Writer, image Markdown stays hidden until you choose **Edit image source**. The image remains visible while you edit. Hide it again with the same button,
|
||||
Escape, or by moving the cursor away. Click an image to select it, then
|
||||
right-click or press Shift+F10 for copy image, copy Markdown, swap image, remove
|
||||
image, zoom, edit source, open in a new tab, copy path, and show in Explorer.
|
||||
Remove image or Delete removes only that embed from the note and supports undo.
|
||||
Zoom supports fit, magnification and Escape to close, including in Split and Read.
|
||||
Undo removes the inserted link. It keeps the image file.
|
||||
|
||||
## Edit table contents
|
||||
In Writer, the image shows and its Markdown stays hidden. To edit the Markdown, choose **Edit image source**. To hide it again, choose the same button, press Escape, or move the cursor away.
|
||||
|
||||
Tables keep readable column widths and render `<br>` as cell line breaks.
|
||||
Hover beside a table's right edge to add a column, or below its bottom edge to
|
||||
add a row. Clicking a cell edits its contents. Wide tables scroll within the document.
|
||||
Select an image, then right-click it or press Shift+F10 for these actions:
|
||||
|
||||
### Move rows or columns
|
||||
- **Copy image**, **Copy Markdown**, **Swap image…**, and **Remove image**
|
||||
- **Zoom in**, **Edit image source**, and **Open in new tab**
|
||||
- **Copy path** and **Show in Explorer**, for workspace images
|
||||
|
||||
Grips appear on hover or keyboard focus above columns and beside body rows.
|
||||
Drag a grip to reorder: a preview follows the pointer, the source row/column
|
||||
stays highlighted, and a line marks the drop position. Drag near an edge
|
||||
to scroll, or press Escape to cancel. Focus a grip and use arrow keys to move it.
|
||||
Row moves keep the Markdown header fixed. Columns carry their alignment with them.
|
||||
|
||||
### Select, copy, or format cells
|
||||
|
||||
Drag across cells or Shift+click to select a rectangle, then right-click for
|
||||
cut/copy/paste, bold, italic, strikethrough, highlight, code, math, comment,
|
||||
clear formatting, alignment, clear cells, and delete cells. Clipboard shortcuts,
|
||||
Ctrl+B/I, Shift+arrow selection, and undo/redo work on the selected cells.
|
||||
TSV or Markdown tables paste as a grid and expand the table when needed.
|
||||
Alignment applies to selected columns, as required by Markdown. Clear empties
|
||||
contents; Delete removes complete selected rows/columns, or shifts a partial
|
||||
selection left. Math stores inline `$…$` syntax. Comments use `%%…%%` and are
|
||||
hidden in Read mode. Each operation can be undone in one step.
|
||||
|
||||
### Work with text inside a cell
|
||||
|
||||
Right-clicking text within a cell preserves the selected words and offers note
|
||||
links, external links, workspace search, extraction to a new note, formatting,
|
||||
rich/plain-text paste, and Select all. Extraction saves the selected Markdown
|
||||
in a new file and replaces the selection with a note link. Undo restores the
|
||||
original text without deleting the new note. Row and Column submenus insert,
|
||||
move, duplicate, and delete at the clicked cell. Column moves keep alignment. Sorting is stable and natural (2 before 10), leaves blanks last, and keeps the
|
||||
header fixed. Context-menu actions and table edge buttons have matching icons.
|
||||
|
||||
## Calculate with Table Formulas
|
||||
|
||||
Install and enable the optional Table Formulas plugin before using these calculations.
|
||||
|
||||
Table Formulas start with `=`: for example, `=B2+C2`, `=AVERAGE(B2:C2)`,
|
||||
`=SUM(B2:B10)`, or `=ROUND(B2/3, 2)`. Columns use A, B, …, AA. Row 1 is
|
||||
the header, so the first data row is 2. References stay inside the current table.
|
||||
Arithmetic supports `+`, `-`, `*`, `/`, `^`, parentheses, and postfix `%`.
|
||||
Functions include SUM, AVERAGE, MIN, MAX, COUNT, ABS, and ROUND.
|
||||
Separate function arguments with commas: `=AVERAGE(B2,C2)` averages two cells.
|
||||
A colon selects a range: `=AVERAGE(B2:C2)`.
|
||||
|
||||
Aggregates ignore text and blank cells. Arithmetic treats blank cells as zero.
|
||||
Results recalculate in Writer, Split, and Read. Click a result to edit its
|
||||
formula; Enter commits it and Tab moves to the next cell. The Formulas control
|
||||
below each table explains the syntax, and the active cell shows its address.
|
||||
Invalid formulas, missing cells, and circular references display error labels.
|
||||
|
||||
Markdown stores the formula itself, so other apps display readable source.
|
||||
Use code formatting or `\=` to keep formula-like text literal. References are
|
||||
positional: copying, inserting, deleting, sorting, or moving cells does not
|
||||
rewrite addresses. Cross-table references and automatic fill are not supported.
|
||||
**Remove image**, or the Delete key, removes the image link from the note. It does not delete the file. Undo restores the link.
|
||||
Zoom works in Writer, Read, and Split. It can fit the image or magnify it. Press Escape to close it.
|
||||
|
||||
## Read diagrams and document properties
|
||||
|
||||
The reader uses a Markdown parser for paragraphs, nested lists, tables, tasks,
|
||||
code blocks and reference images. Frontmatter sits in a collapsed Properties
|
||||
section. Wiki links, note callouts and locally rendered Mermaid diagrams are
|
||||
supported in Writer, Split and Read. Diagram source remains available to copy. Invalid diagrams show a message and their source. Toolbar icons show tooltips
|
||||
on hover or keyboard focus; Split view stacks vertically in narrow panes.
|
||||
Writer, Read, and Split show wiki links, note callouts, and Mermaid diagrams.
|
||||
RuneStone renders Mermaid diagrams locally. If a diagram is not valid, RuneStone shows an error message and the diagram source.
|
||||
Read shows frontmatter in a collapsed **Properties** section.
|
||||
|
||||
## Edit tables
|
||||
|
||||
Tables keep readable column widths. A `<br>` in a cell shows as a line break. Wide tables scroll inside the document.
|
||||
|
||||
- Select a cell to edit its contents.
|
||||
- To add a column, hover beside the right edge of the table and select +. To add a row, hover below the bottom edge.
|
||||
- Right-click a cell for the **Row** and **Column** menus. They insert, move, duplicate, delete, and sort at that cell.
|
||||
|
||||
Sort is stable and natural, so 2 comes before 10. Blank cells go last, and the header row stays in place.
|
||||
|
||||
### Move rows or columns
|
||||
|
||||
Grips show above columns and beside body rows when you hover or focus the table.
|
||||
|
||||
1. Drag a grip. A line shows the drop position.
|
||||
2. Release the grip at the new position.
|
||||
|
||||
To scroll, drag near an edge. To cancel, press Escape. You can also focus a grip and move it with the arrow keys.
|
||||
A row move keeps the header row in place. A column move keeps the column alignment.
|
||||
|
||||
### Select, copy, and format cells
|
||||
|
||||
Drag across cells, or Shift+click, to select a rectangle. Shift+arrow keys extend the selection.
|
||||
Then right-click for these actions:
|
||||
|
||||
| Group | Actions |
|
||||
| --- | --- |
|
||||
| Clipboard | Cut, copy, and paste |
|
||||
| Format | Bold, italic, strikethrough, highlight, code, math, comment, and clear formatting |
|
||||
| Layout | Alignment, clear cells, and delete cells |
|
||||
|
||||
Ctrl+X, Ctrl+C, Ctrl+V, Ctrl+B, Ctrl+I, and undo also work on the selected cells. Undo reverts each action in one step.
|
||||
|
||||
- When you paste tab-separated text or a Markdown table, RuneStone fills the cells and adds rows or columns as necessary.
|
||||
- Alignment applies to whole columns, because Markdown sets alignment per column.
|
||||
- **Clear cells** empties the cells. **Delete cells** removes complete rows or columns, or moves the remaining cells of a partial selection to the left.
|
||||
- Math uses inline `$…$` syntax. A comment uses `%%…%%` and does not show in Read.
|
||||
|
||||
### Work with text inside a cell
|
||||
|
||||
Right-click selected text in a cell for note links, external links, workspace search, formatting, and paste as rich or plain text.
|
||||
**Extract current selection…** saves the selected Markdown to a new note and replaces the selection with a link to that note.
|
||||
Undo restores the original text. It does not delete the new note.
|
||||
|
||||
## Calculate with Table Formulas
|
||||
|
||||
These calculations need the optional Table Formulas plugin. See [Install a plugin](../plugins.md#install-a-plugin).
|
||||
|
||||
Start a cell with `=` to make a formula. Columns use letters A, B, … AA. Row 1 is the header, so the first data row is row 2.
|
||||
|
||||
| Example | Result |
|
||||
| --- | --- |
|
||||
| `=B2+C2` | Adds two cells. |
|
||||
| `=AVERAGE(B2,C2)` | Averages two cells. Commas separate arguments. |
|
||||
| `=AVERAGE(B2:C2)` | Averages every cell from B2 through C2. A colon sets a range. |
|
||||
| `=SUM(B2:B10)` | Adds a range. |
|
||||
| `=ROUND(B2/3, 2)` | Rounds to two decimal places. |
|
||||
|
||||
| Feature | Supported values |
|
||||
| --- | --- |
|
||||
| Operators | `+`, `-`, `*`, `/`, `^`, parentheses, and postfix `%` |
|
||||
| Functions | SUM, AVERAGE, MIN, MAX, COUNT, ABS, and ROUND |
|
||||
|
||||
Functions that take a range ignore text and blank cells. Arithmetic uses zero for a blank cell.
|
||||
Results update in Writer, Read, and Split. Select a result to edit its formula. Enter saves the formula, and Tab moves to the next cell.
|
||||
The **Formulas** control below each table explains the syntax. The active cell shows its address.
|
||||
A formula that is not valid, a missing cell, or a circular reference shows an error label.
|
||||
|
||||
The Markdown file keeps the formula text, so other apps show readable source.
|
||||
To keep text that starts with `=` as text, use code formatting or type `\=`.
|
||||
|
||||
Formula limits:
|
||||
|
||||
- References stay inside the current table.
|
||||
- References are fixed positions. When you copy, insert, delete, sort, or move cells, RuneStone does not update the addresses.
|
||||
- RuneStone has no automatic fill.
|
||||
|
||||
+69
-38
@@ -1,57 +1,88 @@
|
||||
# Terminal guide
|
||||
|
||||
[User guide](../user-guide.md) · [Install a plugin](../plugins.md#install-a-plugin)
|
||||
[RuneStone](../../README.md) · [User guide](../user-guide.md) · [Install a plugin](../plugins.md#install-a-plugin)
|
||||
|
||||
Install and enable the Terminal plugin to use these controls. The shell runtime must exist on your computer.
|
||||
This guide explains how to use shells, scripts, and workspace tasks with the optional Terminal plugin.
|
||||
|
||||
Install and enable the Terminal plugin first. The shells and script runtimes that you use must be installed on your computer.
|
||||
|
||||
## Open and arrange terminals
|
||||
|
||||
Ctrl+` or Ctrl+J shows or hides the terminal, preserving sessions and scrollback.
|
||||
New Terminal (Ctrl+Shift+`) creates an independent shell; Split (Ctrl+Shift+5)
|
||||
adds a resizable pane in the active group and inherits its current directory/profile.
|
||||
The terminal list appears only when multiple sessions exist. Kill terminates a
|
||||
session; Delete does the same while a terminal-list entry has focus. Maximize
|
||||
and Restore change the panel size without restarting shells.
|
||||
| Action | How |
|
||||
| --- | --- |
|
||||
| Show or hide the terminal panel | 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+` |
|
||||
| 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)** |
|
||||
|
||||
## Choose a shell and its settings
|
||||
The terminal list shows only when more than one session is open.
|
||||
Closing a separate terminal window ends its sessions.
|
||||
|
||||
The dropdown immediately beside New Terminal offers installed PowerShell,
|
||||
PowerShell 7, Git Bash, Command Prompt, and Bash profiles, a default-profile
|
||||
picker, terminal settings, tasks, and separate terminal windows
|
||||
(Ctrl+Shift+Alt+`). Font size, scrollback, cursor blinking, and default profile
|
||||
persist locally. New terminals inherit the app environment, including PATH.
|
||||
## Choose a shell
|
||||
|
||||
## Run scripts and navigate commands
|
||||
Open the menu beside the + button to start a terminal with a specific profile.
|
||||
|
||||
Drag across terminal text to select it. Ctrl+C copies a selection.
|
||||
Without a selection, Ctrl+C sends an interrupt to the shell. Ctrl+Shift+C also copies selected text.
|
||||
| System | Profiles |
|
||||
| --- | --- |
|
||||
| Windows | PowerShell, PowerShell 7, Git Bash, and Command Prompt |
|
||||
| macOS and Linux | Bash and PowerShell |
|
||||
|
||||
More terminal actions clears scrollback, runs selected editor text, or saves
|
||||
and runs the active script. Supported runners include Python, JavaScript,
|
||||
PowerShell, Bash, Ruby, Windows batch files, and executables. Their runtimes
|
||||
must be installed. Recent-command (Ctrl+Alt+R) and directory (Ctrl+G) pickers
|
||||
work while the terminal is focused. Ctrl+Up/Down navigates prompt markers.
|
||||
History is kept in memory for the current dock; PowerShell/Bash report commands
|
||||
after completion, while Command Prompt captures submitted text at its prompt.
|
||||
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.
|
||||
New terminals get the RuneStone environment, including `PATH`.
|
||||
|
||||
## Copy and paste
|
||||
|
||||
- Drag across terminal text to select it.
|
||||
- Ctrl+C copies the selection. With no selection, Ctrl+C sends an interrupt to the shell.
|
||||
- Ctrl+Shift+C copies the selection.
|
||||
- Right-click a selection to copy it.
|
||||
|
||||
## Run scripts and recent commands
|
||||
|
||||
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. |
|
||||
|
||||
**Run 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
|
||||
|
||||
Configure Tasks creates/opens `.runestone/tasks.json`. Its `tasks` array contains
|
||||
objects with `label`, `command`, and an optional `profile` ID (`powershell`,
|
||||
`pwsh`, `git-bash`, `cmd`, or `bash`). Run Task starts the chosen command in its
|
||||
own terminal at the workspace root. Tasks run only when explicitly selected.
|
||||
A task is a named command that you can start from a menu.
|
||||
|
||||
## Use debugging and dictation tools
|
||||
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.
|
||||
|
||||
JavaScript Debug Terminal starts a Node.js REPL with a local inspector on an
|
||||
available port. Attach an external debugger using the printed address.
|
||||
RuneStone does not provide VS Code's debugger or automatic debug attachment.
|
||||
Start Dictation invokes Windows voice typing (Win+H) in the focused terminal;
|
||||
Windows microphone/voice-typing configuration is required. Other platforms
|
||||
use their operating system's dictation shortcut.
|
||||
Example (`.runestone/tasks.json`):
|
||||
|
||||
## Close detached terminals
|
||||
```json
|
||||
{
|
||||
"tasks": [
|
||||
{ "label": "Run tests", "command": "pnpm test", "profile": "pwsh" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Closing a detached terminal window terminates its sessions. Switching workspace
|
||||
closes detached terminal windows and ends the old workspace's sessions.
|
||||
Each task runs in its own terminal at the workspace root. Tasks run only when you select them.
|
||||
|
||||
## Debug JavaScript and use dictation
|
||||
|
||||
**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.
|
||||
On other systems, use the dictation shortcut of the operating system.
|
||||
|
||||
+54
-42
@@ -1,30 +1,48 @@
|
||||
# Appearance and custom themes
|
||||
|
||||
[User guide](../user-guide.md) · [Interface design](../ui-design.md)
|
||||
[RuneStone](../../README.md) · [User guide](../user-guide.md)
|
||||
|
||||
Open Settings → Appearance to choose a palette or install a custom theme.
|
||||
RuneStone and Claude offer separate light and dark choices in the theme menu.
|
||||
Sakura uses one light appearance. Harvest Moon, Crimson Pilot, and Silver Serpent each use one dark appearance.
|
||||
Named palettes include their own typography and syntax colors. Fonts use local fallback stacks without downloads.
|
||||
This guide explains how to choose colors, set a background image, and create or share a custom theme.
|
||||
|
||||
Open **Settings → Appearance**. Appearance settings apply to all workspaces on this computer and to all open windows.
|
||||
|
||||
## Choose a color theme
|
||||
|
||||
| Theme | Appearances |
|
||||
| --- | --- |
|
||||
| RuneStone | Light and dark |
|
||||
| Claude | Light and dark |
|
||||
| Sakura | Light only |
|
||||
| Harvest Moon, Crimson Pilot, Silver Serpent | Dark only |
|
||||
|
||||
Each named theme has its own fonts and syntax colors. Fonts come from your computer. RuneStone does not download fonts.
|
||||
|
||||
## Adjust transparency
|
||||
|
||||
Transparent surfaces controls the tint on menus, image-backed work areas, and compatible plugin surfaces.
|
||||
The amount ranges from 0% to 100%. The default is 18%.
|
||||
Turn the switch off for opaque surfaces. This keeps text and icons opaque and preserves the selected palette.
|
||||
The setting applies across open windows and remains after restart.
|
||||
**Transparent surfaces** tints menus, work areas with a background image, and compatible plugin surfaces.
|
||||
Set **Transparency amount** from 0% to 100%. The default is 18%.
|
||||
Turn off **Transparent surfaces** for opaque surfaces. Text and icons stay opaque in both cases.
|
||||
|
||||
## Set a background image
|
||||
|
||||
1. Choose **Choose image…** and select a PNG, JPEG, WebP, or GIF file up to 50 MiB.
|
||||
2. Set **Image size** to **Fill**, **Fit**, or **Actual size**.
|
||||
3. Set **Image position**.
|
||||
4. Set **Image overlay** from -100% to 100%. Negative values lighten the image, and positive values darken it.
|
||||
|
||||
The image shows in new tabs. RuneStone keeps it on this computer.
|
||||
The Project Management plugin can keep a separate image for a board. The Background Slideshow plugin can replace the image for a time.
|
||||
|
||||
## Create a theme
|
||||
|
||||
1. Select the appearance that you want as a starting point.
|
||||
2. Choose Export theme template.
|
||||
1. Select the theme and appearance that you want to start from.
|
||||
2. Choose **Export theme template**.
|
||||
3. Edit the saved JSON file in a text editor.
|
||||
4. Choose Install theme and select the file.
|
||||
4. Choose **Install theme** and select the file.
|
||||
|
||||
The export contains one `colors` palette, including the current surface, text, accent, status, and syntax colors.
|
||||
Custom themes use this fixed palette. They do not contain separate light and dark sections.
|
||||
The file must be smaller than 64 KiB. The palette requires `bg`, `text`, and `accent`.
|
||||
Use hexadecimal colors with 3, 4, 6, or 8 digits.
|
||||
The template contains one `colors` palette and the current `fonts`. A custom theme has one fixed palette, without separate light and dark versions.
|
||||
|
||||
Example (a minimal theme file):
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -45,42 +63,36 @@ Use hexadecimal colors with 3, 4, 6, or 8 digits.
|
||||
}
|
||||
```
|
||||
|
||||
The ID starts with a lowercase letter. It permits lowercase letters, numbers, and hyphens, up to 64 characters.
|
||||
The visible name permits up to 80 characters. Installing the same ID replaces that theme's colors.
|
||||
Unknown keys and invalid colors stop installation with an error.
|
||||
Older schema 1 themes remain importable. Import uses the palette for the current appearance and saves it as one fixed palette.
|
||||
### Theme file rules
|
||||
|
||||
## Available colors
|
||||
| Field | Rule |
|
||||
| --- | --- |
|
||||
| File | JSON, smaller than 64 KiB |
|
||||
| `schema` | `2`. RuneStone also imports schema 1 files and converts them to one palette for the current appearance. |
|
||||
| `id` | Starts with a lowercase letter. Lowercase letters, numbers, and hyphens. Up to 64 characters. A theme with the same ID replaces the installed theme. |
|
||||
| `name` | Up to 80 characters |
|
||||
| `colors` | Must contain `bg`, `text`, and `accent`. Each value is a hexadecimal color with 3, 4, 6, or 8 digits. |
|
||||
| `fonts` | Optional. Font stacks for `ui`, `prose`, `heading`, and `mono`, such as `"mono": "Cascadia Mono, monospace"`. |
|
||||
|
||||
An unknown key or a color that is not valid stops the installation with an error.
|
||||
If you omit an optional color, RuneStone uses the color of the base appearance. If you omit `fonts`, the theme uses the normal fonts.
|
||||
Font stacks name fonts that are installed on the computer. A theme file cannot install fonts or contain scripts, style rules, or plugin code.
|
||||
|
||||
### Color keys
|
||||
|
||||
| Keys | Use |
|
||||
| --- | --- |
|
||||
| `bg`, `bg-elevated`, `bg-active`, `border` | Surfaces and boundaries |
|
||||
| `bg`, `bg-elevated`, `bg-active`, `border` | Surfaces and borders |
|
||||
| `text`, `text-dim`, `text-strong` | Normal, secondary, and prominent text |
|
||||
| `accent`, `accent-2`, `selection` | Links, accents, and editor selection |
|
||||
| `error`, `warn`, `warn-hot`, `ok`, `special` | Status and special content |
|
||||
| `syntax-parameter`, `syntax-keyword`, `syntax-local`, `syntax-static`, `syntax-instance`, `syntax-global` | Code identifiers and keywords |
|
||||
| `syntax-string`, `syntax-number`, `syntax-comment`, `syntax-type`, `syntax-function` | Code values, comments, types, and functions |
|
||||
|
||||
Optional colors use the base appearance when omitted. Export includes all supported keys to make these choices explicit.
|
||||
Theme files can also contain an optional `fonts` object with `ui`, `prose`, `heading`, and `mono` font stacks.
|
||||
Export includes all four current stacks. For example, `"fonts": { "ui": "Segoe UI, sans-serif", "mono": "Cascadia Mono, monospace" }`.
|
||||
These names use fonts installed on the device. Theme files do not install font files.
|
||||
Imports without `fonts` keep the selected theme's normal font stacks.
|
||||
Theme files contain colors and font stacks without scripts, style rules, or plugin code.
|
||||
|
||||
## Set a background
|
||||
|
||||
Choose an image in Appearance. Its layout can fill the area, fit the complete image, or retain its original size.
|
||||
Choose an alignment and set the overlay from -100% to 100%.
|
||||
Negative values lighten the image. Positive values darken it.
|
||||
Background images remain local. Project Management can retain a separate board image.
|
||||
The optional Background Slideshow plugin can temporarily replace these images.
|
||||
Before you share a theme, check text, links, focus outlines, selections, and surfaces with a background image.
|
||||
Keep informative text and symbols opaque. See the [functional color requirements](../ui-color.md).
|
||||
|
||||
## Share or remove a theme
|
||||
|
||||
With a custom theme selected, Export theme template saves its current definition.
|
||||
Share the JSON file with another user, who can install it through Appearance.
|
||||
Remove custom theme returns to RuneStone colors. Themes remain in this device's preferences across workspaces.
|
||||
|
||||
Check text, links, focus, selections, and image surfaces before sharing a theme.
|
||||
Keep informative text and symbols opaque. Use the [functional color requirements](../ui-color.md) when choosing colors.
|
||||
To share a custom theme, select it and choose **Export theme template**. The other person installs the JSON file with **Install theme**.
|
||||
**Remove custom theme** removes the theme and selects the RuneStone colors.
|
||||
|
||||
+48
-51
@@ -2,23 +2,23 @@
|
||||
|
||||
[RuneStone](../README.md) · [User guide](user-guide.md)
|
||||
|
||||
| Platform | Current route |
|
||||
| --- | --- |
|
||||
| Windows 10 or 11, Intel/AMD 64-bit | [0.1.44 setup executable](http://10.0.0.5:6610/kwyvern/RuneStone/releases/download/v0.1.44/RuneStone_0.1.44_x64-setup.exe) |
|
||||
| Linux, Intel/AMD 64-bit | [0.1.44 experimental Debian installer](http://10.0.0.5:6610/kwyvern/RuneStone/releases/download/v0.1.44/RuneStone_0.1.44_amd64.deb). Installation lifecycle remains untested. |
|
||||
| macOS, Apple silicon | [0.1.44 experimental DMG installer](http://10.0.0.5:6610/kwyvern/RuneStone/releases/download/v0.1.44/RuneStone_0.1.44_aarch64.dmg). Installation and desktop acceptance remain untested. |
|
||||
This guide installs, updates, or reinstalls RuneStone from a supplied release file.
|
||||
|
||||
The current macOS DMG targets Apple silicon only; Intel Macs are not covered.
|
||||
| Platform | Release file | Notes |
|
||||
| --- | --- | --- |
|
||||
| Windows 10 or 11, x64 | [RuneStone_0.1.44_x64-setup.exe](https://git.knottywyvern.com/kwyvern/RuneStone/releases/download/v0.1.44/RuneStone_0.1.44_x64-setup.exe) | Installs for the current Windows account |
|
||||
| macOS, Apple silicon | [RuneStone_0.1.44_aarch64.dmg](https://git.knottywyvern.com/kwyvern/RuneStone/releases/download/v0.1.44/RuneStone_0.1.44_aarch64.dmg) | Experimental. Intel Macs are not supported. |
|
||||
| Linux, amd64 | [RuneStone_0.1.44_amd64.deb](https://git.knottywyvern.com/kwyvern/RuneStone/releases/download/v0.1.44/RuneStone_0.1.44_amd64.deb) | Experimental. Built on Ubuntu 26.04.1. Needs GLIBC 2.39 or newer. |
|
||||
|
||||
Each release file includes the app and its built-in browser. You do not need Node.js, Rust, or a source checkout.
|
||||
|
||||
## Install on Windows
|
||||
|
||||
1. Save `RuneStone_0.1.44_x64-setup.exe` to Downloads.
|
||||
2. Open the file.
|
||||
3. Complete setup.
|
||||
3. Complete setup. Keep the default destination unless you need another location.
|
||||
4. Open RuneStone from the Start menu.
|
||||
|
||||
Setup installs RuneStone for your Windows account. Keep the default destination unless you need another location.
|
||||
|
||||
## Update or reinstall on Windows
|
||||
|
||||
1. Save your documents.
|
||||
@@ -26,56 +26,53 @@ Setup installs RuneStone for your Windows account. Keep the default destination
|
||||
3. Open the installer for the same or a newer version.
|
||||
4. Complete setup.
|
||||
|
||||
Run the installer directly. An existing installation defaults to reinstall, including the same version.
|
||||
You do not need to uninstall first. Setup preserves workspace files and settings and blocks version downgrades.
|
||||
|
||||
## Install on Linux
|
||||
|
||||
The Debian package includes the app and its Browser runtime.
|
||||
The current `0.1.44` package targets Intel/AMD 64-bit (`amd64`), was built on
|
||||
Ubuntu 26.04.1 LTS, and requires GLIBC 2.39 or newer. Other distributions,
|
||||
architectures, and older Ubuntu versions have not been validated.
|
||||
|
||||
1. Download the Debian installer above and its [linux-SHA256SUMS](http://10.0.0.5:6610/kwyvern/RuneStone/raw/branch/master/docs/checksums/0.1.44/linux-SHA256SUMS) file.
|
||||
2. Save both files to Downloads and open Terminal in that folder.
|
||||
3. Verify the download, then install the package:
|
||||
|
||||
```bash
|
||||
sha256sum --check linux-SHA256SUMS
|
||||
sudo apt install ./RuneStone_0.1.44_amd64.deb
|
||||
```
|
||||
|
||||
Stop if verification fails. The checksum file applies only to the Linux 0.1.44 installer.
|
||||
4. Open RuneStone from your applications menu, or run `runestone` in Terminal.
|
||||
5. Open a workspace outside the application folder.
|
||||
|
||||
APT resolves the declared system dependencies. You do not need Node.js, pnpm,
|
||||
Rust, or a source checkout. Run RuneStone as your ordinary desktop user.
|
||||
|
||||
To try a same-version reinstall, save your work, close RuneStone, and run
|
||||
`sudo apt install --reinstall ./RuneStone_0.1.44_amd64.deb`.
|
||||
For an update, close RuneStone and run the install command with the newer file.
|
||||
Installation, reinstall, upgrade, removal, and workspace/settings preservation
|
||||
still need lifecycle testing; package-content checks alone do not establish them.
|
||||
|
||||
For source development, use the [Linux development guide](linux.md), which contains the
|
||||
prerequisites, Browser preparation, and native desktop checks.
|
||||
You do not need to uninstall first. Setup selects reinstall by default, also for the same version.
|
||||
Setup keeps your workspace files and settings. It does not install an older version over a newer one.
|
||||
|
||||
## Install on macOS
|
||||
|
||||
1. Save `RuneStone_0.1.44_aarch64.dmg` to Downloads.
|
||||
2. Open the disk image and drag RuneStone into Applications.
|
||||
3. Eject the disk image.
|
||||
4. Open RuneStone from Applications.
|
||||
2. Open the disk image.
|
||||
3. Drag RuneStone into Applications.
|
||||
4. Eject the disk image.
|
||||
5. Open RuneStone from Applications.
|
||||
|
||||
The experimental 0.1.44 installer targets Apple silicon and includes its Browser runtime.
|
||||
You do not need a terminal or developer tools. The app has local ad hoc signatures, without Developer ID signing or Apple notarization.
|
||||
The app has an ad hoc signature and is not notarized by Apple.
|
||||
If macOS blocks the first launch, open **System Settings → Privacy & Security** and choose **Open Anyway**.
|
||||
|
||||
## Update or reinstall on macOS
|
||||
|
||||
1. Save your documents and quit RuneStone.
|
||||
2. Open the disk image for the same or a newer version.
|
||||
3. Drag RuneStone into Applications and confirm replacement of the existing app.
|
||||
4. Eject the disk image and open RuneStone from Applications.
|
||||
3. Drag RuneStone into Applications and confirm the replacement.
|
||||
4. Eject the disk image.
|
||||
5. Open RuneStone from Applications.
|
||||
|
||||
The [user guide](user-guide.md#resolve-file-conflicts) covers document errors after launch.
|
||||
## Install on Linux
|
||||
|
||||
1. Save `RuneStone_0.1.44_amd64.deb` and [linux-SHA256SUMS](https://git.knottywyvern.com/kwyvern/RuneStone/raw/branch/master/docs/checksums/0.1.44/linux-SHA256SUMS) to Downloads.
|
||||
2. Open Terminal in Downloads.
|
||||
3. Check the download:
|
||||
|
||||
```bash
|
||||
sha256sum --check linux-SHA256SUMS
|
||||
```
|
||||
|
||||
If the result is not `OK`, delete the file and download it again.
|
||||
4. Install the package:
|
||||
|
||||
```bash
|
||||
sudo apt install ./RuneStone_0.1.44_amd64.deb
|
||||
```
|
||||
|
||||
5. Open RuneStone from your applications menu, or run `runestone` in Terminal.
|
||||
|
||||
APT installs the system libraries that the package declares. Run RuneStone as your ordinary desktop user.
|
||||
|
||||
## Update or reinstall on Linux
|
||||
|
||||
1. Save your documents and close RuneStone.
|
||||
2. Open Terminal in the folder that contains the new package.
|
||||
3. Install the newer package with the same `sudo apt install ./<file>.deb` command.
|
||||
|
||||
To reinstall the same version, run `sudo apt install --reinstall ./RuneStone_0.1.44_amd64.deb`.
|
||||
|
||||
+49
-94
@@ -1,25 +1,22 @@
|
||||
# Linux development
|
||||
|
||||
[Development guide](development.md) · [Linux installation and updates](installation.md#install-on-linux) · [Build Linux packages](builds.md#build-linux-packages)
|
||||
[Development](development.md) · [Build Linux packages](builds.md#build-linux-packages) · [Install on Linux](installation.md#install-on-linux)
|
||||
|
||||
This guide covers Linux source development, Browser preparation, and native desktop checks.
|
||||
To install a supplied RuneStone package, use [Installation and updates](installation.md#install-on-linux).
|
||||
Past build and test results are in the [Linux validation reference](archive/linux-validation-2026-10.md).
|
||||
This guide gives the Linux-specific parts of source development and the native desktop checks for Linux.
|
||||
For the general source setup, use [Run from source](development.md#run-from-source).
|
||||
|
||||
## Development prerequisites
|
||||
## Prerequisites
|
||||
|
||||
Use a Linux source checkout with Node.js 24, pnpm 10, and a stable Rust toolchain.
|
||||
See the [shared development requirements](development.md#requirements) for repository setup.
|
||||
Use [Tauri's Linux prerequisites](https://v2.tauri.app/start/prerequisites/#linux) for native libraries, including GTK and WebKitGTK 4.1.
|
||||
The first build needs internet access for dependencies.
|
||||
- The tools in [Run from source](development.md#run-from-source): Node.js 24, pnpm 10, and a stable Rust toolchain.
|
||||
- The native libraries in [Tauri's Linux prerequisites](https://v2.tauri.app/start/prerequisites/#linux), including GTK and WebKitGTK 4.1.
|
||||
- A graphical desktop session.
|
||||
- A terminal with `node`, `pnpm`, and `cargo` on its `PATH`. If a command is missing, load the environment that its installer configured.
|
||||
|
||||
Open a terminal with Node.js, pnpm, and Cargo available on its PATH.
|
||||
If a command is missing, load the environment configured by its installer before you continue.
|
||||
Do not copy Windows `node_modules`, `src-tauri/target`, or `browser-engine` folders into Linux.
|
||||
Do not copy `node_modules`, `src-tauri/target`, or `src-tauri/browser-engine` from a Windows checkout. They contain platform-specific binaries.
|
||||
|
||||
## Record the development environment
|
||||
## Record the environment
|
||||
|
||||
Run these commands in the Linux session used for native checks:
|
||||
Run these commands in the Linux session that you use for native checks:
|
||||
|
||||
```sh
|
||||
cat /etc/os-release
|
||||
@@ -27,113 +24,71 @@ uname -m
|
||||
printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$XDG_SESSION_TYPE"
|
||||
```
|
||||
|
||||
Record the distribution, version, processor architecture, desktop, and session type with the source commit and test results.
|
||||
Test the session you use first. Test both Wayland and X11 before claiming support for both.
|
||||
An Intel/AMD build does not establish ARM support.
|
||||
Record the distribution, version, processor architecture, desktop, and session type with the source commit and the test results.
|
||||
Test Wayland and X11 separately before you claim support for both. An x86_64 test does not prove ARM64 support.
|
||||
|
||||
## Build and run from source
|
||||
## Browser runtime on Linux
|
||||
|
||||
Run the commands below from the RuneStone repository root in a graphical Linux session.
|
||||
Commands come from [package.json](../package.json) and [browser-runtime/package.json](../browser-runtime/package.json).
|
||||
Use the general steps in [Built-in browser runtime](development.md#built-in-browser-runtime). On Linux, these differences apply:
|
||||
|
||||
From the Linux checkout, install the project dependencies:
|
||||
- Package and stage the runtime on the same architecture as the host build.
|
||||
`npm --prefix browser-runtime run package` selects the current platform and architecture.
|
||||
`package:linux` always builds x86_64. Do not use it on ARM64.
|
||||
- `pnpm browser:stage` stops when the packaged runtime does not match the current platform and architecture.
|
||||
- Staging makes sure that the `RuneStone-Browser` file is executable and sets the runtime folder to mode 755.
|
||||
- Staging replaces the full `src-tauri/browser-engine` folder, so no files from an older package stay.
|
||||
It moves the previous folder to `output/browser-stage-backups/`.
|
||||
|
||||
```sh
|
||||
pnpm install --frozen-lockfile
|
||||
npm ci --prefix browser-runtime
|
||||
```
|
||||
The Browser runtime always runs with the Electron sandbox. It stops when it receives `--no-sandbox`.
|
||||
Run RuneStone as an ordinary desktop user, not as root.
|
||||
Some distributions limit user namespaces, which the sandbox can need. Test the Browser on each target distribution.
|
||||
|
||||
The built-in Browser is a separate Electron executable. A fresh checkout does not
|
||||
contain `src-tauri/browser-engine`; prepare it on the same Linux architecture before
|
||||
building or launching the native host:
|
||||
The native host uses WebKitGTK and the Browser uses Electron. Test both.
|
||||
|
||||
```sh
|
||||
pnpm browser:check
|
||||
pnpm browser:test
|
||||
npm --prefix browser-runtime run package
|
||||
pnpm browser:stage
|
||||
```
|
||||
## Checks
|
||||
|
||||
Use the native `package` command on ARM64 too; `package:linux` explicitly selects
|
||||
x86_64. Staging verifies the executable permission and replaces the whole runtime
|
||||
tree, so files from an older Windows or Linux package cannot leak into the new one.
|
||||
An existing staged runtime is retained under `output/browser-stage-backups/` for
|
||||
recovery. Do not copy Windows `browser-engine` output into a Linux build.
|
||||
Run the source checks in [Checks](development.md#checks) and the tests in [Browser smoke tests](development.md#browser-smoke-tests).
|
||||
Then run `pnpm tauri dev` in the graphical session for the desktop checks below.
|
||||
|
||||
Electron must run as an ordinary desktop user with its sandbox enabled. Do not
|
||||
work around sandbox failures with `--no-sandbox` or by running RuneStone as root.
|
||||
Test the Browser on the intended distro, including its user-namespace policy.
|
||||
The native host uses WebKitGTK and the Browser uses Electron; both need testing.
|
||||
|
||||
### Source checks
|
||||
|
||||
The full test suite needs the Table Formulas package.
|
||||
Clone `RuneStone_Table_Formulas` beside RuneStone.
|
||||
Install its dependencies as described in the [Table Formulas build example](plugin-development.md#example-table-formulas).
|
||||
|
||||
`pnpm build:plugins` builds only Table Formulas. Run these checks from the RuneStone repository root:
|
||||
|
||||
```sh
|
||||
pnpm build:plugins
|
||||
pnpm check
|
||||
pnpm test
|
||||
pnpm build
|
||||
cargo test --manifest-path src-tauri/Cargo.toml --lib --locked
|
||||
```
|
||||
|
||||
### Development session
|
||||
|
||||
Run the desktop app in your graphical Linux session:
|
||||
|
||||
```sh
|
||||
pnpm tauri dev
|
||||
```
|
||||
|
||||
This command starts Vite and opens the native desktop app. Keep the terminal open during development.
|
||||
Save your work and press Ctrl+C in that terminal to stop the session.
|
||||
See the [daily workflow](development.md#daily-workflow) for source edits and rebuild behavior.
|
||||
|
||||
A successful build does not establish desktop compatibility.
|
||||
Browser tests use mocked desktop calls and Chromium. They do not test Linux file access or WebKitGTK behavior.
|
||||
The source checks do not prove desktop compatibility.
|
||||
Browser smoke tests use Chromium and simulated desktop calls. They do not test Linux file access or WebKitGTK.
|
||||
|
||||
## Desktop checks
|
||||
|
||||
Use a disposable workspace outside the installation folder.
|
||||
Record each result, the source commit, and any error message.
|
||||
Use this checklist for native behavior after source changes. Voice typing is outside the Linux acceptance criteria.
|
||||
Keep each result separate from the [historical validation records](archive/linux-validation-2026-10.md).
|
||||
Voice typing is not part of the Linux checks.
|
||||
|
||||
| Area | Pass criteria |
|
||||
| --- | --- |
|
||||
| Launch and windows | Open from the desktop, move, resize, minimize, maximize, and close. Unsaved edits trigger the close guard. |
|
||||
| Files and paths | Create, save, reopen, rename, copy, and delete files. Check spaces, Unicode, and distinct `Note.md` and `note.md` files. |
|
||||
| External edits | Edit a file in another editor. RuneStone detects the change and prevents silent replacement of conflicting edits. |
|
||||
| Built-in Browser | Open a web page, type and scroll, open/close tabs, download a file, and restart the app. Check the packaged runtime too. |
|
||||
| Launch and windows | Open from the desktop. Move, resize, minimize, maximize, and close. Unsaved edits start the close guard. |
|
||||
| Files and paths | Create, save, open again, rename, copy, and delete files. Check spaces, Unicode, and distinct `Note.md` and `note.md` files. |
|
||||
| External edits | Edit a file in a different editor. RuneStone finds the change and does not silently replace conflicting edits. |
|
||||
| Built-in Browser | Open a web page, type, scroll, open and close tabs, download a file, and restart the app. Check the packaged runtime too. |
|
||||
| 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 plugin data persistence. |
|
||||
| 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. |
|
||||
| Settings | Change preferences, restart, and confirm persistence. Check separate workspace windows. |
|
||||
| Settings | Change preferences, restart, and make sure that they stay. Check separate workspace windows. |
|
||||
|
||||
Build Terminal with the [Terminal example](plugin-development.md#example-terminal), then [install its ZIP](plugins.md#install-a-plugin).
|
||||
For the Terminal ZIP, see [Build examples](plugin-development.md#build-examples) and the [plugin installation guide](plugins.md).
|
||||
Check terminal profiles after a desktop launch too. A desktop launcher can have a different `PATH` from an interactive shell.
|
||||
|
||||
Current filename rules reject some names that Linux permits, including colons and backslashes.
|
||||
Use ordinary portable filenames for baseline checks. Record unsupported names as a limitation.
|
||||
Mounted network shares need separate tests because Linux mount paths do not reliably select the current polling fallback.
|
||||
Do not claim network workspace support from a local-disk test.
|
||||
Known Linux limits:
|
||||
|
||||
- RuneStone rejects some names that Linux permits, for example names with `:` or `\`. Use portable filenames for baseline checks. Record a rejected name as a limit.
|
||||
- On Linux, RuneStone uses the polling watcher only for paths that start with `//`. A share mounted at an ordinary path uses the native watcher, which can miss changes from other computers. Test network workspaces separately.
|
||||
|
||||
## Package builds
|
||||
|
||||
Use [Build Linux packages](builds.md#build-linux-packages) for Debian and AppImage commands, release handling, and package checks.
|
||||
Use [Build Linux packages](builds.md#build-linux-packages) for Debian and AppImage builds, release files, and package checks.
|
||||
For an example of a Linux test record, see the [Linux 0.1.44 validation](archive/linux-validation-0.1.44.md).
|
||||
|
||||
## Development help
|
||||
|
||||
| Problem | Action |
|
||||
| --- | --- |
|
||||
| Node.js, pnpm, or Cargo is missing | Load your toolchain environment and check the [development prerequisites](#development-prerequisites). |
|
||||
| The Browser runtime is missing | From the repository root, repeat the Browser dependency, package, and staging commands in [Build and run from source](#build-and-run-from-source). |
|
||||
| Electron reports a sandbox or user-namespace error | Keep the sandbox enabled. Record the error and distribution version. Run RuneStone as an ordinary desktop user. |
|
||||
| A build stops | Record the first error, failed command, distribution version, and available memory and disk space. |
|
||||
|
||||
See [development help](development.md#development-help) for port conflicts, stale windows, and offline Cargo errors.
|
||||
| Node.js, pnpm, or Cargo is missing | Load your toolchain environment. See [Prerequisites](#prerequisites). |
|
||||
| The Browser runtime is missing | Package and stage it again. See [Browser runtime on Linux](#browser-runtime-on-linux). |
|
||||
| Electron reports a sandbox or user-namespace error | Keep the sandbox on. Record the error and the distribution version. Run RuneStone as an ordinary desktop user. |
|
||||
| A build stops | Record the first error, the command, the distribution version, and the free memory and disk space. |
|
||||
|
||||
+330
-340
@@ -1,25 +1,22 @@
|
||||
# Plugin development reference
|
||||
|
||||
[Development](development.md) · [Install and manage plugins](plugins.md)
|
||||
[Development](development.md) · [Install and manage plugins](plugins.md) · [Plugin host internals](plugin-host.md)
|
||||
|
||||
This reference is for authors who develop, package, and release RuneStone plugins.
|
||||
It covers the shared package contract, build examples, release requirements, and plugin APIs.
|
||||
For installation internals and host tests, use the [plugin host reference](plugin-host.md).
|
||||
For installation, updates, switches, and removal, use the [user guide for plugins](plugins.md).
|
||||
All plugins use the same package and installation system.
|
||||
This reference gives the package contract, the build procedure, and the API for RuneStone plugin authors.
|
||||
|
||||
- [Package contract](#package-contract)
|
||||
- [Versioning](#versioning-for-plugin-authors-and-agents)
|
||||
- [Build and release a plugin](#build-and-release-a-plugin)
|
||||
- [Build and package a plugin](#build-and-package-a-plugin)
|
||||
- [Build examples](#build-examples)
|
||||
- [Publishing releases](#publishing-releases)
|
||||
- [Versions and releases](#versions-and-releases)
|
||||
- [Plugin API](#plugin-api)
|
||||
- [Git API](#git-api)
|
||||
- [Temporary background API](#temporary-background-api)
|
||||
- [Background API](#background-api)
|
||||
|
||||
## Package contract
|
||||
|
||||
Place `plugin.json` at the root of the ZIP archive:
|
||||
A plugin is one standard `.zip` file with `plugin.json` at the archive root.
|
||||
All plugins use the same package format and the same install, enable, disable, and removal lifecycle.
|
||||
The interface types are in `src/lib/plugins/sdk.ts`.
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -35,58 +32,42 @@ Place `plugin.json` at the root of the ZIP archive:
|
||||
}
|
||||
```
|
||||
|
||||
The package API is version 1. Its interface lives in `src/lib/plugins/sdk.ts`.
|
||||
RuneStone 0.1.5 adds optional `placement: "editor"` for views that belong beside documents.
|
||||
These views open in the editor area with a tab. Document tabs retain their buffers when users switch views.
|
||||
Closing the plugin tab or disabling the package disposes the view.
|
||||
The default placement is `"dialog"`, so existing packages keep their current behavior.
|
||||
Older hosts ignore the placement field. Plugins that require editor placement need RuneStone 0.1.5 or later.
|
||||
All packages use one API and the same installation, enable, disable, and removal lifecycle.
|
||||
Versions use three numeric parts with an optional lowercase hotfix suffix, such as `0.2.28a`.
|
||||
Schema and API versions must match the supported version exactly.
|
||||
The `runestone.*` prefix follows the same rules as other package IDs. It does not prove the publisher's identity.
|
||||
|
||||
Package names use ASCII letters, digits, dots, underscores, and hyphens, with forward slashes between directories.
|
||||
IDs use lowercase letters, digits, dots, and hyphens and start with a letter.
|
||||
Windows device names, parent traversal, absolute paths, links, junctions, and case-insensitive collisions are invalid.
|
||||
Limits are 5,000 entries, 100 MiB of expanded data, and 25 MiB per file.
|
||||
The manifest has a 64 KiB limit. The final installed path cannot exceed 240 characters.
|
||||
|
||||
The entry is one compiled `.js` or `.mjs` module. Bundle dependencies into it.
|
||||
Relative module imports cannot resolve from its Blob URL. Read packaged assets through the API instead.
|
||||
Raw TypeScript, Svelte source, native libraries, plugin dependencies, and automatic updates are unsupported.
|
||||
|
||||
## Versioning for plugin authors and agents
|
||||
|
||||
Follow the shared [RuneStone versioning policy](../AGENTS.md#versioning). RuneStone and its plugins keep independent version numbers under this policy.
|
||||
Use `zz.yy.xx` and keep routine implementation work in the current `zz.yy` series.
|
||||
|
||||
| Part | When to increase it |
|
||||
| Field | Rule |
|
||||
| --- | --- |
|
||||
| `xx` | Each new completed regular plugin ZIP build. Hotfixes increase the letter suffix. |
|
||||
| `yy` | A deliberate release ready for build testing, with user direction. Reset `xx` to zero. |
|
||||
| `zz` | A full release, with user direction. Reset `yy` and `xx` to zero. |
|
||||
| `schemaVersion` | Must be `1`. |
|
||||
| `id` | Lowercase letters, digits, dots, and hyphens. Starts with a letter. At most 120 characters. Cannot end with a dot. |
|
||||
| `name`, `author`, `description` | Required text, at most 1,000 bytes each. |
|
||||
| `version` | Three numeric parts with an optional lowercase letter suffix, such as `1.0.0` or `0.2.28a`. |
|
||||
| `apiVersion` | Must be `1`. |
|
||||
| `entry` | Path of a compiled `.js` or `.mjs` module in the package. |
|
||||
| `access` | Must be `"full-app"`. |
|
||||
|
||||
Keep the current version during source edits, fixes, improvements, documentation work, and automated checks.
|
||||
Set the next version when producing the ZIP. Intermediate compilation output does not count as a new build.
|
||||
If no build completes, restore the previous version fields. Failed attempts and retries do not consume version numbers.
|
||||
Report a new version as available only after its ZIP exists. Publishing an existing artifact does not increase its version.
|
||||
Passing automated checks alone does not authorize a `yy` or `zz` increase.
|
||||
A hotfix fixes one item or a narrowly scoped problem in an existing release.
|
||||
Use letters in the actual package version: `0.2.28` → `0.2.28a` → `0.2.28b`.
|
||||
Keep the numeric base for hotfix builds.
|
||||
Advance hotfix suffixes in this order: `a`, `b`, `c`, through `z`, then `aa`, `ab`, and later suffixes.
|
||||
The next regular build increases `xx` and removes the suffix: `0.2.28b` → `0.2.29`.
|
||||
Keep the package version, manifest version, build metadata, ZIP name, release notes, and tag consistent.
|
||||
For example, package version `0.2.28a` produces `runestone.pm-0.2.28a.zip` and uses tag `v0.2.28a`.
|
||||
The shared packager and updated native installer accept these suffixes. Older hosts with numeric-only validation reject suffixed packages.
|
||||
Do not substitute a numeric increment for a hotfix. Add suffix support or report a format blocker before building.
|
||||
Do not bypass validation or overwrite an existing release ZIP.
|
||||
The host rejects any other manifest field.
|
||||
The `runestone.*` ID prefix follows the same rules as other IDs. An ID does not prove the identity of the publisher.
|
||||
|
||||
## Build and release a plugin
|
||||
### Paths and limits
|
||||
|
||||
Use the same package contract for in-house and community plugins.
|
||||
The ZIP is the release file. Its `plugin.json` describes the contents and is not a separate installer.
|
||||
Package paths use ASCII letters, digits, dots, underscores, and hyphens, with `/` between folders.
|
||||
Each path segment has at most 120 characters, and the full path has at most 180 characters.
|
||||
The host rejects Windows device names, `.` and `..` segments, and segments that end with a dot.
|
||||
It also rejects absolute paths, links, junctions, and paths that differ only in letter case.
|
||||
|
||||
| Limit | Value |
|
||||
| --- | --- |
|
||||
| Entries in the package | 5,000 |
|
||||
| Expanded data | 100 MiB |
|
||||
| One file | 25 MiB |
|
||||
| Compressed ZIP | 100 MiB |
|
||||
| `plugin.json` | 64 KiB |
|
||||
| Installed path (application data folder, plugin ID, and package path) | 240 characters |
|
||||
|
||||
### Entry module
|
||||
|
||||
The entry is one compiled JavaScript module. Bundle all dependencies into it.
|
||||
The host loads the module from a Blob URL, so relative imports do not resolve. Read packaged files with `api.assets.read`.
|
||||
The host does not accept raw TypeScript, Svelte source, native libraries, dependencies on other plugins, or automatic updates.
|
||||
|
||||
### Package files
|
||||
|
||||
```text
|
||||
org.example.hello-1.0.0.zip
|
||||
@@ -97,166 +78,101 @@ org.example.hello-1.0.0.zip
|
||||
LICENSE
|
||||
```
|
||||
|
||||
The manifest and entry module are required. Assets, a README, and a license are optional package files.
|
||||
Include a README with the host requirement, purpose, install steps, and help contact.
|
||||
Keep JavaScript readable where practical. Avoid minification and obfuscation that make inspection harder.
|
||||
The manifest and the entry module are required. Assets, a README, and a license are optional.
|
||||
In the README, give the RuneStone version that the plugin needs, its purpose, the install steps, and a help contact.
|
||||
Keep JavaScript readable. Do not minify or obfuscate code in a way that makes inspection difficult.
|
||||
|
||||
1. Compile the plugin into a clean folder with `plugin.json`, its entry module, and the required assets.
|
||||
2. Run `pnpm package:plugin <compiled-folder> [output-folder]` from the RuneStone repository.
|
||||
3. Install the resulting ZIP in RuneStone and test its features, disable action, and uninstall action.
|
||||
4. Share that same ZIP through the [publishing procedure](#publishing-releases).
|
||||
## Build and package a plugin
|
||||
|
||||
Use Node.js 24 or later for the packaging command. The default output folder is `releases/` in the project that contains the compiled folder.
|
||||
Keep plugin release ZIPs in that plugin project, including when the host calls the build.
|
||||
Explicit output folders are for temporary checks or staging. Move completed releases into the owning project's `releases/` folder.
|
||||
It checks the manifest, paths, entry module, and size limits before it writes `<id>-<version>.zip`.
|
||||
It includes every file in the input folder. Keep dependencies, credentials, and unrelated build files outside that folder.
|
||||
The output folder must be outside the input folder.
|
||||
The command rejects an existing ZIP with different contents. Identical contents reuse the existing file.
|
||||
Use the next build version for a changed release and preserve existing ZIPs.
|
||||
Repeated runs with unchanged input produce the same archive bytes.
|
||||
The native installer checks the package again before installation.
|
||||
Use this procedure for every plugin. Each plugin project defines its own compile step.
|
||||
|
||||
Other build tools can create the same ZIP layout. Do not add a parent folder above `plugin.json`.
|
||||
Do not tell users to load JSON, select a build folder, rename a new release, or install dependencies.
|
||||
Authors in other repositories can run `node <RuneStone-path>/scripts/packagePlugin.mjs <compiled-folder> <output-folder>`.
|
||||
1. Compile the plugin into a clean folder that contains `plugin.json`, the entry module, and the assets that it needs.
|
||||
2. From the RuneStone repository, run `pnpm package:plugin <compiled-folder> [output-folder]`.
|
||||
3. Install the ZIP in RuneStone through [Settings → Plug-ins](plugins.md#install-a-plugin).
|
||||
4. Test the plugin features, then test Disable and Uninstall.
|
||||
|
||||
From another repository, run `node <RuneStone>/scripts/packagePlugin.mjs <compiled-folder> [output-folder]`.
|
||||
The packager needs Node.js 24 or later.
|
||||
|
||||
The packager (`scripts/packagePlugin.mjs`) does these steps:
|
||||
|
||||
- It applies the [package contract](#package-contract) checks to the manifest, paths, entry module, and limits.
|
||||
- It adds every file in the compiled folder. Keep dependencies, credentials, and unrelated build files out of that folder.
|
||||
- It writes `<id>-<version>.zip`. Without an output folder, it uses `releases/` in the nearest parent folder that contains a `package.json` file.
|
||||
- It stops when the output folder is inside the compiled folder.
|
||||
- It writes the same bytes for the same input. It uses sorted paths, fixed timestamps, and DEFLATE compression.
|
||||
- It keeps an existing ZIP with identical contents. It stops when an existing ZIP has different contents. It never overwrites a ZIP.
|
||||
|
||||
Keep each completed plugin ZIP in the `releases/` folder of its own plugin project, also when the RuneStone repository starts the build.
|
||||
Use an explicit output folder only for checks and staging.
|
||||
|
||||
Other build tools can make the same ZIP layout. Do not put a parent folder above `plugin.json`.
|
||||
The native installer applies the package checks again before installation.
|
||||
In user instructions, do not tell users to load JSON, select a build folder, rename a release file, or install dependencies.
|
||||
|
||||
## Build examples
|
||||
|
||||
These examples are for plugin developers. To install an existing ZIP, use the [plugin installation guide](plugins.md#install-a-plugin).
|
||||
Complete the [source setup](development.md#run-from-source) before using host build commands.
|
||||
Each plugin has its own build command. Check that project's package scripts before building it.
|
||||
Apply the [versioning policy](#versioning-for-plugin-authors-and-agents) before producing a new release ZIP.
|
||||
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: Table Formulas
|
||||
|
||||
Source: [Table Formulas repository](https://git.knottywyvern.com/kwyvern-gitea/RuneStone_TableFormulas).
|
||||
The host's [build script](../scripts/buildPlugins.mjs) defines this example.
|
||||
Despite its plural name, `pnpm build:plugins` builds only Table Formulas.
|
||||
Source: [Table Formulas repository](https://git.knottywyvern.com/kwyvern/RuneStone_TableFormulas) and the host script `scripts/buildPlugins.mjs`.
|
||||
|
||||
1. Clone the Table Formulas repository into `RuneStone_Table_Formulas` beside the RuneStone folder.
|
||||
2. In that plugin folder, run `pnpm install --frozen-lockfile`.
|
||||
3. In the RuneStone folder, run `pnpm build:plugins`.
|
||||
4. Install the resulting ZIP through [Settings → Plug-ins](plugins.md#install-a-plugin).
|
||||
| Item | Value |
|
||||
| --- | --- |
|
||||
| Prerequisites | Node.js 24, pnpm 10, and the RuneStone source setup. A Table Formulas checkout in `RuneStone_Table_Formulas` beside the RuneStone folder, with `pnpm install --frozen-lockfile` complete. |
|
||||
| Working folder | The RuneStone repository root |
|
||||
| Command | `pnpm build:plugins` |
|
||||
| Output | `<Table Formulas>/releases/runestone.table-formulas-<version>.zip` |
|
||||
|
||||
The ZIP is `../RuneStone_Table_Formulas/releases/runestone.table-formulas-<version>.zip`, relative to RuneStone.
|
||||
The host stages compiled files in `plugin-packages/table-formulas/` for inspection and tests.
|
||||
Set `RUNESTONE_TABLE_FORMULAS_ROOT` when the plugin checkout is elsewhere.
|
||||
The plugin also supports `pnpm package:plugin` from its own folder.
|
||||
Set `RUNESTONE_ROOT` there if its host checkout is elsewhere.
|
||||
The `build:plugins` script builds only Table Formulas. It runs the plugin's `scripts/build.mjs`, which compiles without a type check.
|
||||
It copies the compiled files to `plugin-packages/table-formulas/` in RuneStone. Host tests read that folder.
|
||||
Set `RUNESTONE_TABLE_FORMULAS_ROOT` when the Table Formulas checkout is in a different location.
|
||||
|
||||
The plugin also has its own command. In the Table Formulas folder, `pnpm package:plugin` runs the type check, the build, and the RuneStone packager.
|
||||
It finds the packager in `../RuneStone`. Set `RUNESTONE_ROOT` when the RuneStone checkout is in a different location.
|
||||
|
||||
### Example: Terminal
|
||||
|
||||
Source: [Terminal repository](https://git.knottywyvern.com/kwyvern-gitea/RuneStone_Terminal).
|
||||
Its `package.json` and `scripts/build.mjs` define this example.
|
||||
Source: [Terminal repository](https://git.knottywyvern.com/kwyvern/RuneStone_Terminal), its `package.json`, and its `scripts/build.mjs`.
|
||||
|
||||
1. Clone the Terminal repository into `RuneStone_Terminal` beside the RuneStone folder.
|
||||
2. In that plugin folder, run `pnpm install --frozen-lockfile`.
|
||||
3. In the same folder, run `pnpm build`.
|
||||
4. Install the resulting ZIP through [Settings → Plug-ins](plugins.md#install-a-plugin).
|
||||
| Item | Value |
|
||||
| --- | --- |
|
||||
| Prerequisites | Node.js 24 and pnpm 10. Run `pnpm install --frozen-lockfile` in the Terminal folder. |
|
||||
| Working folder | The Terminal repository root |
|
||||
| Command | `pnpm build` |
|
||||
| Output | `releases/runestone.terminal-<version>.zip` in the Terminal folder |
|
||||
|
||||
The ZIP is `releases/runestone.terminal-<version>.zip`, relative to the Terminal folder.
|
||||
This build bundles its JavaScript dependencies and terminal styles.
|
||||
The host supplies native pseudo-terminal services. The plugin supplies the interface, shortcuts, and session controls.
|
||||
For session controls and appearance, use the [Terminal guide](guides/terminal.md).
|
||||
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).
|
||||
|
||||
### Example: Workspace overview
|
||||
|
||||
Source: the [Workspace overview fixture](../fixtures/plugins/workspace-overview/plugin.json) in this repository.
|
||||
This small example already contains a JavaScript entry module.
|
||||
Source: `fixtures/plugins/workspace-overview/` in this repository. It contains `plugin.json` and a `main.js` that needs no compile step.
|
||||
|
||||
1. From the RuneStone folder, run `pnpm package:plugin fixtures/plugins/workspace-overview`.
|
||||
2. Install the resulting ZIP from the host's `releases/` folder.
|
||||
3. Choose **Install and enable**.
|
||||
4. Choose **Open tab or view → Workspace overview**.
|
||||
| Item | Value |
|
||||
| --- | --- |
|
||||
| Prerequisites | Node.js 24 and the RuneStone source setup |
|
||||
| Working folder | The RuneStone repository root |
|
||||
| Command | `pnpm package:plugin fixtures/plugins/workspace-overview <output-folder>` |
|
||||
| Output | `<output-folder>/org.runestone-example.workspace-overview-1.0.0.zip` |
|
||||
|
||||
You can also use **Commands → Show workspace overview**.
|
||||
This fixture belongs to the host. Release ZIPs for separate plugin projects stay in each plugin's own `releases/` folder.
|
||||
Use an output folder outside the repository. Without one, the ZIP goes into the RuneStone `releases/` folder, which is for installers.
|
||||
After you install and enable the ZIP, open **Plug-in views → Workspace overview**, or run **Commands → Show workspace overview**.
|
||||
|
||||
The RuneStone installer does not include optional plugin packages.
|
||||
After source changes, build the affected package again and install its new ZIP.
|
||||
## Versions and releases
|
||||
|
||||
## Publishing releases
|
||||
|
||||
These requirements apply to RuneStone plugins on any hosting service.
|
||||
The hosting service stores the release files. RuneStone defines the package format, version policy, and installation checks.
|
||||
Users can download a plugin ZIP from any service and install it through [Settings → Plug-ins](plugins.md#install-a-plugin).
|
||||
Installation directly from a repository link depends on RuneStone's support for that service.
|
||||
|
||||
### Release standard for plugin writers and agents
|
||||
|
||||
Apply the [shared versioning rules](#versioning-for-plugin-authors-and-agents) when producing a new ZIP.
|
||||
Use one plugin repository and one standard plugin ZIP per published release.
|
||||
This is a RuneStone release requirement, independent of the hosting service.
|
||||
No repository manifest or special branch layout is required.
|
||||
|
||||
1. Select the tested ZIP from the [shared build procedure](#build-and-release-a-plugin).
|
||||
2. Create a release tag that identifies the source commit used for that ZIP.
|
||||
3. Attach the tested `<id>-<version>.zip` and release notes to a release on your chosen service.
|
||||
4. Publish the release and share its download page or package link.
|
||||
5. Download the published ZIP and test its installation in RuneStone.
|
||||
|
||||
Use `v<version>` for ordinary release tags. Use a clearly named trial tag for temporary prereleases.
|
||||
Identify prereleases clearly on the release page and supply their explicit tags.
|
||||
Keep the manifest, package, metadata, filename, release notes, and tag consistent with the version policy.
|
||||
Each new regular ZIP advances the numeric build version. Each hotfix ZIP advances the lowercase letter suffix.
|
||||
Publishing an existing ZIP does not change its version. Keep published release files unchanged.
|
||||
Moving an unchanged release to another service does not require a new package or version.
|
||||
|
||||
The ZIP must contain `plugin.json` at its root, the compiled entry module, and all required assets and dependencies.
|
||||
Do not use a repository source archive as the plugin package.
|
||||
Keep the single plugin ZIP separate from any source archives that the service generates automatically.
|
||||
Other attachments, such as checksums and release notes, can accompany the plugin ZIP.
|
||||
|
||||
Keep release notes short. State the required RuneStone version, plugin version, changes, and known limits.
|
||||
Give users a link to the plugin ZIP and the [ZIP installation procedure](plugins.md#install-a-plugin).
|
||||
For a private release, users need permission to download the package.
|
||||
|
||||
Test local ZIP installation before publication.
|
||||
After publication, test download, review, disabled installation, enable, disable, and removal with the published ZIP.
|
||||
Check that cancellation leaves no installed package.
|
||||
Check that an existing plugin ID enters the reviewed update flow and retains its settings and enabled state.
|
||||
If RuneStone supports direct installation from that service, also test its repository link and explicit release tag.
|
||||
|
||||
### GitHub Releases
|
||||
|
||||
Attach the tested plugin ZIP to a GitHub release for its source tag.
|
||||
GitHub's automatic source archives do not replace the attached plugin package.
|
||||
See [GitHub's release instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) for publication steps.
|
||||
|
||||
Users download the attached ZIP and install it through **Settings → Plug-ins → Install plugin ZIP**.
|
||||
RuneStone does not yet support installation directly from a GitHub repository link.
|
||||
That feature requires a GitHub download adapter and tests.
|
||||
|
||||
### Gitea releases
|
||||
|
||||
Attach the same standard plugin ZIP to a Gitea release for its source tag.
|
||||
Users can download and install the ZIP, or use RuneStone's [experimental Gitea-link installation](plugins.md#install-from-a-gitea-link-experimental).
|
||||
|
||||
For direct installation, use a repository root link with an optional trailing `.git`.
|
||||
The Gitea server must run at the host root. Use an explicit tag for a prerelease trial.
|
||||
The latest-release route excludes drafts and prereleases. The downloader rejects drafts and releases without exactly one attached ZIP.
|
||||
Automatic source archives do not count as release attachments.
|
||||
Private repositories require read access to both the release metadata and the attachment.
|
||||
|
||||
Use HTTPS for remote releases. The metadata limit is 2 MiB, and the compressed ZIP limit is 100 MiB.
|
||||
The [package limits](#package-contract) also apply to extracted files.
|
||||
For credential handling, redirects, and staged file checks, see the [host download reference](plugin-host.md#gitea-downloads).
|
||||
|
||||
### Other hosting services
|
||||
|
||||
Publish the tested plugin ZIP and its release notes through your chosen service.
|
||||
Users download the ZIP, then use the same local installation procedure.
|
||||
RuneStone has no direct repository-link adapter for GitLab or other services.
|
||||
For version numbers and hotfix suffixes, see [Versions](releases.md#versions).
|
||||
To publish a plugin ZIP, see [Publish a plugin release](releases.md#publish-a-plugin-release).
|
||||
For the release format that Gitea-link installation accepts, see [Gitea downloads](plugin-host.md#gitea-downloads).
|
||||
|
||||
## Plugin API
|
||||
|
||||
The current source adds an optional [completion API](completion.md) for local model providers and plugin-owned text fields.
|
||||
This capability is not present in the existing 0.1.7 installer.
|
||||
|
||||
The entry exports `activate(api)`. Activation can return a cleanup function or a promise for that function.
|
||||
The runtime limits activation and each cleanup callback to five seconds.
|
||||
A timeout reports an error and blocks successful cleanup until the app restarts.
|
||||
The entry module exports `activate(api)`. Activation can return a cleanup function, or a promise for one.
|
||||
|
||||
```js
|
||||
export function activate(api) {
|
||||
@@ -278,181 +194,255 @@ export function activate(api) {
|
||||
}
|
||||
```
|
||||
|
||||
| API | Contract |
|
||||
### Compatibility
|
||||
|
||||
Members marked optional can be absent on older RuneStone hosts.
|
||||
Before you call an optional member, make sure that it exists. If the plugin cannot work without it, show an error that tells the user to update RuneStone.
|
||||
|
||||
```js
|
||||
if (!api.workspace.readBytes) throw new Error("Update RuneStone to use this plugin.");
|
||||
```
|
||||
|
||||
Older hosts ignore unknown fields in objects that you pass to the host, such as a view `icon` or `launch` handler.
|
||||
|
||||
### Activation and cleanup
|
||||
|
||||
- The host limits activation, each view mount, and each cleanup callback to five seconds. A timeout reports an error.
|
||||
After a cleanup timeout or failure, the user cannot enable or remove the plugin until RuneStone restarts.
|
||||
- Plugins activate in every RuneStone window except browser windows.
|
||||
- `api.signal` aborts when shutdown starts. Use it to stop pending work.
|
||||
- After shutdown starts, every API call throws an error. Ignore results that arrive after shutdown.
|
||||
- On disable, the host removes contributions, commands, views, and background frames first. Then it runs view cleanups and `onDispose` callbacks in reverse order.
|
||||
- Remove timers, listeners, and other resources in cleanup. Closing a view and disabling the plugin share the same cleanup promise.
|
||||
- Plugins have full application access. The SDK does not isolate plugin JavaScript.
|
||||
|
||||
### API reference
|
||||
|
||||
| Member | Optional | Contract |
|
||||
| --- | --- | --- |
|
||||
| `api.id` | | The installed plugin ID. |
|
||||
| `api.signal` | | An `AbortSignal` that aborts when shutdown starts. |
|
||||
| `onDispose(callback)` | | Register synchronous or asynchronous cleanup. |
|
||||
| `contribute(key, value)` | | Register a host feature. See [Contributions](#contributions). |
|
||||
| `registerCommand(command)` | | Add a command. See [Commands](#commands). |
|
||||
| `registerView(view)` | | Add a view. See [Views](#views). |
|
||||
| `openView(id, options?)` | | Open a view of this plugin. `options` is `{ split: "right" \| "down", relativeTo }`, where `relativeTo` is the ID of an open editor view of the same plugin. |
|
||||
| `closeView(id)` | yes | Close the editor tabs of a view of this plugin. |
|
||||
| `replaceView(currentId, nextId)` | yes | Show another editor view in the current tab. The tab keeps its position and pin state. |
|
||||
| `replaceDocumentWithView(document, nextId)` | yes | Show an editor view in place of a document tab of this plugin. |
|
||||
| `updateViewTitle(id, title)` | yes | Change a view title. At most 200 characters. |
|
||||
| `updateViewIcon(id, image)` | yes | Set a tab icon from a base64 `data:image/...` URL (PNG, JPEG, GIF, WebP, ICO, or SVG) of at most 90,000 characters. `null` removes it. |
|
||||
| `registerTabDrop(receive)` | yes | Accept a plugin tab that the user drags from another window. One receiver for each plugin. |
|
||||
| `registerDocumentType(type)` | | Recognize workspace files and open them in a plugin editor. See [Document types](#document-types). |
|
||||
| `openDocument(path)` | | Open a recognized document in its own tab. Rejects when no enabled plugin recognizes the file. |
|
||||
| `openFile(path)` | yes | Open a workspace file in the normal RuneStone editor. |
|
||||
| `renameDocument(document, name)` | yes | Rename a recognized document. Returns the new workspace path. |
|
||||
| `workspace.*` | | Read and write files in the active workspace. See [Workspace files](#workspace-files). |
|
||||
| `settings.read()` | | Read the saved JSON settings of the plugin. Returns `null` before the first write. |
|
||||
| `settings.write(value)` | | Save JSON settings, at most 1 MiB. |
|
||||
| `settings.subscribe(listener)` | yes | Receive a call when the saved settings change in any window. Returns a cleanup function. |
|
||||
| `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). |
|
||||
| `git` | yes | Git operations for the active workspace. See [Git API](#git-api). |
|
||||
| `backgrounds` | yes | Background image frames. See [Background API](#background-api). |
|
||||
|
||||
### Commands
|
||||
|
||||
```js
|
||||
api.registerCommand({ id: "next", title: "Next image", icon: "skip-forward", run: () => next() });
|
||||
```
|
||||
|
||||
| Field | Rule |
|
||||
| --- | --- |
|
||||
| `api.id` | The installed plugin ID |
|
||||
| `api.signal` | An abort signal triggered before shutdown |
|
||||
| `contribute(key, value)` | Register a typed terminal or table formula contribution |
|
||||
| `registerCommand({ id, title, run })` | Add a command to Commands in the toolbar |
|
||||
| `registerCommand({ category: "open", ... })` | Add a launch action to Open tab or view |
|
||||
| `registerView({ id, title, placement?, mount })` | Add a view in a dialog or the editor area |
|
||||
| `registerView({ settings: true, ... })` | Add a configuration page to Settings |
|
||||
| `registerView({ launcher: false, ... })` | Keep a dynamic view out of the launch menu |
|
||||
| `registerView({ navigation: true, icon?, ... })` | Add an icon button to the ribbon left of the navigation pane |
|
||||
| `registerDocumentType(type)` | Recognize document content, supply a navigation icon, and mount a document editor |
|
||||
| `openDocument(path)` | Open a recognized document in its own tab |
|
||||
| `renameDocument({ id, path }, name)` | Rename a recognized document and return its new workspace path. Optional API |
|
||||
| `openView(id)` | Open one of the plugin's registered views |
|
||||
| `openView(id, { split, relativeTo })` | Open an editor view beside another view. `split` accepts `right` or `down` |
|
||||
| `closeView(id)` | Close an editor view owned by this plugin. Optional API |
|
||||
| `registerView({ tabActions, find, pinned, ... })` | Supply tab actions, a Find handler, and the initial pin state |
|
||||
| `registerView({ tabDragData, ... })` | Supply transfer data for a tab. The callback receives its pin state |
|
||||
| `registerTabDrop(receive)` | Accept a tab from another window. Optional API |
|
||||
| `onDispose(callback)` | Register synchronous or asynchronous cleanup |
|
||||
| `workspace.list(path?)` | List a directory in this window's active workspace |
|
||||
| `workspace.listMarkdown()` | Return sorted visible Markdown paths in one native request. Optional API |
|
||||
| `workspace.read(path)` | Read a workspace text file |
|
||||
| `workspace.readMany(paths)` | Optional batched text read. Accept at most 64 paths and return a source or error for each path |
|
||||
| `workspace.readBytes(path)` | Read workspace bytes as a Uint8Array, with a 64 MiB limit. Requires the binary document host update |
|
||||
| `workspace.readOptional(path)` | Read text, or return null when the file is absent. Added in 0.1.6 |
|
||||
| `workspace.create(path, contents)` | Create complete text without replacing an existing file. Added in 0.1.6 |
|
||||
| `workspace.write(path, contents, expected)` | Save only if the file still matches the original text |
|
||||
| `workspace.subscribe(listener)` | Receive workspace change notifications. Returns a cleanup function |
|
||||
| `settings.read()` / `settings.write(value)` | Read or write retained JSON settings, with a 1 MiB limit |
|
||||
| `settings.subscribe(listener)` | Receive saved settings changes across windows. Optional API |
|
||||
| `assets.read(path)` | Read package bytes as a `Uint8Array` |
|
||||
| `id` | Lowercase letters, digits, dots, and hyphens. Starts with a letter. Unique among the commands of the plugin. |
|
||||
| `title` | Required text. |
|
||||
| `run` | Required function. Can return a promise. |
|
||||
| `category` | `"action"` (default) adds the command to the **Commands** menu. `"open"` adds it to the **Plug-in views** menu. |
|
||||
| `icon` | Optional. A name from `src/lib/ui/actionIcons.ts`, such as `play`, `pause`, `skip-forward`, or `refresh`, or a view icon name. |
|
||||
|
||||
### Workspace reads
|
||||
Give each command a recognizable icon.
|
||||
|
||||
Check for `workspace.readMany` before calling it. Older hosts require individual reads.
|
||||
Each result contains `path` and either `source` or `error`. One failed file does not discard the remaining results.
|
||||
The native batch accepts at most 64 paths and 16 MiB of combined UTF-8 text.
|
||||
Workspace path checks and plugin shutdown checks apply to these reads.
|
||||
### Views
|
||||
|
||||
### Commands, views, and settings
|
||||
| Field | Rule |
|
||||
| --- | --- |
|
||||
| `id`, `title` | Same rules as for commands. View IDs are unique among the views of the plugin. |
|
||||
| `mount(container, context?)` | Required. Draws the view and can return a cleanup function or a promise. `context.surface` is `"view"` or `"settings"`. |
|
||||
| `placement` | `"dialog"` (default), `"editor"` for a tab in the editor area, or `"sidebar"` for the left pane. |
|
||||
| `navigation` | `true` adds an icon button. See [Navigation buttons](#navigation-buttons). |
|
||||
| `icon` | `list`, `kanban`, `puzzle` (default), `globe`, or `git`. |
|
||||
| `settings` | `true` makes the view a configuration page in Settings. See [Settings pages](#settings-pages). |
|
||||
| `launcher` | `false` keeps the view out of the **Plug-in views** menu. Use it for dynamic views that already have tabs. |
|
||||
| `launch()` | Optional. Runs instead of `openView` when the user opens the view from a menu or a navigation button. |
|
||||
| `pinned` | Initial pin state of an editor tab. |
|
||||
| `tabActions({ pinned })` | Returns extra `ActionMenuItem` entries for the tab menu. |
|
||||
| `find()` | Runs when the user starts Find in this tab. |
|
||||
| `tabDragData({ pinned })` | Returns a string that moves with the tab to another window. The receiver is `registerTabDrop`. |
|
||||
| `saveTabState()` / `restoreTabState(state)` | Save and restore view state when an editor tab moves to another window. |
|
||||
| `toolbar` | Accepted. In the current host, it only removes the view from the ribbon. |
|
||||
|
||||
Command and view IDs must be unique within their respective plugin collections.
|
||||
Plugin commands can supply an optional `icon` from the shared action icon set in `src/lib/ui/actionIcons.ts`.
|
||||
Use a recognizable action icon, such as `skip-forward` or `pause`, for each command. Older hosts can ignore this field.
|
||||
Sidebar views belong in the left navigation. Views with a direct navigation button do not repeat in the plugin launch menu.
|
||||
Plugin configuration appears in Settings under the plugin name.
|
||||
Register a view with `settings: true` to add its configuration page.
|
||||
The host mounts that view inside Settings and removes it from the launch menu.
|
||||
Settings loads enabled plugins so their configuration pages remain available in the separate settings window.
|
||||
The host calls `mount(container, context)` with `context.surface` set to `"settings"` or `"view"`.
|
||||
Older hosts can omit the context argument.
|
||||
Dialog views open in a modal window. Editor views open as tabs beside documents. Document tabs keep their buffers when the user changes views.
|
||||
Closing an editor tab or disabling the plugin disposes the view.
|
||||
|
||||
The language setting applies to RuneStone's interface. The host does not translate plugin interfaces or supply a plugin translation API.
|
||||
Plugin authors can manage translations within their own packages.
|
||||
A `launch()` handler can select a default target and call `api.openView(id)`.
|
||||
Explicit `api.openView` calls and restored tabs do not call `launch()`.
|
||||
Example: [Project Management](https://git.knottywyvern.com/kwyvern/RuneStone_PM/src/branch/main/development.md#workspace-default-board) uses `launch()` to open the default board of the workspace.
|
||||
|
||||
The Open tab or view menu contains plugin views and commands with `category: "open"`.
|
||||
Other commands appear in Commands.
|
||||
Set `launcher: false` on dynamic views that already have tabs.
|
||||
Existing packages can omit these optional fields.
|
||||
### Navigation buttons
|
||||
|
||||
Plugins can call `settings.subscribe(listener)` to receive notifications when their saved settings change.
|
||||
The listener must read the new settings with `settings.read()`.
|
||||
Notifications cross window boundaries and contain only the plugin ID.
|
||||
The host removes subscriptions when the plugin stops.
|
||||
Plugins must ignore pending reads after shutdown and prevent older reads from replacing newer settings.
|
||||
- A view with `navigation: true` and `placement: "sidebar"` gets a button beside Files, Search, and Bookmarks at the top of the left pane. It opens in the left pane, and the **Plug-in views** menu does not show it.
|
||||
- A view with `navigation: true` and another placement gets a button in the ribbon at the left edge of the window. The **Plug-in views** menu also shows it, unless `launcher` is `false`.
|
||||
- Each button shows the view title as a tooltip on hover and keyboard focus.
|
||||
|
||||
### Settings pages
|
||||
|
||||
Register a view with `settings: true` to add a configuration page under the plugin name in Settings.
|
||||
The host mounts that view in the Settings window with `context.surface` set to `"settings"`. The view does not appear in the **Plug-in views** menu.
|
||||
The Settings window loads enabled plugins, so the page is available there.
|
||||
|
||||
To react to a change from another window, call `settings.subscribe(listener)`. Then read the new value with `settings.read()`.
|
||||
The notification contains no data. Ignore reads that finish after shutdown, and do not let an older read replace newer settings.
|
||||
|
||||
RuneStone translates only its own interface. It does not translate plugin text or supply a translation API.
|
||||
|
||||
### Menus
|
||||
|
||||
`ui.showActionMenu({ x, y, items, label?, parent? })` opens the shared action menu at a screen position. It returns `{ close() }`.
|
||||
Each item is `{ label, icon?, shortcut?, run?, children?, disabled?, checked?, radio?, title? }` or `{ separator: true }`. The type is `ActionMenuItem` in `src/lib/ui/actionMenu.ts`.
|
||||
The menu closes on selection, outside click, resize, window blur, scroll, and plugin shutdown.
|
||||
Use this menu instead of a custom menu. See the [interface design reference](ui-design.md).
|
||||
|
||||
### Document types
|
||||
|
||||
Document type IDs must also be unique within their collection.
|
||||
Document types declare file extensions, an `identify` function, and a `mount` function.
|
||||
The identify function returns a stable document ID or null. Invalid documents remain available through the text editor.
|
||||
An optional creation action supplies complete file text. Creation never replaces an existing file.
|
||||
Each document opens in its own editor tab. Opening the same document focuses its existing tab.
|
||||
Closing one tab disposes only that mount. Disabling the plugin disposes all its mounts and removes its navigation entries.
|
||||
The host rejects plugin writes when a note has unsaved editor changes.
|
||||
These document APIs require the current host source. The earlier 0.1.6 installer does not include them.
|
||||
The optional API method `renameDocument({ id, path }, name)` renames a recognized document and returns its new workspace path.
|
||||
The host checks the document ID and plugin owner. It keeps the folder and extension, rejects name collisions, and updates open tabs.
|
||||
A document type lets a plugin open some workspace files in its own editor.
|
||||
|
||||
| Field | Rule |
|
||||
| --- | --- |
|
||||
| `id`, `title` | Same rules as for views. Unique among the document types of the plugin. |
|
||||
| `extensions` | Required list of lowercase extensions without the dot, such as `["md"]`. |
|
||||
| `identify(path, source)` | Returns `{ id }` with a stable document ID, or `null`. |
|
||||
| `mount(container, { id, path })` | Draws the editor. Can return a cleanup function. |
|
||||
| `icon` | `"file"` (default) or `"kanban"`. The file tree shows it. |
|
||||
| `content` | `"text"` (default) or `"binary"`. |
|
||||
| `create` | Optional `{ label, defaultName, extension, contents() }`. `extension` must be in `extensions`. `contents()` returns the complete file text. |
|
||||
|
||||
- Files that `identify` rejects, or that cause an error, stay available in the text editor.
|
||||
- Each document opens in its own tab. A second open of the same document selects its tab.
|
||||
- Closing a tab disposes only that mount. Disabling the plugin disposes all its mounts and removes its file tree icons.
|
||||
- Creation never replaces an existing file.
|
||||
- For binary types, `identify` receives an empty `source`. Identify the file from its path, then read bytes in `mount` with `workspace.readBytes`. Show errors about invalid data in the view.
|
||||
|
||||
`renameDocument({ id, path }, name)` renames a document that this plugin recognizes.
|
||||
The host checks the document ID and the owner. It keeps the folder and the extension, rejects name conflicts, and updates open tabs.
|
||||
Names can contain dots. Hidden names and reserved filename characters are invalid.
|
||||
Unsaved text edits block plugin renames. This method requires the updated host source.
|
||||
Binary document types set `content: "binary"`. Text remains the default.
|
||||
For binary types, `identify(path, source)` receives an empty source string and recognizes the path without reading its contents.
|
||||
The mount reads bytes with `workspace.readBytes(path)` and reports invalid document data in its own view.
|
||||
This avoids UTF-8 conversion and full file reads while the file tree identifies binary documents.
|
||||
The native read command checks the active window's workspace boundary and rejects directories and files larger than 64 MiB.
|
||||
Binary document support requires the updated host source. The earlier 0.1.6 installer does not include it.
|
||||
Check for `api.workspace.readBytes` during activation and report a clear host update error when it is absent.
|
||||
|
||||
### Sidebar views and tab replacement
|
||||
### Workspace files
|
||||
|
||||
Navigation views with `placement: "sidebar"` appear beside Files, Search, and Bookmarks in the top header.
|
||||
Other navigation views appear as icon buttons in the ribbon left of the navigation pane.
|
||||
The optional view `icon` accepts `list`, `kanban`, or `puzzle`. The default is `puzzle`.
|
||||
Buttons show the view title in a tooltip on hover and keyboard focus.
|
||||
The ribbon remains available when the navigation pane is closed.
|
||||
All paths are relative to the active workspace of the window. The host rejects paths outside the workspace.
|
||||
|
||||
The optional `openFile(path)` method opens a workspace file.
|
||||
The optional `replaceView(currentId, nextId)` method changes the current tab while preserving its position and pin state.
|
||||
For document tabs, `replaceDocumentWithView(document, nextId)` supplies the same behavior.
|
||||
Both methods restrict the source and destination to the calling plugin.
|
||||
| Member | Optional | Contract |
|
||||
| --- | --- | --- |
|
||||
| `list(path?)` | | List one folder. Returns `{ name, rel_path, kind }` entries, where `kind` is `"file"` or `"folder"`. |
|
||||
| `listMarkdown()` | yes | Return all `.md`, `.markdown`, and `.mdown` paths in sorted order, in one request. Skips names that start with a dot, and links. |
|
||||
| `read(path)` | | Read a UTF-8 text file. |
|
||||
| `readOptional(path)` | yes | Read a text file, or return `null` when the file does not exist. |
|
||||
| `readMany(paths)` | yes | Read at most 64 text files with a total of at most 16 MiB. Returns `{ path, source }` or `{ path, error }` for each path. |
|
||||
| `readBytes(path)` | yes | Read a file of at most 64 MiB as a `Uint8Array`. |
|
||||
| `create(path, contents)` | yes | Create a text file. Fails when the file exists. |
|
||||
| `write(path, contents, expected)` | | Save the file only if it still contains `expected`. `expected` is required. |
|
||||
| `subscribe(listener)` | yes | Receive a call when a plugin or the host changes workspace files. Returns a cleanup function. |
|
||||
|
||||
### View launch defaults
|
||||
In `readMany`, one failed file does not stop the other reads. More than 64 paths make the whole call fail.
|
||||
`write` and `renameDocument` fail when the file is open in RuneStone with unsaved edits.
|
||||
|
||||
Views can supply an optional `launch()` handler for entry through the plugin launcher or navigation button.
|
||||
The handler can select a default view with `api.openView(id)`.
|
||||
Explicit `api.openView` calls and restored tabs bypass the launch handler and retain their targets.
|
||||
Views without a handler open as before. Older hosts ignore this optional field.
|
||||
Example: [Project Management](../../RuneStone_Project_Management/development.md#workspace-default-board) uses this handler to open its fixed workspace default board.
|
||||
### Contributions
|
||||
|
||||
### Cleanup and contributions
|
||||
`contribute(key, value)` registers a host feature. The types are in `src/lib/plugins/contracts.ts`.
|
||||
Only one enabled plugin can own each key. The host removes contributions before cleanup starts.
|
||||
|
||||
Views can return asynchronous cleanup. Closing a view and disabling its plugin share the same cleanup promise.
|
||||
Remove timers, listeners, and other resources in cleanup. Use the abort signal to stop pending work.
|
||||
The SDK rejects calls after shutdown starts, but it does not isolate JavaScript with full application access.
|
||||
Packages activate in every RuneStone window, including standalone terminal windows.
|
||||
| Key | Purpose | Owner |
|
||||
| --- | --- | --- |
|
||||
| `terminal` | Mounts terminal controls in a host element. Returns update, command, and dispose functions. | Terminal plugin |
|
||||
| `tableFormulas` | Evaluates and renders formulas in Markdown tables. | Table Formulas plugin |
|
||||
| `git` | Supplies line blame for the editor. | Git plugin |
|
||||
| `browser` | The built-in browser. | RuneStone |
|
||||
|
||||
Contribution types live in `src/lib/plugins/contracts.ts`.
|
||||
Only one active package can own each contribution. The runtime removes contributions before cleanup starts.
|
||||
Terminal controls mount into a host element and return update, command, and disposal functions.
|
||||
The plugin must stop its mounted controls and native sessions in `onDispose` before cleanup completes.
|
||||
A terminal contribution must stop its controls and native sessions before its cleanup finishes.
|
||||
|
||||
## Git API
|
||||
|
||||
The optional `git` API supplies status, diff, stage, unstage, commit, and blame operations.
|
||||
The current host source also supplies `push()`, `pull()`, and `graph()`.
|
||||
These methods require an updated host and remain subject to plugin shutdown checks.
|
||||
The host returns structured history from `git.graph()`:
|
||||
|
||||
```js
|
||||
{ commits: [{ id, parents, refs, summary, author, date }] }
|
||||
```
|
||||
|
||||
The history contains at most 100 commits. Parent IDs can refer to commits outside that history.
|
||||
Example: the [Git plugin](../../RuneStone_Git/docs/usage.md#commit-graph) renders these commits and parent links as a graph.
|
||||
For the native service and test setup, see the [Git development guide](../../RuneStone_Git/docs/development.md).
|
||||
|
||||
## Temporary background API
|
||||
|
||||
RuneStone 0.1.25 adds optional `api.backgrounds` with `version: 1`.
|
||||
Example: [Background Slideshow](../../RuneStone_Background_Slideshow/docs/development.md#integration) publishes frames from local image folders.
|
||||
Example: [Project Management](../../RuneStone_Project_Management/development.md#pm-0229-slideshow-backgrounds) consumes frames for board backgrounds.
|
||||
`api.git` gives Git operations for the active workspace of the window. The host runs the `git` command, one operation at a time.
|
||||
The types are in `src/lib/git/contracts.ts`. Every method checks for plugin shutdown first.
|
||||
|
||||
| Method | Contract |
|
||||
| --- | --- |
|
||||
| `chooseFolder()` | Open the native folder picker. Return an absolute path or null on cancellation. |
|
||||
| `defaultFolder()` | Optional. Create and return Pictures/RuneStone Backgrounds for new settings. |
|
||||
| `list(folder)` | List PNG, JPEG, GIF, and WebP filenames directly inside the folder. |
|
||||
| `read(folder, name)` | Read one raster image as bytes, with a 50 MiB limit. |
|
||||
| `set(target, frame)` | Apply a temporary frame. Pass null to remove this plugin's frame. |
|
||||
| `get(target)` | Read the active frame or null. |
|
||||
| `subscribe(listener)` | Receive the changed target. Return a cleanup function. |
|
||||
| `status()` | Returns `{ available, repository, branch, changes }`. Each change has `path`, `originalPath?`, `index`, and `worktree`. |
|
||||
| `diff(path, staged)` | Returns the diff text of one file. |
|
||||
| `stage(paths)` / `unstage(paths)` | Change the index for 1 to 10,000 paths. |
|
||||
| `commit(message)` | Commit the staged changes. The message has 1 to 65,536 bytes. |
|
||||
| `push()` / `pull()` | Push or pull the current branch. |
|
||||
| `graph()` | Returns `{ commits }` with at most 100 commits from all refs. |
|
||||
| `commitDetails(commit)` | Returns `{ id, parents, author, date, message, files }` for a full commit ID. |
|
||||
| `commitDiff(commit, path)` | Returns the diff of one file in a commit, compared to the first parent. |
|
||||
| `blame(path, line)` | Returns `{ commit, author, date, summary }` for one line, or `null`. `date` is ISO 8601. |
|
||||
|
||||
Targets are `app`, `pm-all`, and `pm-board:<board UUID>`.
|
||||
A frame contains `url`, `overlay`, `position`, and `size`.
|
||||
It can also contain `previous` with those four fields and `transitionMs` from 0 to 5000.
|
||||
Renderers fade between these frames unless reduced motion is active. Keep both blob URLs valid until replacement or cleanup.
|
||||
Use a blob URL. The publishing plugin owns the URL and must release it after replacement or cleanup.
|
||||
Overlay ranges from -1 to 1. Negative values lighten the image, and positive values darken it.
|
||||
Position and size use the same choices as custom image settings.
|
||||
Each graph commit is `{ id, parents, refs, summary, author, date }`. Parent IDs can refer to commits outside the 100 returned commits.
|
||||
Older hosts can have `git` without `push`, `pull`, `graph`, `commitDetails`, or `commitDiff`. Make sure that a method exists before you call it.
|
||||
Example: the [Git plugin](https://git.knottywyvern.com/kwyvern/RuneStone_Git/src/branch/main/docs/usage.md#commit-graph) draws the graph from these commits.
|
||||
For its native service and test setup, see the [Git plugin development guide](https://git.knottywyvern.com/kwyvern/RuneStone_Git/src/branch/main/docs/development.md).
|
||||
|
||||
Frames belong to the plugin activation in the current window. They do not change saved background settings.
|
||||
The last published frame wins. Removing it reveals an earlier active frame or the saved background.
|
||||
Disable removes the plugin's frames and subscriptions before cleanup.
|
||||
File access requires an active plugin lease. Pending reads fail after access is revoked.
|
||||
Image reads reject path traversal, linked files, unsupported formats, and oversized files.
|
||||
## Background API
|
||||
|
||||
Use the plugin settings API to share saved configuration across windows. Temporary frames remain local to each window.
|
||||
`api.backgrounds` (`version: 1`) lets a plugin show image frames behind the RuneStone interface.
|
||||
Frames stay in the current window and do not change the saved appearance settings.
|
||||
|
||||
### Per-image background settings
|
||||
| Method | Optional | Contract |
|
||||
| --- | --- | --- |
|
||||
| `chooseFolder()` | | Open the folder picker. Returns an absolute path, or `null` on cancel. |
|
||||
| `defaultFolder()` | yes | Create `RuneStone Backgrounds` in the Pictures folder of the user and return its path. |
|
||||
| `list(folder)` | | Return `{ name }` for PNG, JPEG, GIF, and WebP files directly in the folder. |
|
||||
| `read(folder, name)` | | Read one image as bytes, at most 50 MiB. |
|
||||
| `readImageSettings(folder)` | yes | Read the per-image settings file text, or `null`. |
|
||||
| `writeImageSettings(folder, contents, expected)` | yes | Save the per-image settings file. See [Per-image settings](#per-image-settings). |
|
||||
| `set(target, frame)` | | Show a frame for a target. `null` removes the frame of this plugin. |
|
||||
| `get(target)` | | Return the active frame for a target, or `null`. |
|
||||
| `subscribe(listener)` | | Receive the target name when a frame changes. Returns a cleanup function. |
|
||||
|
||||
The optional background API adds `readImageSettings` and `writeImageSettings`.
|
||||
The sidecar file is `.runestone-backgrounds.json` beside the images, with schema 1, an `images` object, and a 1 MiB limit.
|
||||
Writes compare the previous file text to preserve external changes.
|
||||
Temporary frames can supply `blurredUrl`. Each target scales the foreground and blurred layer separately.
|
||||
The plugin owns all frame URLs and releases them after replacement or shutdown.
|
||||
See the [Slideshow image settings example](../../RuneStone_Background_Slideshow/docs/development.md#per-image-settings) for its storage and rendering behavior.
|
||||
Folders must be absolute paths without `..` segments.
|
||||
The host rejects links, files with other extensions, files that are not raster images, and files over the size limit.
|
||||
File access needs an enabled plugin in the current window. Pending reads fail after the plugin stops.
|
||||
|
||||
### Targets and frames
|
||||
|
||||
| Target | Use |
|
||||
| --- | --- |
|
||||
| `app` | The host shows this frame behind the app. |
|
||||
| `pm-all` | Read by Project Management for all boards. |
|
||||
| `pm-board:<board UUID>` | Read by Project Management for one board. |
|
||||
|
||||
| Frame field | Rule |
|
||||
| --- | --- |
|
||||
| `url` | Required `blob:` URL. |
|
||||
| `blurredUrl` | Optional `blob:` URL for a blurred layer. Each target scales it separately from the foreground. |
|
||||
| `overlay` | From -1 to 1. Negative values make the image lighter. Positive values make it darker. |
|
||||
| `position` | `center`, `top left`, `top`, `top right`, `left`, `right`, `bottom left`, `bottom`, or `bottom right`. |
|
||||
| `size` | `cover`, `contain`, or `auto`. |
|
||||
| `previous` | Optional earlier frame with the same fields, without `previous` or `transitionMs`. |
|
||||
| `transitionMs` | Optional fade time from 0 to 5,000 milliseconds. |
|
||||
|
||||
The host fades from `previous` to the new frame, unless the user turns on reduced motion.
|
||||
The plugin owns all frame URLs. Keep them valid until a new frame replaces them or the plugin stops, then release them.
|
||||
When more than one plugin sets a frame for a target, the most recent frame is shown. When it is removed, the host shows the earlier frame or the saved background.
|
||||
Disable removes the frames and subscriptions of the plugin before cleanup.
|
||||
To share saved configuration across windows, use the plugin settings API.
|
||||
|
||||
Example: [Background Slideshow](https://git.knottywyvern.com/kwyvern/RuneStone_BG_Slideshow/src/branch/main/docs/development.md#integration) sets frames from local image folders.
|
||||
Example: [Project Management](https://git.knottywyvern.com/kwyvern/RuneStone_PM/src/branch/main/development.md#pm-0229-slideshow-backgrounds) reads frames for board backgrounds.
|
||||
|
||||
### Per-image settings
|
||||
|
||||
The per-image settings file is `.runestone-backgrounds.json` in the image folder.
|
||||
It must be JSON with `"schema": 1` and an `images` object, at most 1 MiB.
|
||||
`writeImageSettings` compares the current file to `expected` (`null` when the file does not exist). It fails when the file changed, so external edits are not lost.
|
||||
Example: the [Background Slideshow image settings](https://git.knottywyvern.com/kwyvern/RuneStone_BG_Slideshow/src/branch/main/docs/development.md#per-image-settings) give the storage format and the rendering behavior.
|
||||
|
||||
+147
-105
@@ -1,10 +1,8 @@
|
||||
# Plugin host internals and checks
|
||||
# Plugin host internals
|
||||
|
||||
[Development](development.md) · [Plugin development](plugin-development.md) · [Install and manage plugins](plugins.md)
|
||||
|
||||
This reference is for developers who change RuneStone's plugin host.
|
||||
It covers package storage, installation and removal transactions, remote downloads, source modules, and checks.
|
||||
Plugin authors should use the [package and API reference](plugin-development.md).
|
||||
This reference describes how RuneStone stores, installs, downloads, and removes plugins, for developers who change the plugin host.
|
||||
|
||||
- [Storage and recovery](#storage-and-recovery)
|
||||
- [Gitea downloads](#gitea-downloads)
|
||||
@@ -12,137 +10,181 @@ Plugin authors should use the [package and API reference](plugin-development.md)
|
||||
|
||||
## Storage and recovery
|
||||
|
||||
RuneStone resolves the root through Tauri's `app_data_dir()`. Settings shows the complete path.
|
||||
The native plugin service is in `src-tauri/src/plugins.rs`. Its root is the Tauri `app_data_dir()`.
|
||||
|
||||
```text
|
||||
<application-data>/
|
||||
plugins/<plugin-id>/
|
||||
plugin.json
|
||||
main.js
|
||||
assets/
|
||||
plugin-state.json catalog: manifest, hash, enabled state, install time, removal record
|
||||
plugins/<plugin-id>/ installed packages
|
||||
plugin-data/<plugin-id>/settings.json
|
||||
plugin-state.json
|
||||
plugin-staging/
|
||||
plugin-removals/
|
||||
plugin-staging/ review copies, update backups, and update-<uuid>.json journals
|
||||
plugin-removals/<token>/ packages during confirmed removal
|
||||
```
|
||||
|
||||
Rust stores desired enable states in `plugin-state.json` and broadcasts changes to open windows.
|
||||
The browser preview has no installed plugins unless a smoke test supplies a desktop mock.
|
||||
**Settings → Plug-ins → Open plugins folder** opens `plugins/`.
|
||||
The service writes `plugin-state.json` to a temporary file, then renames it. It reads at most 4 MiB from that file.
|
||||
After each change, the service sends the `plugins-changed` event to all windows. A settings write sends `plugin-settings-changed` with the plugin ID.
|
||||
The browser preview (`pnpm dev`) has no installed plugins unless a smoke test supplies a desktop mock.
|
||||
|
||||
Startup, window focus, Refresh, and a five-second poll scan installed files.
|
||||
Changed packages stop running and require another enable decision. Missing packages are never restored automatically.
|
||||
Valid packages copied directly into the managed directory appear disabled.
|
||||
Staging directories never participate in plugin discovery.
|
||||
### Scans
|
||||
|
||||
Each reviewed candidate belongs to one window and expires after 30 minutes.
|
||||
Rust checks the source and staged content hashes before publishing a complete directory.
|
||||
An untracked destination blocks publication. Reviewed updates pin the installed package hash and retain a recovery journal.
|
||||
A crash cannot enable a partial installation.
|
||||
Each window asks for a new snapshot at these times:
|
||||
|
||||
Removal plans belong to one window and expire after five minutes.
|
||||
The backend accepts a single-use removal token when the user confirms deletion.
|
||||
A changed package requires a new confirmation.
|
||||
Runtime cleanup must complete in every window before the package moves into `plugin-removals/`.
|
||||
A persisted record identifies that directory and the original file hashes.
|
||||
Recovery deletes only unchanged remaining files from that confirmed transaction. It cannot target a newly installed copy.
|
||||
Install and removal operations share one native service and serialize their state changes.
|
||||
| Trigger | Source |
|
||||
| --- | --- |
|
||||
| Window start | `startExternalPlugins` in `src/lib/plugins/external.ts` |
|
||||
| Window focus | The same function |
|
||||
| Every 5 seconds | The same function. It finds changes from a file manager. |
|
||||
| **Refresh** in Settings → Plug-ins | `PluginManager.svelte` |
|
||||
| `plugins-changed` event | Any change from another window |
|
||||
|
||||
### Installation and update transactions
|
||||
A scan reads files and hashes only. It does not run code, install dependencies, or run scripts.
|
||||
|
||||
RuneStone copies source packages without modifying them. The review shows author, version, source, destination, and access.
|
||||
Users can inspect the ZIP without extracting it for installation.
|
||||
The picker accepts at most 100 ZIPs. Folders and loose manifests are not installation inputs.
|
||||
Legacy `.runestone-plugin` archives use ZIP format and can be renamed to `.zip` for installation.
|
||||
Installed packages and saved settings do not need migration.
|
||||
- A package with a changed hash gets an error and becomes disabled. The user must review it and enable it again.
|
||||
- When a package folder is missing, the service removes its catalog entry. It never restores a missing package.
|
||||
- A valid package that someone copies directly into `plugins/` appears as disabled, with an unknown install time.
|
||||
- The service never scans `plugin-staging/`.
|
||||
|
||||
Scanning and installation do not execute code, install dependencies, or run scripts.
|
||||
Package metadata and hashes do not prove publisher identity. There is no permission sandbox or marketplace.
|
||||
An installed ID selects the update flow. Updates retain settings and the previous enabled state.
|
||||
Runtime cleanup must succeed in every window before replacement.
|
||||
An interrupted update restores the old package unless the new catalog entry committed.
|
||||
Each package succeeds or fails independently. A changed source requires a new review.
|
||||
Canceling the review removes temporary copies. Automatic repository scans remain future work.
|
||||
### Install and update
|
||||
|
||||
### Removal behavior
|
||||
1. The ZIP picker accepts at most 100 `.zip` files. Folders and loose manifests are not installation inputs.
|
||||
2. For each ZIP, the service applies the [package contract](plugin-development.md#package-contract) and writes a review copy to `plugin-staging/<token>/`. It does not change the source file.
|
||||
3. The review shows the name, author, version, description, source, and destination. For an update, it also shows the installed and new versions. Each review belongs to one window and expires after 30 minutes. Closing the window discards it.
|
||||
4. At install, the service makes sure that the source and the review copy still have the reviewed hash.
|
||||
5. The service saves the new catalog entry as disabled and moves the review copy into `plugins/<id>/`. Then it enables the plugin if the user chose **Install and enable**. A crash cannot enable a partial package.
|
||||
|
||||
The uninstall dialog initially focuses Cancel. Escape cancels removal.
|
||||
Each uninstall requires a new confirmation. Cancel preserves files and enabled state.
|
||||
Disable instead stops the plugin and retains its installed files.
|
||||
Confirmed removal deletes only the installed package after cleanup in every window.
|
||||
Source downloads, settings, generated data, and workspace documents remain intact.
|
||||
Loaded JavaScript can remain in memory until RuneStone closes, so the app requests a restart.
|
||||
Cleanup failure blocks deletion. Interrupted deletion shows Removal incomplete and permits Retry cleanup.
|
||||
Changed remaining files block further deletion. Reinstallation requires a new enable decision and can reuse retained settings.
|
||||
A package with an installed ID starts an update:
|
||||
|
||||
1. The service disables the plugin and waits up to 10 seconds for every window to stop it.
|
||||
2. It writes an `update-<uuid>.json` journal, moves the old package to a backup folder, and moves the new package into place.
|
||||
3. It saves the catalog with the new hash and the previous enabled state. Settings in `plugin-data/` stay the same.
|
||||
4. At startup, an uncommitted journal restores the old package, disabled. A committed journal deletes the backup.
|
||||
|
||||
Each package succeeds or fails independently. Cancel deletes the review copies.
|
||||
|
||||
### Removal
|
||||
|
||||
1. **Uninstall** makes a removal plan with a hash of the package folder. The plan belongs to one window and expires after 5 minutes.
|
||||
2. Confirmation uses the plan token once. A changed package needs a new confirmation.
|
||||
3. The service disables the plugin and waits up to 10 seconds for every window to finish cleanup. A cleanup failure blocks removal until RuneStone restarts.
|
||||
4. The service saves a removal record with the SHA-256 hash of each file. Then it moves the folder to `plugin-removals/<token>/` and deletes it.
|
||||
5. If deletion stops, Settings shows **Removal incomplete** and **Retry cleanup**. Retry deletes the folder only when every remaining file matches its recorded hash. Otherwise it stops and names the folder.
|
||||
6. At startup, the service examines each removal record. If the package is still in `plugins/` and its removal folder does not exist, the service clears the record. The plugin stays disabled.
|
||||
|
||||
Removal keeps `plugin-data/`, source ZIPs, and workspace documents. Loaded JavaScript can stay in memory, so RuneStone asks for a restart.
|
||||
The uninstall dialog puts focus on **Cancel**. Escape cancels.
|
||||
|
||||
### Runtime leases
|
||||
|
||||
`plugins_load` returns the entry module and records a lease for the window. `plugins_release` ends the lease and records any cleanup error.
|
||||
Updates and removals wait for all leases to end. A recorded cleanup error blocks enable, update, and removal until RuneStone restarts.
|
||||
Native services for plugins, such as the background file commands, need a lease for the calling window.
|
||||
|
||||
## Gitea downloads
|
||||
|
||||
For publication on any service, use the [shared publishing guidance](plugin-development.md#publishing-releases).
|
||||
This section describes the current Gitea download adapter.
|
||||
|
||||
Gitea repository links now supply ZIP packages to the existing review and installation flow.
|
||||
This trial supports Gitea at the host root, including the personal Gitea server.
|
||||
GitHub and GitLab support remain future work. Their release APIs need separate tests.
|
||||
|
||||
Use the [Gitea installation procedure](plugins.md#install-from-a-gitea-link-experimental) to test a published package.
|
||||
For example, `https://git.knottywyvern.com/kwyvern-gitea/RuneStone_Terminal` is a repository root link.
|
||||
That link works for installation only when its selected release contains a plugin ZIP.
|
||||
|
||||
The link can end in `.git`. SSH links, branch links, source archives, and links with credentials are not installation inputs.
|
||||
Use an explicit tag for a prerelease trial. The latest-release route excludes drafts and prereleases.
|
||||
RuneStone clears the token after each request and when the form closes. It does not save the token.
|
||||
Use HTTPS. HTTP is available for trusted local servers, but it sends the token and package without encryption.
|
||||
Credentials go only to the original API origin. Redirects to another origin do not receive the token.
|
||||
A release attachment on another private host needs its own access method and is outside this trial.
|
||||
|
||||
The downloader reads release metadata, then downloads one attached ZIP.
|
||||
`src-tauri/src/plugin_sources.rs` gets a plugin ZIP from a Gitea release. It is separate from package checks and installation.
|
||||
It does not clone the repository, compile code, install dependencies, or run scripts.
|
||||
Downloads have size limits, time limits, and a redirect limit.
|
||||
The metadata limit is 2 MiB. The compressed ZIP limit is 100 MiB.
|
||||
The [package limits](plugin-development.md#package-contract) still apply to the extracted files.
|
||||
HTTPS links cannot redirect or select an attachment over HTTP.
|
||||
For the user procedure, see [Install from a Gitea link](plugins.md#install-from-a-gitea-link-experimental).
|
||||
|
||||
The review shows the repository, release tag, attachment link, manifest, and destination.
|
||||
It pins the downloaded content. Installation checks that the staged files still match the reviewed hash.
|
||||
Changing a remote release after review does not change the pending installation.
|
||||
The same duplicate-ID, enable, removal, and cleanup rules apply to local and remote packages.
|
||||
### Accepted links and releases
|
||||
|
||||
- The link is a repository root, `https://<host>/<owner>/<repository>`, with an optional `.git` or trailing slash. Gitea must run at the root of the host.
|
||||
- Links with credentials, a query, or a fragment are invalid. SSH links and branch links are invalid.
|
||||
- Without a tag, the service reads `/api/v1/repos/<owner>/<repository>/releases/latest`. Gitea excludes drafts and prereleases from this route.
|
||||
- With a tag (at most 200 characters), it reads `/releases/tags/<tag>`. Use an explicit tag for a prerelease.
|
||||
- The release must not be a draft. It must have exactly one `.zip` attachment. Automatic source archives are not attachments.
|
||||
|
||||
### Limits
|
||||
|
||||
| Limit | Value |
|
||||
| --- | --- |
|
||||
| Release metadata | 2 MiB |
|
||||
| Plugin ZIP | 100 MiB |
|
||||
| Redirects for each request | 5 |
|
||||
| Total time for each request | 60 seconds |
|
||||
| Connection time | 10 seconds |
|
||||
|
||||
The [package limits](plugin-development.md#paths-and-limits) also apply to the extracted files.
|
||||
|
||||
### HTTPS, HTTP, and credentials
|
||||
|
||||
- For an HTTPS repository link, the ZIP link must use HTTPS. The service refuses a redirect from HTTPS to HTTP.
|
||||
- HTTP links work for trusted local servers. The form shows a warning that HTTP sends the token and the package without encryption.
|
||||
- The service sends the token as `Authorization: token <value>`, only to the origin of the release API. Redirects to another origin do not get the token.
|
||||
- The form clears the token after each request and when it closes. RuneStone does not save the token.
|
||||
- A private repository needs a token with read access to the release metadata and the attachment.
|
||||
|
||||
### Review
|
||||
|
||||
The service writes the downloaded bytes to `plugin-staging/`, applies the same checks as a local ZIP, and deletes the archive.
|
||||
The review shows the repository, the tag, and the attachment link without its query. It pins the downloaded hash.
|
||||
A change to the remote release after review does not change the pending installation.
|
||||
The same ID, enable, update, and removal rules apply to local and remote packages.
|
||||
|
||||
## Modules and checks
|
||||
|
||||
| Module | Owns |
|
||||
| --- | --- |
|
||||
| `src-tauri/src/plugins.rs` | Discovery, validation, installation, persistence, removal plans, and cleanup acknowledgments |
|
||||
| `src/lib/plugins/PluginManager.svelte` | Package review, switches, and the uninstall dialog |
|
||||
| `src/lib/plugins/sdk.ts` | External package types |
|
||||
| `src/lib/plugins/externalSession.ts` | Activation, contributions, view disposal, and shutdown |
|
||||
| `src/lib/plugins/external.ts` | Native state synchronization and external module loading |
|
||||
| `src/lib/plugins/PluginTools.svelte` | External commands and views |
|
||||
| `src/lib/plugins/registry.ts` / `contracts.ts` | Shared feature contributions and their types |
|
||||
| `src/lib/plugins/TerminalSlot.svelte` | The host element for terminal controls |
|
||||
| `../RuneStone_Terminal/src/` | Terminal plugin source in its own repository |
|
||||
| `../RuneStone_Table_Formulas/` | Table Formulas source, unit tests, and package build |
|
||||
| `scripts/buildPlugins.mjs` | Table Formulas compilation and ZIP release in `../RuneStone_Table_Formulas/releases/` |
|
||||
| `scripts/packagePlugin.mjs` | Shared checks and ZIP creation for plugin authors |
|
||||
| `src-tauri/src/plugins.rs` | Package checks, discovery, installation, updates, persistence, removal, leases, settings, and assets |
|
||||
| `src-tauri/src/plugin_sources.rs` | Gitea link parsing and release downloads |
|
||||
| `src-tauri/src/backgrounds.rs` | Background folder and image commands |
|
||||
| `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 |
|
||||
| `src/lib/plugins/registry.ts` / `contracts.ts` | Shared contributions and their types |
|
||||
| `src/lib/plugins/access.ts` / `PluginAccessMenu.svelte` | The **Plug-in views** and **Commands** menus |
|
||||
| `src/lib/plugins/PluginManager.svelte` | Settings → Plug-ins: review, switches, Gitea form, and uninstall dialog |
|
||||
| `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/completion/` | The [completion API](completion.md) |
|
||||
| `scripts/packagePlugin.mjs` | The packager for plugin authors |
|
||||
| `scripts/buildPlugins.mjs` | The [Table Formulas build](plugin-development.md#example-table-formulas) |
|
||||
|
||||
Complete the [host source setup](development.md#run-from-source) and the [plugin build prerequisites](plugin-development.md#build-examples) first.
|
||||
Run host commands from the RuneStone repository root.
|
||||
Use the [development checks](development.md#checks) for type checks, unit tests, frontend compilation, and native tests.
|
||||
For Table Formulas, use its [build example](plugin-development.md#example-table-formulas).
|
||||
For Terminal, run `pnpm check`, `pnpm test`, and `pnpm build` in `RuneStone_Terminal`.
|
||||
Build Terminal before host browser tests. They read `../RuneStone_Terminal/dist/` by default.
|
||||
Set `RUNESTONE_TERMINAL_DIST` to use another compiled terminal folder.
|
||||
The Rust tests use real temporary files and archives. Browser tests mock desktop calls and exercise the real UI and module loader.
|
||||
Complete the [browser test setup](development.md#browser-smoke-tests), then run these checks from the RuneStone repository root:
|
||||
### Run the plugin checks
|
||||
|
||||
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).
|
||||
|
||||
Some tests load the compiled feature plugins:
|
||||
|
||||
- `pnpm build:plugins` makes `plugin-packages/table-formulas/`. `scripts/plugins.spec.ts` and the feature smoke tests need it.
|
||||
- The smoke tests read Terminal 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
|
||||
node --experimental-strip-types --test scripts/plugins.spec.ts scripts/externalPlugins.spec.ts scripts/pluginPackaging.spec.ts scripts/pluginHostExtensions.spec.ts scripts/pluginDocuments.spec.ts scripts/pluginAccess.spec.ts scripts/completion.spec.ts scripts/backgrounds.spec.ts
|
||||
```
|
||||
|
||||
Native tests use real temporary files and archives:
|
||||
|
||||
```powershell
|
||||
cargo test --manifest-path src-tauri/Cargo.toml --lib plugin
|
||||
```
|
||||
|
||||
Browser smoke tests mock desktop calls and use the real interface and module loader. Run them while `pnpm dev` runs:
|
||||
|
||||
```powershell
|
||||
node scripts/pluginInstall.smoke.mjs
|
||||
node scripts/plugins.smoke.mjs
|
||||
node scripts/pluginAccess.smoke.mjs
|
||||
node scripts/pluginChoiceMenus.smoke.mjs
|
||||
node scripts/pluginFind.smoke.mjs
|
||||
node scripts/pluginTabOrder.smoke.mjs
|
||||
node scripts/settings.smoke.mjs
|
||||
cargo test --manifest-path src-tauri/Cargo.toml --lib plugin
|
||||
```
|
||||
|
||||
The installation smoke test covers the link form, download errors, token clearing, cancellation, focus, and disabled installation.
|
||||
Native tests cover URL parsing, release selection, redirects, credential boundaries, size limits, changed staging files, and invalid ZIPs.
|
||||
For the recorded four-package trial and its repeat command, see the [October 5 test record](archive/plugin-release-trial-2026-10-05.md).
|
||||
`pluginInstall.smoke.mjs` covers the link form, download errors, token clearing, cancel, focus, and disabled installation.
|
||||
The native tests cover link parsing, release selection, redirects, credential boundaries, size limits, changed review copies, and invalid ZIPs.
|
||||
|
||||
Native plugin packages and restricted permissions remain future work.
|
||||
The core keeps basic Markdown tables, file editing, selection, sorting, and document access when optional features stop.
|
||||
Two native release tests are ignored by default:
|
||||
|
||||
| Test | Setup |
|
||||
| --- | --- |
|
||||
| `four_plugin_release_trial` | Set `RUNESTONE_GIT_TRIAL_PACKAGES` to a folder that contains exactly four plugin ZIPs. |
|
||||
| `live_gitea_release_trial` | Set `RUNESTONE_GIT_TRIAL_URL`, `RUNESTONE_GIT_TRIAL_TAG`, and `RUNESTONE_GIT_TRIAL_ZIP` (the expected ZIP). Set `RUNESTONE_GIT_TRIAL_TOKEN` for a private repository. |
|
||||
|
||||
```powershell
|
||||
cargo test --manifest-path src-tauri/Cargo.toml --lib four_plugin_release_trial -- --ignored --nocapture
|
||||
```
|
||||
|
||||
+58
-74
@@ -2,118 +2,102 @@
|
||||
|
||||
[RuneStone](../README.md) · [User guide](user-guide.md)
|
||||
|
||||
Plugins add optional features such as Terminal, Table Formulas, Git, and PDF Viewer.
|
||||
Use **Settings → Plug-ins** to install, update, enable, disable, or uninstall them.
|
||||
The Browser is included with RuneStone and needs no plugin.
|
||||
This guide explains how to install, enable, update, and remove optional plugins such as Terminal, Git, and PDF Viewer.
|
||||
|
||||
Manage all plugins in **Settings → Plug-ins**. The built-in browser is part of RuneStone and is not a plugin.
|
||||
|
||||
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 plugin's release ZIP. Keep the file compressed.
|
||||
Each ZIP installs one plugin. You can select up to 100 ZIPs at once.
|
||||
Get the release ZIP of the plugin, such as `runestone.terminal-<version>.zip`. Do not extract it.
|
||||
|
||||
1. Open **Settings → Plug-ins**.
|
||||
2. Choose **Install plugin ZIP**.
|
||||
3. Select the ZIP files.
|
||||
4. Review each plugin's name, author, version, source, destination, and access level.
|
||||
5. Choose **Install and enable** to use the plugins, or **Install** to keep them disabled.
|
||||
3. Select one or more ZIP files. You can select up to 100 at a time.
|
||||
4. Review the name, author, version, source, and destination of each plugin.
|
||||
5. Choose **Install and enable**, or choose **Install** to install the plugin disabled.
|
||||
|
||||
For example, a Terminal package uses the filename `runestone.terminal-<version>.zip`.
|
||||
The version in the filename identifies the release. Select the actual ZIP you received.
|
||||
Use the same steps for other plugins.
|
||||
|
||||
Plugins run with RuneStone's application access. Enable only code you trust.
|
||||
The author field does not prove the publisher's identity. Plugins have no permission sandbox.
|
||||
|
||||
RuneStone copies the packages into its application data folder. It keeps your downloaded ZIPs unchanged.
|
||||
The review and installation steps do not run plugin code or installation scripts.
|
||||
Each package succeeds or fails separately. Check the result for any failed packages.
|
||||
RuneStone copies each plugin into its application data folder and keeps your ZIP unchanged.
|
||||
The review and installation do not run plugin code.
|
||||
Each package installs or fails separately. Read the result for each package.
|
||||
|
||||
## Enable or disable a plugin
|
||||
|
||||
Use the switch beside the plugin in **Settings → Plug-ins**.
|
||||
The **Enabled** or **Disabled** status shows your choice.
|
||||
That choice applies across RuneStone windows and persists after restart.
|
||||
No optional plugin starts automatically in a fresh installation.
|
||||
Use the switch beside the plugin. The status shows **Enabled** or **Disabled**.
|
||||
Your choice applies to all windows and stays after a restart. A new installation of RuneStone starts with all plugins disabled.
|
||||
|
||||
Disabling stops the plugin and keeps its installed files, settings, and workspace documents.
|
||||
Disabling a plugin stops it and keeps its files, settings, and workspace documents.
|
||||
If RuneStone asks for a restart, close all RuneStone windows and open the app again.
|
||||
Some loaded code can remain in memory until the app closes.
|
||||
|
||||
## Update a plugin
|
||||
|
||||
1. Get the new release ZIP for the plugin.
|
||||
2. Open **Settings → Plug-ins → Install plugin ZIP**.
|
||||
1. Get the new release ZIP of the plugin.
|
||||
2. Open **Settings → Plug-ins** and choose **Install plugin ZIP**.
|
||||
3. Select the ZIP.
|
||||
4. Review the current and new versions.
|
||||
5. Choose **Apply packages**.
|
||||
|
||||
RuneStone recognizes an update by the plugin ID.
|
||||
Updates keep the plugin's settings and its previous enabled or disabled state.
|
||||
RuneStone stops the plugin in every window before replacing its files.
|
||||
If cleanup fails, the update stops. Restart RuneStone before you try again.
|
||||
RuneStone matches the update to the installed plugin by its ID. The update keeps the plugin settings and its enabled or disabled state.
|
||||
RuneStone stops the plugin in every window before it replaces the files.
|
||||
If the dialog contains an update, it shows only **Apply packages**. New plugins in the same selection install disabled.
|
||||
|
||||
## Uninstall a plugin
|
||||
|
||||
1. Open **Settings → Plug-ins**.
|
||||
2. Choose **Uninstall** beside the plugin.
|
||||
3. Check the plugin details and deletion message.
|
||||
2. Choose **Uninstall** (the trash button) beside the plugin.
|
||||
3. Read the plugin details and the deletion message.
|
||||
4. Choose **Uninstall and delete files**.
|
||||
|
||||
Uninstall removes the installed package after the plugin stops in every window.
|
||||
It keeps downloaded ZIPs, plugin settings, generated data, and workspace documents.
|
||||
For example, Table Formulas leaves formula source in your Markdown files.
|
||||
Installing the plugin again can reuse its retained settings, but you must choose whether to enable it.
|
||||
RuneStone stops the plugin in every window, then deletes its installed folder.
|
||||
It keeps your downloaded ZIP, the plugin settings, and your workspace documents. For example, Table Formulas leaves the formula text in your Markdown files.
|
||||
If you install the plugin again, it can use the kept settings. You choose again whether to enable it.
|
||||
|
||||
**Cancel** leaves the plugin unchanged. **Disable instead** stops it and keeps the package installed.
|
||||
If RuneStone asks for a restart, close all RuneStone windows and open the app again.
|
||||
**Cancel** changes nothing. **Disable instead** stops the plugin and keeps it installed.
|
||||
|
||||
## Install from a Gitea link (experimental)
|
||||
|
||||
Use this route when the publisher supplies a Gitea repository link with a plugin ZIP attached to a release.
|
||||
GitHub and GitLab links are not supported.
|
||||
Use this method when the publisher gives you a Gitea repository with a plugin ZIP attached to a release.
|
||||
RuneStone downloads only the attached ZIP. It does not clone or build the repository. Other Git hosts, such as GitHub and GitLab, do not work.
|
||||
|
||||
1. Open **Settings → Plug-ins → Install from Git link**.
|
||||
2. Enter the repository root link supplied by the publisher.
|
||||
3. Enter a specific release tag, or leave it empty for the latest stable release.
|
||||
4. For a private repository, enter a Gitea token with repository read access.
|
||||
1. Open **Settings → Plug-ins** and choose **Install from Git link**.
|
||||
2. In **Repository link**, enter the repository root link, such as `https://git.example.com/owner/repository`.
|
||||
3. In **Release tag**, enter a tag. Leave it empty to get the latest stable release.
|
||||
4. For a private repository, enter a Gitea **Access token** with read access to the repository.
|
||||
5. Choose **Review release**.
|
||||
6. Review the package. Choose **Install**, **Install and enable**, or, for an installed plugin, **Apply packages**.
|
||||
|
||||
Review the package, then choose **Install** or **Install and enable**.
|
||||
For an existing plugin, choose **Apply packages**.
|
||||
Use an explicit tag for a prerelease. A source archive or branch link cannot install a plugin.
|
||||
The release must contain exactly one attached plugin ZIP.
|
||||
To install a prerelease, enter its tag. The release must have exactly one plugin ZIP attached. Source archives and branch links do not work.
|
||||
Use HTTPS for a remote server. HTTP sends the token and the package without encryption.
|
||||
RuneStone uses the token for this request only and does not save it.
|
||||
|
||||
Use HTTPS for a remote server. RuneStone clears the token after the request and does not save it.
|
||||
RuneStone downloads a package through this route. It does not clone or build the repository.
|
||||
## Plugin guides
|
||||
|
||||
## Feature guides
|
||||
|
||||
Use these guides for plugin features after installation:
|
||||
|
||||
- [Terminal sessions and shortcuts](guides/terminal.md)
|
||||
- [Git controls, push, pull, and history](../../RuneStone_Git/docs/usage.md)
|
||||
- [Background Slideshow images and board targets](../../RuneStone_Background_Slideshow/docs/usage.md)
|
||||
- [Local Autocomplete trial and settings](../../RuneStone_Local_Autocomplete/docs/trial-guide.md)
|
||||
- [Project Management tasks and boards](../../RuneStone_Project_Management/project-management.md)
|
||||
|
||||
Links outside this repository require the corresponding sibling source checkout.
|
||||
For the included browser, use the [built-in browser guide](user-guide.md#use-the-built-in-browser).
|
||||
| Plugin | Guide |
|
||||
| --- | --- |
|
||||
| Terminal | [Terminal guide](guides/terminal.md) |
|
||||
| Table Formulas | [Calculate with Table Formulas](guides/document-tools.md#calculate-with-table-formulas) |
|
||||
| Git | [Git usage](https://git.knottywyvern.com/kwyvern/RuneStone_Git/src/branch/main/docs/usage.md) |
|
||||
| Project Management | [Project Management guide](https://git.knottywyvern.com/kwyvern/RuneStone_PM/src/branch/main/project-management.md) |
|
||||
| Background Slideshow | [Background Slideshow usage](https://git.knottywyvern.com/kwyvern/RuneStone_BG_Slideshow/src/branch/main/docs/usage.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) |
|
||||
| CSV Viewer | [CSV Viewer README](https://git.knottywyvern.com/kwyvern/RuneStone_CSV_Viewer/src/branch/main/README.md) |
|
||||
|
||||
## Plugin help
|
||||
|
||||
| Problem | Action |
|
||||
| --- | --- |
|
||||
| The ZIP fails review | Read the reported error. Get a complete release ZIP from the plugin author. |
|
||||
| You received source code or a loose manifest | Get the release ZIP. Users do not need to build the plugin. |
|
||||
| The plugin is installed but unavailable | Check its switch and any error beside it in **Settings → Plug-ins**. |
|
||||
| Changed plugin files need another enable decision | Review the changed package before enabling it again. |
|
||||
| An update or uninstall reports a cleanup failure | Restart RuneStone, then repeat the action. |
|
||||
| The plugin shows **Removal incomplete** | Choose **Retry cleanup** to finish the confirmed removal. |
|
||||
| Retry cleanup reports changed files | Check the path in the error before retrying. |
|
||||
| A Gitea release has no usable package | Check the release tag and ask the publisher for a release with one attached plugin ZIP. |
|
||||
| The ZIP fails review | Read the error. Get a complete release ZIP from the plugin author. |
|
||||
| You have source code or a loose `plugin.json` | Get the release ZIP. You do not need to build a plugin. |
|
||||
| The plugin is installed but does not work | Check its switch and any error message beside it. |
|
||||
| The plugin files changed after you enabled it | Review the changed package, then enable the plugin again. |
|
||||
| An update or uninstall reports a cleanup failure | Restart RuneStone, then do the action again. |
|
||||
| The plugin shows **Removal incomplete** | Choose **Retry cleanup** to finish the removal. If the error names changed files, check that path first. |
|
||||
| A Gitea release has no usable package | Check the release tag. Ask the publisher for a release with one attached plugin ZIP. |
|
||||
| An old Browser plugin shows in the list | Uninstall it. The built-in browser keeps your profiles and bookmarks. |
|
||||
|
||||
Use **Show files** beside a plugin to inspect its installed folder.
|
||||
Include the plugin name, version, RuneStone version, and error text when you report a problem.
|
||||
To see the installed files of a plugin, choose **Show files** beside it. **Open plugins folder** opens the folder for all plugins.
|
||||
When you report a plugin problem, include the plugin name and version, the RuneStone version, and the error text.
|
||||
|
||||
To create a plugin, use the [plugin development reference](plugin-development.md).
|
||||
It covers build examples, package requirements, releases, and the API.
|
||||
To create a plugin, see the [plugin development reference](plugin-development.md).
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
# Release policy
|
||||
|
||||
[Builds](builds.md) · [Plugin development](plugin-development.md) · [Installation](installation.md)
|
||||
|
||||
This policy sets version numbers, release file storage, and publication steps for RuneStone and its plugins.
|
||||
|
||||
## Versions
|
||||
|
||||
RuneStone and each plugin keep separate version numbers. Each project uses the form `zz.yy.xx`.
|
||||
|
||||
| Part | Increase it for | Then reset |
|
||||
| --- | --- | --- |
|
||||
| `xx` | Each new completed regular build. The number has no two-digit limit. | Nothing |
|
||||
| `yy` | A deliberate release that is ready for build testing, by direction of the project owner | `xx` to zero |
|
||||
| `zz` | A full release, by direction of the project owner | `yy` and `xx` to zero |
|
||||
|
||||
A build is a RuneStone installer or a plugin ZIP, unless the project owner asks for a different distributable.
|
||||
Development servers, test runs, and intermediate compilation output are not builds.
|
||||
|
||||
- Keep routine implementation work in the current `zz.yy` series.
|
||||
- Keep the current version during source edits, fixes, improvements, documentation work, and automated checks.
|
||||
- Do not change a version for an edit to agent instructions only.
|
||||
- Set the next version when you produce the build. Keep all version fields of the project consistent.
|
||||
- If no build completes, restore the previous version fields. Failed attempts and retries do not use a version number.
|
||||
- Report a new version as available only after its build file exists.
|
||||
- Publishing an existing build file does not change its version.
|
||||
- Passing automated checks does not authorize a `yy` or `zz` increase.
|
||||
|
||||
| Project | Version fields |
|
||||
| --- | --- |
|
||||
| RuneStone | `package.json`, `src-tauri/tauri.conf.json`, the package version and `[package.metadata.runestone]` in `src-tauri/Cargo.toml`, and the `runestone` entry in `src-tauri/Cargo.lock` |
|
||||
| Plugin | `plugin.json`, the project `package.json`, and any build metadata |
|
||||
|
||||
On Windows, `pnpm build:installer --version <version>` sets the RuneStone fields and restores them if the build fails.
|
||||
See [Build the Windows installer](builds.md#build-the-windows-installer).
|
||||
|
||||
## Hotfix versions
|
||||
|
||||
A hotfix fixes one item or a narrowly scoped problem in an existing release.
|
||||
It keeps `zz.yy.xx` and adds or advances a lowercase letter suffix.
|
||||
|
||||
- Advance the suffix in this order: `a`, `b`, `c`, through `z`, then `aa`, `ab`, and later suffixes.
|
||||
For example: `0.2.28` → `0.2.28a` → `0.2.28b`.
|
||||
- The next regular build increases `xx` and removes the suffix: `0.2.28b` → `0.2.29`.
|
||||
- Never use a numeric increment in place of a hotfix suffix.
|
||||
|
||||
Use the same literal hotfix version in `package.json`, `plugin.json`, build metadata, file names, release notes, and tags.
|
||||
|
||||
Example, from the file name rule in `scripts/packagePlugin.mjs`: the plugin `org.example.hello` at version `1.0.0a` produces `org.example.hello-1.0.0a.zip`, with the tag `v1.0.0a`.
|
||||
|
||||
If a package format rejects the suffix, add support for it or report the blocker before you build.
|
||||
Do not bypass validation. Do not overwrite an existing release ZIP.
|
||||
Older RuneStone hosts that accept only numeric plugin versions reject suffixed packages.
|
||||
|
||||
Some installer toolchains accept only numeric or SemVer versions.
|
||||
For those fields, RuneStone uses a reversible encoding. See [Hotfix installer versions](builds.md#hotfix-installer-versions).
|
||||
Visible version strings, release metadata, and file names keep the literal version.
|
||||
|
||||
## Release files
|
||||
|
||||
These rules apply to the main app, all existing plugins, and all new plugins.
|
||||
|
||||
| Release | Folder |
|
||||
| --- | --- |
|
||||
| RuneStone installer | `releases/<version>/` at the RuneStone project root |
|
||||
| Plugin ZIP | `releases/` at the root of that plugin project |
|
||||
|
||||
- Keep release notes, checksums, and build metadata with the release they describe, in the local release folder.
|
||||
- Keep `releases/` out of Git.
|
||||
- Use `dist/`, `build/`, `output/`, and toolchain folders only for compilation, staging, logs, and checks.
|
||||
- After packaging, move the completed installer from the toolchain bundle folder into `releases/`.
|
||||
Do not leave a second copy in the bundle folder.
|
||||
- Never copy a plugin ZIP into the host project or into a different plugin project.
|
||||
- Do not overwrite a release with different contents. Keep distinct versions and files with different contents.
|
||||
- Remove a duplicate file only after its SHA-256 hash matches the file that you keep.
|
||||
- Report a filename conflict before you change a file name.
|
||||
- After each completed build, report the full path of the build file.
|
||||
|
||||
`pnpm build:installer` and `pnpm package:plugin` obey these rules for their own output.
|
||||
The installer script stops if the release file exists. The plugin packager reuses an identical ZIP and stops if the existing ZIP has different contents.
|
||||
|
||||
## Publish an installer
|
||||
|
||||
Publish RuneStone installers on the [RuneStone releases page](https://git.knottywyvern.com/kwyvern/RuneStone/releases).
|
||||
|
||||
1. Build the installer and complete the [installer checks](builds.md#installer-checks).
|
||||
2. Create a release with the tag `v<version>`.
|
||||
3. Attach only installer binaries.
|
||||
4. Leave the release description empty.
|
||||
5. Publish the release.
|
||||
6. Put the installation checksums in `docs/checksums/<version>/`.
|
||||
7. Link the checksums from the [installation guide](installation.md).
|
||||
8. Update the download links in the README.
|
||||
|
||||
The empty description lets users reach the downloads directly.
|
||||
Do not attach Markdown files, release notes, checksums, metadata, logs, or screenshots.
|
||||
Put release notes, test results, and installation instructions in the repository documentation.
|
||||
Keep the other build records in the local release folder.
|
||||
|
||||
## Publish a plugin release
|
||||
|
||||
These rules apply on all hosting services. The service stores the files. RuneStone defines the package format, the versions, and the installation checks.
|
||||
|
||||
1. Build the ZIP with the procedure in [Build and package a plugin](plugin-development.md#build-and-package-a-plugin).
|
||||
2. Install the ZIP in RuneStone. Test its features, the disable action, and removal.
|
||||
3. Create a tag that identifies the source commit of that ZIP.
|
||||
4. Attach the tested `<id>-<version>.zip` to a release for that tag.
|
||||
5. Publish the release.
|
||||
6. Download the published ZIP and test it in RuneStone.
|
||||
|
||||
Use `v<version>` for an ordinary release tag.
|
||||
For a temporary prerelease, use a clearly named trial tag and mark the release as a prerelease.
|
||||
Give users that explicit tag.
|
||||
|
||||
After publication, test these with the published ZIP:
|
||||
|
||||
- Download, review, installation in the disabled state, enable, disable, and removal
|
||||
- Cancellation, which must leave no installed package
|
||||
- An update of an installed plugin ID, which must keep its settings and enabled state
|
||||
- The repository link with the explicit tag, if RuneStone can install from that service
|
||||
|
||||
Rules for the release:
|
||||
|
||||
- Publish one plugin ZIP for each release. Attach only that ZIP and leave the release description empty.
|
||||
- The ZIP contains `plugin.json` at its root, the compiled entry module, and all required assets and dependencies.
|
||||
See the [package contract](plugin-development.md#package-contract).
|
||||
- Never use a repository source archive as the plugin package.
|
||||
- Keep published release files unchanged. Moving an unchanged release to a different service needs no new package or version.
|
||||
- Put release notes in the plugin repository documentation. Give the required RuneStone version, plugin version, changes, and known limits.
|
||||
- Give users a link to the ZIP and to the [plugin installation guide](plugins.md).
|
||||
- For a private release, users need permission to download the package.
|
||||
|
||||
| Service | How users install | Publisher notes |
|
||||
| --- | --- | --- |
|
||||
| Gitea | Download the ZIP, or use the experimental Gitea link installation | See the list below. |
|
||||
| GitHub | Download the attached ZIP and install it in **Settings → Plug-ins** | Automatic source archives do not replace the attached ZIP. Installation from a GitHub link needs a download adapter and tests. That work is in the future. |
|
||||
| GitLab and other services | Download the ZIP and install it in **Settings → Plug-ins** | RuneStone has no repository-link adapter for these services. |
|
||||
|
||||
Gitea link installation needs these conditions:
|
||||
|
||||
- The link is the repository root, with an optional trailing `.git`.
|
||||
- The Gitea server runs at the host root.
|
||||
- The release has exactly one attached `.zip` file. Automatic source archives do not count.
|
||||
- The latest-release route skips drafts and prereleases. Use an explicit tag for a prerelease trial.
|
||||
- For a private repository, the user needs read access to the release metadata and the attachment.
|
||||
- The server uses HTTPS. HTTP sends the token and the package without encryption.
|
||||
|
||||
For download limits, credential handling, and redirects, see [Gitea downloads](plugin-host.md#gitea-downloads).
|
||||
For GitHub publication steps, see [GitHub's release instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository).
|
||||
+59
-64
@@ -1,85 +1,80 @@
|
||||
# Functional color requirements
|
||||
# Functional color
|
||||
|
||||
[Interface design](ui-design.md#functional-color-and-complete-menu-checks) · [Decision UI-024](design-decisions.md#ui-024--assertive-functional-color-by-default)
|
||||
[Interface design](ui-design.md) · [Design decisions](design-decisions.md)
|
||||
|
||||
RuneStone uses assertive color to help users recognize information, distinguish states, and identify themes.
|
||||
This policy applies to human developers and agents across the host and all plugins.
|
||||
Start with vivid functional colors. Choose softer colors only when a concrete requirement or measured problem supports that choice.
|
||||
This guide sets the color rules for RuneStone and its plugins, for human developers and agents.
|
||||
Agents also apply the user-level `ui-functional-color` skill. This guide adds the project roles, references, thresholds, and evidence.
|
||||
|
||||
## What aggressive color selection means
|
||||
## Default
|
||||
|
||||
Actively evaluate strong colors for accents, priority marks, status indicators, selection outlines, links, syntax, and important data.
|
||||
Include high-saturation and high-value candidates. Treat 100% saturation and 100% HSV value as ordinary options when they serve the role.
|
||||
Prefer the stronger candidate when readability, meaning, and distinction remain sound.
|
||||
Do not automatically turn red into dusty coral, emerald into sage, gold into beige, or clear data colors into similar pastels.
|
||||
- Start accents, priority, status, selection outlines, syntax, and important data with vivid, distinct candidates. Full saturation and full HSV value are normal options.
|
||||
- Pick the stronger candidate when readability, meaning, and distinction stay correct.
|
||||
- Do not soften a color only to look quiet, refined, professional, premium, minimal, or cohesive. A softer choice needs a concrete reason and before-and-after evidence.
|
||||
- A quiet layout comes from spacing, hierarchy, and the amount of color on screen. It does not need a faded palette.
|
||||
- Existing muted values are not an approved soft design.
|
||||
- Keep informative text and symbols opaque.
|
||||
|
||||
Words such as quiet, refined, professional, premium, minimal, and cohesive do not set color limits.
|
||||
Keep the layout focused through spacing, hierarchy, restrained repetition, and the amount of color on screen.
|
||||
Use vivid colors where users must recognize identity, state, or meaning.
|
||||
Set surfaces and dividers for their support role. There is no requirement to saturate every background, neutral, or text color.
|
||||
A palette average is not a design target, and one bright token cannot excuse a mostly indistinct palette.
|
||||
## Roles and tokens
|
||||
|
||||
## Requirements by role
|
||||
All tokens are in `src/lib/theme/tokens.css`, unless the table names another file. Correct a wrong token at its source. Do not add local saturation or opacity overrides.
|
||||
|
||||
| Role | Requirement |
|
||||
| --- | --- |
|
||||
| Theme identity | Preserve characteristic hues and their strength from current references. |
|
||||
| Priority and status | Use clear, assertive colors with opaque symbols. Pair color with shape or text. |
|
||||
| Links and actions | Keep actionable text distinct and readable against its actual surface. |
|
||||
| Selection and focus | Show a clear state change and boundary. Preserve readable content inside the selected area. |
|
||||
| Syntax and data | Give different meanings distinct roles. Avoid several nearly identical muted colors. |
|
||||
| Backgrounds and dividers | Support content and visible boundaries. Choose their strength by function rather than a palette-wide muting rule. |
|
||||
| Disabled states | Distinguish unavailable actions while keeping labels readable. Do not apply their opacity to enabled content. |
|
||||
| Role | Tokens | Requirement |
|
||||
| --- | --- | --- |
|
||||
| Theme identity | `--rs-accent`, `--rs-accent-2`, palette surfaces in `src/lib/theme/characterThemes.ts` | Keep the characteristic hues of the reference at their strength. |
|
||||
| Status | `--rs-error`, `--rs-warn`, `--rs-warn-hot`, `--rs-ok` | Use clear, assertive colors. Pair color with a shape or text. |
|
||||
| Priority (Project Management) | `--pm-priority-color` in the plugin `src/style.css` | Full saturation and value, with opaque symbols and readable text. |
|
||||
| Links and actions | `--rs-accent` | Keep actionable text distinct and readable on its actual surface. |
|
||||
| Selection and focus | `--rs-item-selection-*`, `--rs-selection`, `--rs-selection-text` | Show a clear state change and boundary. Content inside the selection stays readable. |
|
||||
| Syntax | `--rs-syntax-*`, one for each role in `SYNTAX_ROLES` | Give each meaning a distinct color. A palette has at least 7 distinct syntax colors. |
|
||||
| Surfaces and dividers | `--rs-bg`, `--rs-bg-elevated`, `--rs-bg-active`, `--rs-border`, `--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. |
|
||||
|
||||
Use shared theme tokens. Correct an inappropriate token at its source instead of adding local saturation or opacity overrides.
|
||||
Do not fade an entire badge, row, or container when only its background needs transparency.
|
||||
Keep meaningful foreground symbols and text opaque.
|
||||
Do not fade a whole badge, row, or container when only its background needs transparency.
|
||||
|
||||
## References and known failures
|
||||
## Theme references
|
||||
|
||||
Read the current reference cards and respect the user's stated source priority.
|
||||
For Holo, prefer the current fan art. Exclude removed images from later palette decisions.
|
||||
Separate characteristic colors from scenery, lighting, alternate clothing, and unrelated details.
|
||||
The first trading screenshot and Bloomberg example demonstrate clear information and state distinctions. They do not prescribe a terminal-like appearance for RuneStone.
|
||||
- Read the current reference cards, and obey the source priority that the user gives.
|
||||
- Harvest Moon (Holo) uses the current fan art. Removed images do not count for later palette decisions.
|
||||
- Take the colors of the character. Exclude scenery, lighting, alternate clothing, and unrelated details.
|
||||
- The trading screenshot and the Bloomberg example show clear information and state distinctions. They do not ask for a terminal-like appearance.
|
||||
|
||||
The October 13 review found specific problems:
|
||||
## Known failures
|
||||
|
||||
- Holo used marshy green and pink roles that did not match the requested identity. Warm copper, chestnut, amber, and red replaced them.
|
||||
- Asuka repeated green and similar cyan roles. Red, orange, yellow, and blue now carry clearer meanings.
|
||||
- Malfoid used a sage accent and near-gray syntax. The emerald accent changed from about 29% saturation to 76%.
|
||||
- Priority marks were too dark to draw attention. Their symbols now use full saturation and value with readable text.
|
||||
The October 13 review found these problems. The values record that correction. They are not quotas for future themes.
|
||||
|
||||
These values record that correction. They are not universal quotas or fixed limits for future themes.
|
||||
See the [menu and color review](menu-audit.md) for implementation evidence and image-surface limits.
|
||||
| Palette | Problem | Correction |
|
||||
| --- | --- | --- |
|
||||
| Harvest Moon (Holo) | Marsh green and pink roles did not match the identity. | Warm copper, chestnut, amber, and red |
|
||||
| Crimson Pilot (Asuka) | Repeated green and similar cyan roles | Red, orange, yellow, and blue carry distinct meanings. |
|
||||
| Silver Serpent (Malfoid) | Sage accent and near-gray syntax | Emerald accent, saturation from about 29% to 76% |
|
||||
| Priority marks | Too dark to draw attention | Full saturation and value, with readable text |
|
||||
|
||||
## Readability and visual checks
|
||||
The [October 13 menu and color review](archive/menu-audit-2026-10-13.md) holds the measurements and the image-surface limits.
|
||||
|
||||
Check contrast against the actual rendered background, including alpha, layered surfaces, images, overlays, and selected states.
|
||||
HSV value is not perceived brightness or a contrast ratio. Full value does not guarantee readable text.
|
||||
When contrast fails, compare foreground, background, local surface, and role changes before reducing color strength.
|
||||
Preserve readable text and state recognition. Follow the project's accessibility thresholds and existing contrast checks.
|
||||
Passing contrast alone does not prove useful color distinctions, theme identity, or effective priority emphasis.
|
||||
## Contrast thresholds
|
||||
|
||||
Inspect screenshots at normal display scale. Check relevant light and dark appearances, narrow layouts, focus, hover, selection, and disabled states.
|
||||
Check actual content, code, menus, and priority marks where the changed tokens appear.
|
||||
Record unavailable checks and failures. Browser mocks do not replace native desktop acceptance.
|
||||
| Pair | Minimum | Test |
|
||||
| --- | --- | --- |
|
||||
| `text`, `text-dim`, `text-strong`, and `accent` on `bg`, `bg-elevated`, `bg-active`, and `selection` | 4.5:1 | `scripts/appearance.spec.ts`, `scripts/themePalette.spec.ts` |
|
||||
| Each syntax role on `bg` and `bg-active` | 4.5:1 | `scripts/appearance.spec.ts` |
|
||||
| Accent selection perimeter on the selection fill | 3:1 | `scripts/malfoidPalette.spec.ts` |
|
||||
|
||||
## Evidence required for review
|
||||
`accent` on `selection` is exempt from the 4.5:1 text check. Run the tests with `pnpm test`.
|
||||
Over a user image, contrast depends on the composite surface. Measure the 82% and 90% tints over the image that the change uses. Do not claim contrast over every possible image or overlay.
|
||||
When contrast fails, change the foreground, background, surface, or role before you reduce color strength.
|
||||
|
||||
For each changed role, record:
|
||||
## Evidence for review
|
||||
|
||||
| Field | Required evidence |
|
||||
| --- | --- |
|
||||
| Purpose | Meaning, theme reference, or recognition task |
|
||||
| Implementation | Shared token and affected controls |
|
||||
| Color | Old and new hex values, HSV saturation and value, and opacity |
|
||||
| Readability | Foreground/background pairs, actual composite surface, and contrast results |
|
||||
| Visual result | Normal-scale screenshots of affected states and layouts |
|
||||
| Softer choice | Concrete requirement or measured problem, plus the stronger candidate considered |
|
||||
Record the evidence that the `ui-functional-color` skill lists for each changed role. For RuneStone, also record:
|
||||
|
||||
A generic claim that muted colors look elegant or comfortable is insufficient.
|
||||
Correct unexplained muting or record the unresolved issue before moving the work to Review.
|
||||
Use the project's exception process for deliberate departures from this policy. A documented exception does not itself authorize the departure.
|
||||
User acceptance still determines Done.
|
||||
- The shared token and the affected controls.
|
||||
- Each named palette and appearance that uses the token.
|
||||
- Contrast on the actual composite surface, including image tints, overlays, and selected states.
|
||||
- Screenshots at normal scale of the content, code, menus, and priority marks where the token appears.
|
||||
- For a softer choice, the stronger candidate and the requirement or measured problem that rejected it.
|
||||
- Checks that you could not run. Browser mocks do not replace native desktop checks.
|
||||
|
||||
Agents also use the global `ui-functional-color` skill. This document supplies the project rules for contributors without that skill.
|
||||
Correct unexplained muting, or record it as unresolved, before the work moves to Review.
|
||||
A deliberate departure needs an exception entry in the [design decision log](design-decisions.md). The entry alone does not authorize it.
|
||||
|
||||
Decision: [UI-024](design-decisions.md#ui-024--assertive-functional-color-by-default).
|
||||
|
||||
+259
-318
@@ -1,377 +1,318 @@
|
||||
# Interface design
|
||||
|
||||
[Back to development](development.md) · [Functional color requirements](ui-color.md)
|
||||
[Development](development.md) · [Functional color](ui-color.md) · [Design decisions](design-decisions.md)
|
||||
|
||||
RuneStone uses compact controls, clear icons, and shared theme values.
|
||||
This reference describes the interface and its shared dimensions. Agent instructions remain in [AGENTS.md](../AGENTS.md).
|
||||
This guide holds the interface rules for RuneStone and its plugins.
|
||||
|
||||
## Design principles
|
||||
|
||||
Keep attention on the user's work. Use quiet structure for the active view. Preserve clear colors for identity, meaning, and attention.
|
||||
Show only what the current task needs. Let users collapse optional sections and hide panes when they need more space.
|
||||
Tabs can join visually with their content area. A selected view does not need a bright border or a repeated heading.
|
||||
- Keep attention on the user's work. Use quiet structure for the active view. Keep strong color for theme identity, status, and actions that need attention.
|
||||
- Show only what the current task needs. Keep optional forms hidden until the user chooses an add action.
|
||||
- Let users collapse sections and hide panes. A collapsed section keeps its name, count, and expand control. Do not remove its data or hide errors that need attention.
|
||||
- Show each board and view name once. Do not repeat view names, instructions, or descriptions when the visible content explains the view.
|
||||
- Keep switching, renaming, and adding as separate controls with clear targets.
|
||||
- Tabs can join visually with their content area. A selected view does not need a bright border or a repeated heading.
|
||||
- Use familiar icons and visual previews to explain choices. Use a preview for visual choices such as themes and table styles.
|
||||
- These principles apply to shared components and plugin interfaces. In a review, examine the user's work area first. Controls must support that work and not compete with it.
|
||||
|
||||
Show each board name once in the main controls. Keep switching and renaming as separate actions with clear targets.
|
||||
Avoid repeated view names, instructions, and descriptions when the visible content already explains the current view.
|
||||
## Shared components and tokens
|
||||
|
||||
Use familiar icons and visual previews to explain choices. Keep visible labels when an icon alone has more than one likely meaning.
|
||||
Every icon control needs an accessible name, a tooltip on hover and keyboard focus, and a comfortable target.
|
||||
Use a preview for visual choices such as themes and table styles.
|
||||
Before you add a control, find its shared component and an existing example. Extend the shared component when the change helps other callers.
|
||||
When a control differs from its peers, examine local style overrides. Correct the shared component or token that causes the problem.
|
||||
Do not copy feature-specific colors into a shared control.
|
||||
|
||||
Treat these principles as the basis for shared components and plugin interfaces.
|
||||
Check the user's work area first during reviews. Controls must support that work without competing for attention.
|
||||
| Need | Use |
|
||||
| --- | --- |
|
||||
| Icon button | `src/lib/ui/IconButton.svelte` (28-pixel target, accessible name, tooltip) |
|
||||
| Icons | `src/lib/ui/Icon.svelte` and `src/lib/ui/actionIcons.ts` (one 24-pixel grid and stroke weight) |
|
||||
| Tooltip on a DOM control | `attachTooltip` in `src/lib/ui/tooltip.ts` |
|
||||
| Action menu | `src/lib/ui/actionMenu.ts`. Svelte callers can use `src/lib/layout/ContextMenu.svelte`. |
|
||||
| Menu with dismissal and focus return | `showActionMenu` in `src/lib/ui/managedActionMenu.ts`. Plugins call it as `api.ui.showActionMenu`. |
|
||||
| Menu and picker presentation | `src/lib/ui/menu.css` |
|
||||
| Find | `src/lib/editor/FindPanel.svelte` and `src/lib/ui/find.css` |
|
||||
| Dimensions and colors | `src/lib/theme/tokens.css` |
|
||||
|
||||
| Token | Default | Use |
|
||||
| --- | --- | --- |
|
||||
| `--rs-titlebar-height` | 36px | Custom window headers in the main window and Settings |
|
||||
| `--rs-control-radius` | 5px | Controls, menu rows, and navigation highlights |
|
||||
| `--rs-item-selection-radius` | `--rs-control-radius` | Selection outlines |
|
||||
| `--rs-item-selection-bg`, `--rs-item-selection-border`, `--rs-item-selection-width` | per theme | Selection fill, border color, and border width |
|
||||
| `--rs-settings-row-padding` | 10px | Settings rows |
|
||||
| `--rs-settings-control-height` | 28px | Settings controls |
|
||||
| `--rs-settings-heading-size` | 18px | Settings headings |
|
||||
| `--rs-settings-description-size` | 12px | Settings descriptions and picker hints |
|
||||
| `--rs-settings-gap` / `--rs-settings-section-gap` | 8px / 16px | Settings spacing |
|
||||
| `--rs-menu-width` | 248px | Standard menu width |
|
||||
| `--rs-menu-padding` | 5px | Inset around menu rows |
|
||||
| `--rs-menu-row-height` | 24px | Minimum row height |
|
||||
| `--rs-menu-row-padding` | 2px 10px | Row padding |
|
||||
| `--rs-menu-font-size` | 13px | Menu text |
|
||||
| `--rs-menu-icon-size` / `--rs-menu-icon-gap` | 14px / 8px | Menu icon and its gap to the label |
|
||||
| `--rs-menu-border` | `transparent` | Borderless panel. `--rs-menu-shadow` supplies the edge. |
|
||||
| `--rs-menu-bg`, `--rs-menu-active-bg` | `--rs-surface-opacity` tint | Menu surface and hover or focus fill |
|
||||
| `--rs-surface-opacity` | 82% | Shared surface tint. Appearance settings adjust it. |
|
||||
|
||||
## Icons and labels
|
||||
|
||||
- Use a recognizable icon for actions, navigation, menus, and settings categories. Icons help users who do not rely on English words, and they save space.
|
||||
- Add a short visible label when an icon has more than one likely meaning. Keep labels that help users learn or tell functions apart.
|
||||
- Use icon-only controls for familiar actions in compact spaces, such as toolbars. Do not add a caption to one familiar toolbar action while its peers use icons.
|
||||
- Every icon control needs an accessible name, a tooltip on hover and keyboard focus, and a comfortable target.
|
||||
- Reuse the existing icon artwork. Use the same icon for the same function everywhere, with consistent size and stroke weight.
|
||||
- Do not force an icon onto a setting, label, or explanation without a clear visual equivalent. Use text alone, and omit decoration that does not help understanding.
|
||||
- Recognition and accessibility come before fitting more controls on screen.
|
||||
|
||||
## Controls, corners, and focus
|
||||
|
||||
- Controls, menu rows, and navigation highlights use `--rs-control-radius`. This includes hover, active, and selected states.
|
||||
- Keep readable labels, visible focus indicators, and comfortable click targets in compact layouts.
|
||||
- Native form controls, such as checkboxes, take their accent from `--rs-accent`, not the browser default ([UI-030](design-decisions.md#ui-030--settings-installation-checkbox-theme-drift)).
|
||||
- Document tables are the exception. Keep their grid, cells, and cell selection outlines square. Table toolbars and table menus stay rounded.
|
||||
|
||||
## Selection
|
||||
|
||||
These rules apply to navigation rows, file and folder trees, lists, grids, and table cells.
|
||||
|
||||
- Use the `--rs-item-selection-*` tokens for fill, border color, border width, and radius. Table-cell selection is the reference for fill and outline.
|
||||
- Adjacent selected items form one region with a continuous fill. Outline only its exposed perimeter. Do not draw borders or rounded gaps on shared internal edges.
|
||||
- Round the exposed corners of a region, except in document tables.
|
||||
- A single selected item gets a complete outline. Groups that unselected items or physical gaps divide keep separate outlines.
|
||||
- Find adjacency from the visible order, including sorting and expanded tree branches. At an indentation change, keep the exposed edges and omit the parts that selected rows share.
|
||||
- Ordinary table grid lines can stay inside a region. They must not become highlighted selection borders.
|
||||
- A menu choice and a file selection have different purposes. File selections use the selection fill and outer outline. Hover uses the shared active background on both.
|
||||
- The IDE command palette uses the shared selection fill, outline, and corner radius.
|
||||
|
||||
## Menus and pickers
|
||||
|
||||
Use one menu design for context menus, action menus, and their submenus in the host and in plugins.
|
||||
|
||||
### Renderer and presentation
|
||||
|
||||
- Build every action menu with `actionMenu.ts`. Do not create a separate menu renderer. Do not add local style overrides for a feature.
|
||||
- Use the `--rs-menu-*` tokens and `--rs-control-radius`. One menu family shares font, row height, padding, icon size, label alignment, separators, and shadow.
|
||||
- A menu can grow wider when its content needs more space. All other measurements stay shared.
|
||||
- Keep the padding inset around every row, so hover and focus fills do not touch the panel edge.
|
||||
- The panel is borderless, with a shadow. Its surface uses the `--rs-surface-opacity` tint through `--rs-menu-bg` and `--rs-menu-active-bg`. Text and icons stay opaque. Host menus, plugin menus, submenus, and the workspace picker all use this surface.
|
||||
- Plugins call `api.ui.showActionMenu` for the host menu, when the host API exists. The host handles dismissal, focus return, and plugin cleanup.
|
||||
|
||||
### Rows and columns
|
||||
|
||||
- Give a recognizable action an icon and a short label. Use the same icon for the same function in every menu.
|
||||
- A menu with only text choices omits the icon column. A mixed menu reserves the icon column on every row.
|
||||
- Shortcut text and submenu arrows use separate trailing columns.
|
||||
- Use inset separators between related groups.
|
||||
- Enabled rows share one hover fill and one keyboard focus fill.
|
||||
- Disabled rows stay readable. Keyboard navigation skips them, and they do not run.
|
||||
- Radio choices mark the current option with the shared fill and no checkmark. The current enabled radio choice gets focus when the menu opens.
|
||||
- A row can have a default action and a submenu. A click on the label, Enter, or Space runs the default action. Hover, the submenu arrow, or Right opens the submenu.
|
||||
|
||||
### Keyboard and viewport
|
||||
|
||||
- Support the arrow keys, Home, End, Enter, Space, and Escape.
|
||||
- Right opens a submenu. Left returns to its parent.
|
||||
- Dismissal with the keyboard restores focus to the trigger.
|
||||
- Keep menus inside the viewport. Long menus scroll inside their panel.
|
||||
|
||||
### Choice lists and pickers
|
||||
|
||||
- Use the shared action menu for short option lists, such as board, list, theme, appearance, and language choices.
|
||||
- Use a searchable picker for long lists.
|
||||
- Replace native selects with the shared action menu wherever the host API exists. Native selects stay only as documented fallbacks for older plugin hosts.
|
||||
- Rich pickers and dialogs can have their own layout when they contain search fields, descriptions, or forms. These layouts do not need an exception entry.
|
||||
- Picker panels and result rows still use the shared menu presentation: `rs-picker`, `rs-picker-row`, `rs-picker-icon`, and `rs-picker-hint` from `menu.css`. Do not use the layout allowance to change panel color, row padding, font, or focus states.
|
||||
- Embedded website controls keep the website design.
|
||||
|
||||
### Specific menus
|
||||
|
||||
- In the main editing menu, spelling corrections come first. Add to dictionary follows them, before the ordinary editing actions.
|
||||
- Native editing menus keep recognized editing, spelling, and emoji commands. The host removes system sharing, writing direction, dictation, and unnamed tools before shared display or native fallback.
|
||||
- New note creates a blank note. Its submenu contains templates and Manage templates.
|
||||
|
||||
Decisions: [UI-002](design-decisions.md#ui-002--share-the-requested-dropdown-design), [UI-003](design-decisions.md#ui-003--quiet-menu-choices), [UI-006](design-decisions.md#ui-006--borderless-shared-menus), [UI-007](design-decisions.md#ui-007--repeated-menu-drift), [UI-008](design-decisions.md#ui-008--keep-native-editing-menus-focused), [UI-013](design-decisions.md#ui-013--translucent-menu-surfaces), [UI-026](design-decisions.md#ui-026--compact-shared-menu-rows), [UI-027](design-decisions.md#ui-027--direct-spelling-corrections).
|
||||
|
||||
## Window and navigation
|
||||
|
||||
The main window and Settings use the same 36-pixel titlebar height: `--rs-titlebar-height`.
|
||||
The main header holds navigation, document tabs, actions, and window controls.
|
||||
Files, Search, Bookmarks, and installed sidebar views such as Git share the top navigation group.
|
||||
Editor views from plugins can use the vertical plugin ribbon. The ribbon uses no width when it has no entries.
|
||||
The active navigation button shows which view occupies the left pane.
|
||||
- The main header holds navigation, document tabs, actions, and window controls.
|
||||
- Files, Search, Bookmarks, and installed sidebar views such as Git share the top navigation group. The active navigation button shows which view fills the left pane.
|
||||
- Plugin editor views can use the vertical plugin ribbon. The ribbon has no width when it has no entries.
|
||||
- The built-in browser opens from its own toolbar action. Project Management opens from Plug-in views. Keep Plug-in views in the toolbar, away from the new-tab button.
|
||||
- Document and plugin tabs share the tab bar. The new-tab button follows the tabs. Tabs keep their order and pin state when a plugin replaces its view.
|
||||
- The main window keeps an empty New tab after its last tab closes. A secondary window closes with its last tab. The unsaved-edit and active-terminal confirmations still apply, and Cancel keeps the tab open.
|
||||
- Sidebar widths and visibility persist across window sessions. A different editor does not restore a hidden outline.
|
||||
- A detached tab window holds the tab work area and window controls only. It has no side panes, plugin ribbon, or pane switches, and it does not change the main window layout.
|
||||
|
||||
Document and plugin tabs share the tab bar. The new-tab button follows the tabs.
|
||||
Tabs retain their order and pin state when a plugin replaces its current view.
|
||||
The main window keeps an empty New tab after the last tab closes.
|
||||
Secondary workspace windows close when the user closes their last document, plugin, browser, or empty tab.
|
||||
Window closure retains the existing confirmation for unsaved edits and active terminal sessions.
|
||||
Cancel keeps the last tab and its contents open. See [UI-039](design-decisions.md#ui-039--close-secondary-windows-after-the-last-tab).
|
||||
Sidebar widths and visibility persist across window sessions.
|
||||
Opening a different editor does not restore a hidden outline.
|
||||
Detached tabs contain the tab work area and window controls. They do not mount side panes, a plugin ribbon, or pane switches.
|
||||
Their layout does not change the main window layout. See [UI-004](design-decisions.md#ui-004--detached-tab-work-area).
|
||||
The built-in browser opens from its own toolbar action. Project Management opens from Plug-in views.
|
||||
|
||||
## Icons and controls
|
||||
|
||||
Use a recognizable icon for a familiar action. Pair ambiguous icons with short labels.
|
||||
Icon-only buttons have accessible names and tooltips on hover and keyboard focus.
|
||||
Reuse the same icon for the same action. Shared icon buttons use 28-pixel targets.
|
||||
Do not add icons to explanations or settings that have no clear visual equivalent.
|
||||
|
||||
Controls and navigation highlights use `--rs-control-radius`, currently 5 pixels.
|
||||
Selection outlines use `--rs-item-selection-radius` and the shared `--rs-item-selection-*` color and width values.
|
||||
Adjacent selected items share one continuous fill and an outline around the exposed perimeter.
|
||||
Separate groups retain separate outlines. Nested rows retain exposed edges at indentation changes.
|
||||
Document table cells and their selection outlines stay square. Table toolbar buttons and menus remain rounded.
|
||||
|
||||
## Menus and dropdown actions
|
||||
|
||||
Action menus use `src/lib/ui/actionMenu.ts`. Svelte callers can use `ContextMenu.svelte`.
|
||||
`src/lib/ui/menu.css` supplies shared presentation. `src/lib/theme/tokens.css` supplies dimensions and colors.
|
||||
Feature code does not override menu rows. Menu width can expand when content needs more space.
|
||||
|
||||
| Token | Default | Purpose |
|
||||
| --- | --- | --- |
|
||||
| `--rs-menu-width` | 248px | Standard menu width |
|
||||
| `--rs-menu-padding` | 5px | Inset around rows |
|
||||
| `--rs-menu-row-height` | 24px | Minimum row height |
|
||||
| `--rs-menu-row-padding` | 2px 10px | Vertical and horizontal row padding |
|
||||
| `--rs-menu-font-size` | 13px | Shared text size |
|
||||
| `--rs-menu-border` | `transparent` | Borderless panel |
|
||||
| `--rs-menu-icon-size` | 14px | Action icon size |
|
||||
| `--rs-menu-icon-gap` | 8px | Space between icon and label |
|
||||
|
||||
See [UI-026](design-decisions.md#ui-026--compact-shared-menu-rows) for compact shared rows.
|
||||
Spelling corrections appear first in the main editing menu. Add to dictionary follows them, before ordinary editing actions.
|
||||
See [UI-027](design-decisions.md#ui-027--direct-spelling-corrections) for direct corrections.
|
||||
|
||||
Menus with only text choices omit the icon column. Mixed action menus reserve the icon column for every row.
|
||||
Shortcut text and submenu arrows occupy trailing columns.
|
||||
Enabled rows share hover and keyboard focus colors. Disabled rows stay readable and cannot run.
|
||||
Menus support arrow keys, Home, End, Enter, Space, and Escape.
|
||||
Right opens a submenu. Left returns to its parent. Keyboard dismissal restores focus.
|
||||
Menus stay inside the viewport and scroll when their contents exceed its height.
|
||||
Menus use 24-pixel rows, 13-pixel text, and a borderless panel with a shadow.
|
||||
Menus use an 82% surface tint through `--rs-menu-bg` and `--rs-menu-active-bg`.
|
||||
Appearance can adjust this tint or make surfaces opaque through `--rs-surface-opacity`.
|
||||
Text and icons retain their opacity. Compatible plugins consume the same surface token.
|
||||
The shared action menu applies this tint to host and plugin menus, including submenus.
|
||||
The workspace picker shares the menu surface. Labels and icons remain opaque.
|
||||
See [UI-013](design-decisions.md#ui-013--translucent-menu-surfaces).
|
||||
Use the shared hover and keyboard focus fills, with an inset from the panel edge.
|
||||
Theme, appearance, board, and list menus share these values. See [decision UI-002](design-decisions.md#ui-002--share-the-requested-dropdown-design).
|
||||
See [UI-006](design-decisions.md#ui-006--borderless-shared-menus) for the borderless panel rule.
|
||||
Radio choices show the current option with the shared fill and no checkmark.
|
||||
The current enabled radio choice receives focus when its menu opens. See [UI-003](design-decisions.md#ui-003--quiet-menu-choices).
|
||||
A menu row can have a default action and a submenu.
|
||||
Clicking the label, Enter, or Space runs the default action. Hover, the submenu arrow, or Right opens the submenu.
|
||||
New note creates a blank note. Its submenu contains templates and Manage templates.
|
||||
Searchable pickers and form dialogs can use richer layouts. Their menu surfaces still use the shared presentation below.
|
||||
Native editing menus retain recognized editing, spelling, and emoji commands.
|
||||
They omit system sharing, writing direction, dictation, and unsupported unnamed tools.
|
||||
The host filters the native collection before shared display or native fallback. See [UI-008](design-decisions.md#ui-008--keep-native-editing-menus-focused).
|
||||
Decisions: [UI-004](design-decisions.md#ui-004--detached-tab-work-area), [UI-039](design-decisions.md#ui-039--close-secondary-windows-after-the-last-tab).
|
||||
|
||||
## Settings
|
||||
|
||||
Settings navigation pairs icons with labels. Each settings page uses readable text and ordinary controls.
|
||||
General offers the interface language. The language menu uses the shared action menu.
|
||||
Custom theme templates use one fixed `colors` palette in schema 2.
|
||||
Templates also include `fonts` stacks for the interface, prose, headings, and code.
|
||||
The transparency amount covers 0% to 100%. Its slider uses the current theme's accent and surface tokens.
|
||||
Schema 1 imports select the current appearance's palette. See [UI-028](design-decisions.md#ui-028--adjustable-surface-transparency-and-fixed-custom-palettes).
|
||||
Related plugin metadata and actions occupy compact rows. Controls wrap at narrow widths, and the content area scrolls.
|
||||
Long navigation lists must leave room for the selected page.
|
||||
The app work area and Project Management keep separate background images and settings in every theme. Images can be up to 50 MiB.
|
||||
Image bytes stay in IndexedDB. Settings retain a small image reference.
|
||||
Both support image size, nine alignment positions, and an overlay that lightens or darkens the image.
|
||||
Set the overlay with the slider or type a percentage from -100 to 100.
|
||||
An image stays within its view area while content scrolls. A board can retain its own image.
|
||||
- Follow the Obsidian settings pattern. Navigation pairs icons with labels. Each page uses readable text and ordinary controls.
|
||||
- Use the `--rs-settings-*` tokens for spacing, control height, headings, and descriptions.
|
||||
- Put related plugin metadata and actions in compact rows.
|
||||
- Controls wrap at narrow widths, and the content area scrolls. Long navigation must leave room for the selected page.
|
||||
- General offers the interface language through the shared action menu.
|
||||
- The transparency slider covers 0% to 100% and uses the accent and surface tokens of the current theme.
|
||||
- Custom theme templates use schema 2: one fixed `colors` palette and `fonts` stacks for interface, prose, headings, and code. A schema 1 import selects the palette of the current appearance.
|
||||
|
||||
| Shared token | Default |
|
||||
| --- | --- |
|
||||
| `--rs-settings-row-padding` | 10px |
|
||||
| `--rs-settings-control-height` | 28px |
|
||||
| `--rs-settings-heading-size` | 18px |
|
||||
| `--rs-settings-description-size` | 12px |
|
||||
| `--rs-settings-gap` | 8px |
|
||||
| `--rs-settings-section-gap` | 16px |
|
||||
Decisions: [UI-028](design-decisions.md#ui-028--adjustable-surface-transparency-and-fixed-custom-palettes).
|
||||
|
||||
## Typography and tables
|
||||
|
||||
The interface uses `--rs-font-ui`, and prose uses `--rs-font-prose`.
|
||||
The IDE and Terminal share `--rs-font-mono` and `--rs-code-font-weight`.
|
||||
The monospace stack starts with Cascadia Mono, then Cascadia Code, JetBrains Mono, Fira Code, and Consolas.
|
||||
The default code weight is 300. Actual appearance depends on installed fonts and their available weights.
|
||||
Terminal font-size preferences remain independent.
|
||||
Document headings use spacing between sections. They do not use separator lines.
|
||||
Heading fold controls use the shared chevron and support keyboard focus. See [UI-005](design-decisions.md#ui-005--heading-spacing).
|
||||
- The interface uses `--rs-font-ui`. Prose uses `--rs-font-prose`. Headings use `--rs-font-heading`.
|
||||
- The IDE 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.
|
||||
- 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. Writer and Reading use the same row rule. A paragraph after a table stays a paragraph when the separator line is removed.
|
||||
- A table link shows its Markdown source when the caret enters it. The caret stays at the chosen label character. Edit link selects the full target inside the cell. Test ordinary clicks and keyboard entry before menu actions ([UI-025](design-decisions.md#ui-025--table-links-hide-their-source-after-repeated-fixes)).
|
||||
|
||||
Tables use shared cell padding and line height. Entering a cell does not change its row height.
|
||||
A plain paragraph after a table remains a paragraph when the separator line is removed.
|
||||
Table rows need an unescaped pipe. Writer and Reading use the same row boundary rule.
|
||||
Decisions: [UI-005](design-decisions.md#ui-005--heading-spacing).
|
||||
|
||||
Table links reveal their Markdown source when the caret enters the link. Keep the caret at the chosen label character. Edit link selects the complete target inside the cell. Check ordinary clicks and keyboard entry before menu actions. See [UI-025](design-decisions.md#ui-025--table-links-hide-their-source-after-repeated-fixes) for the repeated failure and its regression checks.
|
||||
## Themes and background images
|
||||
|
||||
## Checks for interface changes
|
||||
### Palettes
|
||||
|
||||
Check light and dark themes, keyboard use, focus indicators, narrow windows, and viewport edges.
|
||||
For selection changes, check single items, contiguous ranges, separate groups, and nested rows.
|
||||
For Settings changes, include long plugin lists. For tab changes, include plugin views and pinned tabs.
|
||||
- Color choices obey [Functional color](ui-color.md).
|
||||
- The Claude palette follows the [Anthropic brand guide](https://github.com/anthropics/skills/blob/main/skills/brand-guidelines/SKILL.md): warm light and dark surfaces, an orange accent, Lora body text, and Poppins headings, with their fallbacks.
|
||||
- Named palettes have one fixed appearance. Each local font stack has fallbacks. Code keeps the shared monospace stack.
|
||||
|
||||
Run `node scripts/menuConsistency.smoke.mjs` against the development server after shared menu changes.
|
||||
The menu check covers file, folder, pane, tab, editor, table, and submenu examples.
|
||||
Use `SMOKE_URL` to select the server URL. Use `PLAYWRIGHT_MODULE` and `CHROME_PATH` when the environment needs explicit paths.
|
||||
Browser tests with desktop mocks do not replace native installer and window acceptance checks.
|
||||
| Palette | Appearance | Controls | Prose | Headings |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Harvest Moon | Dark | Candara | Constantia | Constantia |
|
||||
| Crimson Pilot | Dark | Bahnschrift | Segoe UI | Bahnschrift |
|
||||
| Silver Serpent | Dark | Corbel | Palatino Linotype | Palatino Linotype |
|
||||
|
||||
## Keep controls focused
|
||||
- A saved choice for a removed palette returns to RuneStone and keeps its mode and background settings. A renamed palette keeps its colors and backgrounds.
|
||||
- The theme preview includes code colors.
|
||||
|
||||
Keep empty forms hidden until the user chooses an add action. Keep section names, counts, and expand controls visible.
|
||||
Remember that a collapsed section still contains work. Do not remove its data or hide errors that need attention.
|
||||
Decisions: [UI-009](design-decisions.md#ui-009--character-theme-appearances), [UI-012](design-decisions.md#ui-012--retain-three-stronger-character-themes), [UI-018](design-decisions.md#ui-018--named-palettes-and-local-fonts), [UI-023](design-decisions.md#ui-023--separate-theme-font-roles), [UI-024](design-decisions.md#ui-024--assertive-functional-color-by-default).
|
||||
|
||||
Compact toolbars use icon buttons by default. Each button needs an accessible name and a tooltip on hover and keyboard focus.
|
||||
Keep visible text for ambiguous choices and action menus. Do not add a caption to one familiar toolbar action while its peers use icons.
|
||||
Board switching, renaming, and adding work remain separate controls. Put plug-in views in the toolbar, away from the new-tab button.
|
||||
### Surfaces over images
|
||||
|
||||
## Shared choices and highlights
|
||||
- The app image fills the work area below the titlebar, including new tabs and document views. It stays fixed while content scrolls.
|
||||
- Sidebars use `--rs-image-sidebar-bg` (82% tint). Editor surfaces use `--rs-image-editor-bg` (90% tint). Without an image, both are opaque.
|
||||
- Writer, Reading, split, and IDE views share the editor surface. Monaco layers stay transparent above it.
|
||||
- Code blocks in Writer and Reading use `--rs-code-block-bg`.
|
||||
- New-tab buttons use `--rs-image-control-bg` and `--rs-image-control-hover-bg`. Their tint keeps labels readable while the image stays visible. The new-tab screen shows only its action buttons, with icons, labels, and shortcuts.
|
||||
- Headers and dialogs keep their own surfaces.
|
||||
- The app work area and Project Management keep separate images and settings in every theme. An image can be up to 50 MiB. Image bytes stay in IndexedDB, and settings keep a small reference.
|
||||
- Each image has a size, nine alignment positions, and an overlay from -100% (darker) to 100% (lighter), set with a slider or a typed value.
|
||||
|
||||
Use the shared action menu for short option lists, including board and theme choices. Mark the current option with a radio state.
|
||||
Use a searchable picker for long lists. Native selectors remain an older-host fallback for plugins.
|
||||
Menu rows use the same inset, hover fill, focus fill, and corner radius. A menu choice and a file selection serve different purposes.
|
||||
File selections retain the shared selection fill and outer outline. Hover uses the shared active background across both surfaces.
|
||||
Do not copy feature-specific colors into a shared control.
|
||||
Decisions: [UI-010](design-decisions.md#ui-010--background-surface-visibility), [UI-011](design-decisions.md#ui-011--backgrounds-across-the-work-area), [UI-016](design-decisions.md#ui-016--translucent-code-blocks).
|
||||
|
||||
The Claude palette follows the [Anthropic brand guide](https://github.com/anthropics/skills/blob/main/skills/brand-guidelines/SKILL.md).
|
||||
Keep its warm light and dark surfaces, orange accent, Lora body font, and Poppins headings with their documented fallbacks.
|
||||
Shared dimensions and interaction rules apply to every palette.
|
||||
### Project Management surfaces
|
||||
|
||||
Named palettes use one fixed appearance.
|
||||
Harvest Moon, Crimson Pilot, and Silver Serpent each use one dark appearance. Their palettes use multiple surface, text, accent, and syntax colors. Saved choices retain their colors and backgrounds after the names change. Harvest Moon uses Candara controls and Constantia prose and headings. Crimson Pilot uses Bahnschrift controls and headings with Segoe UI prose. Silver Serpent uses Corbel controls and Palatino Linotype prose and headings. Each local font stack has fallback fonts. Code keeps the shared monospace stack. See [UI-023](design-decisions.md#ui-023--separate-theme-font-roles).
|
||||
Removed palettes return to the default appearance.
|
||||
Saved selections for removed themes return to RuneStone and retain their mode and background settings.
|
||||
The theme preview includes code colors. See [UI-009](design-decisions.md#ui-009--character-theme-appearances) for this rule change.
|
||||
- Without its own image, Project Management shows the host image through a transparent root. A saved or temporary board image keeps its own area.
|
||||
- The host gives `--rs-workarea-plugin-bg` and `--rs-workarea-surface-opacity` for saved images and slideshow frames.
|
||||
- With an image, lists, cards, card details, and search fields share the 82% tint. Gantt and calendar views use one tinted panel, and their date cells show the image.
|
||||
- Selected cards use the shared selection treatment. Nested surfaces keep their own tint.
|
||||
- Card detail buttons have a transparent resting background. Hover, pressed, and focus states stay visible.
|
||||
|
||||
New-tab controls use `--rs-image-control-bg` and `--rs-image-control-hover-bg`.
|
||||
Their backgrounds retain enough color for readable labels while the image remains visible.
|
||||
The new-tab screen shows only its action buttons, with icons, labels, and shortcuts.
|
||||
Buttons use the same 82% tint as Project Management lists.
|
||||
One app image spans the work area below the titlebar, including new tabs and document views.
|
||||
Sidebars use `--rs-image-sidebar-bg` at 82%. Editor surfaces use `--rs-image-editor-bg` at 90%.
|
||||
Without an image, both use their ordinary opaque surfaces.
|
||||
Writer, Reading, split, and IDE share the tinted editor surface. Monaco layers remain transparent above it.
|
||||
Code blocks in Writer and Reading use `--rs-code-block-bg`, an 82% tint of the elevated surface.
|
||||
See [UI-016](design-decisions.md#ui-016--translucent-code-blocks) for this rule.
|
||||
The IDE command palette uses the shared selection fill, outline, and corner radius.
|
||||
Headers and dialogs retain their own surfaces. Menus and Project Management use the image rules below.
|
||||
The image remains fixed while content scrolls. Saved appearance and slideshow settings keep their existing controls.
|
||||
See [UI-011](design-decisions.md#ui-011--backgrounds-across-the-work-area) for the work-area rule.
|
||||
See [UI-012](design-decisions.md#ui-012--retain-three-stronger-character-themes) for the theme changes.
|
||||
Project Management without its own image shows the single host background through a transparent root.
|
||||
A saved or temporary board image retains its own background area.
|
||||
The host exposes `--rs-workarea-plugin-bg` and `--rs-workarea-surface-opacity` for saved images and slideshow frames.
|
||||
Lists, cards, card details, and search fields share an 82% tint when an image is active.
|
||||
Gantt and calendar views use one tinted panel. Date cells and headings keep the image visible.
|
||||
Selected cards retain the shared selection treatment. Nested surfaces keep their own tint to preserve readable controls.
|
||||
See [UI-014](design-decisions.md#ui-014--readable-project-management-surfaces).
|
||||
See [UI-010](design-decisions.md#ui-010--background-surface-visibility) for the surface rule.
|
||||
Slideshow frames override saved board images while active. A temporary board frame takes priority over the all-board frame.
|
||||
Identical app and Project Management slideshow frames use the host image once across both sidebars and the board.
|
||||
Distinct board frames retain their own background area.
|
||||
Card detail buttons have transparent resting backgrounds. Hover, pressed, and keyboard focus states remain visible.
|
||||
See [UI-017](design-decisions.md#ui-017--quiet-card-detail-controls) for the detail controls.
|
||||
Removal restores the saved image.
|
||||
Image changes fade for two seconds. Reduced motion removes the animation.
|
||||
Short image intervals and manual Next can interrupt a fade.
|
||||
See [UI-015](design-decisions.md#ui-015--slower-slideshow-fades).
|
||||
Decisions: [UI-014](design-decisions.md#ui-014--readable-project-management-surfaces), [UI-017](design-decisions.md#ui-017--quiet-card-detail-controls).
|
||||
|
||||
## Functional color and complete menu checks
|
||||
### Slideshow
|
||||
|
||||
Use [Functional color requirements](ui-color.md) for all color choices and reviews in the host and plugins.
|
||||
Start with vivid candidates for accents, priorities, status, selection outlines, syntax, and important data.
|
||||
Prefer stronger colors when readability, meaning, and distinction remain sound. Full saturation and full HSV value are normal options.
|
||||
Require concrete evidence for softer choices. Quiet layout does not authorize weak color or broad opacity reductions.
|
||||
The guide defines role requirements, current references, rendered checks, and the evidence needed for Review.
|
||||
See [UI-024](design-decisions.md#ui-024--assertive-functional-color-by-default) for the stronger default.
|
||||
|
||||
Searchable pickers can contain search, descriptions, and forms. Their panels and result rows use the shared menu presentation.
|
||||
Use `rs-picker`, `rs-picker-row`, `rs-picker-icon`, and `rs-picker-hint` from `src/lib/ui/menu.css`.
|
||||
Keep their different layout and semantics. Do not use the richer layout allowance to override panel color, row padding, font, or focus states.
|
||||
Use the shared action menu for native select replacements whenever the host API exists.
|
||||
Native selects remain only as documented fallbacks for older plugin hosts. Embedded website controls retain the website design.
|
||||
|
||||
Run `node scripts/menuSurfaceAudit.mjs` before menu work moves to Review.
|
||||
See the [menu and color review](menu-audit.md) and [source inventory](menu-surfaces.json) for scope and known limits.
|
||||
The inventory covers menu renderers, callers, native selects, and searchable pickers across the host and sibling plugins.
|
||||
An added or changed menu entry point requires inventory review. Source coverage does not prove runtime compliance.
|
||||
Run the listed browser checks for affected surfaces and retain screenshots of the exact reported control.
|
||||
A neighboring selector does not satisfy a card. Check every control shown in its screenshots.
|
||||
|
||||
|
||||
## Prevent repeated UI drift
|
||||
|
||||
Before a new control, find its shared component and an existing example. Extend that component when the same change helps other callers.
|
||||
A plugin can call `api.ui.showActionMenu` for the host menu. The host handles dismissal, focus return, and plugin cleanup.
|
||||
See [UI-007](design-decisions.md#ui-007--repeated-menu-drift) for repeated menu drift and its prevention checks.
|
||||
Rich pickers and forms can use separate layouts under the menu rules above. These permitted layouts do not need exception entries.
|
||||
Check local style overrides when a shared control differs from its peers. Correct the shared component or token when it causes the problem.
|
||||
|
||||
### Current rules and decision history
|
||||
|
||||
This guide is the current design reference. The [design decision log](design-decisions.md) records reasons, recurring problems, and exceptions.
|
||||
Keep current rules here so contributors do not need to reconstruct them from old entries.
|
||||
The trigger for a rule-change entry is a changed design rule, even when only one control changes.
|
||||
|
||||
| Change | Required record |
|
||||
| --- | --- |
|
||||
| Isolated correction to an existing rule | Normal card or commit record. No design entry. |
|
||||
| Intentional rule change | Update this guide and add a rule-change entry with its reason and scope. |
|
||||
| Recurring problem | Link the occurrences and record the cause, prevention action, and check. |
|
||||
| Deliberate exception | Record the user benefit, exact scope, and review date or trigger. Link it from the affected rule here. |
|
||||
|
||||
Restoring a menu to its specified color is a correction. Choosing a new font for the interface changes a rule.
|
||||
Repeated wrong menu colors need a recurring-problem record. Check the shared component and local overrides before adding more guidance.
|
||||
Repeated symptoms do not prove a cause. Record uncertainty until evidence identifies the cause.
|
||||
Use the log templates for new entries. Update the existing entry when the same problem returns.
|
||||
Keep historical decisions and link their replacements. A proposed entry does not replace the current rule.
|
||||
|
||||
### Evidence for review
|
||||
|
||||
For each UI change, include this evidence in the card or change review:
|
||||
|
||||
- Affected controls, the applicable guide section, and the shared component or token. Explain any separate implementation.
|
||||
- Relevant screenshots of changed states in light and dark themes, including narrow layouts and applicable focus or disabled states.
|
||||
- Results for keyboard use, empty and populated states, and the relevant checks listed above. State any unavailable checks.
|
||||
- A check against the design principles: repeated headings, competing accents, unnecessary controls, and space left for the user's work.
|
||||
- A link to a decision entry when a rule changes, a problem recurs, or an exception applies.
|
||||
|
||||
Keep screenshots as review evidence. An isolated correction still needs evidence, but it does not need a design entry.
|
||||
Use accepted examples as visual references for later changes. Label each reference with its control, theme, state, and current rule.
|
||||
Replace outdated references when the rule changes. Do not treat an unreviewed screenshot as an accepted design.
|
||||
|
||||
Run the shared menu check after menu changes and relevant feature checks after behavior changes.
|
||||
Keep native desktop checks separate from browser tests with mocked desktop services.
|
||||
Automated checks support visual and interaction review. They do not decide whether the interface keeps attention on the user's work.
|
||||
Move implementation-ready work to Review after the relevant checks pass. Keep unresolved work In progress and reserve Done for the user's acceptance.
|
||||
- A slideshow frame overrides the saved board image while it is active. A temporary board frame comes before the all-board frame. Removal restores the saved image.
|
||||
- When the app and Project Management show the same frame, the host draws it once across both sidebars and the board. Distinct board frames keep their own area.
|
||||
- Images fade over two seconds. Reduced motion removes the fade. Short intervals and manual Next can interrupt it.
|
||||
- Portrait images show in full over a blurred cover layer by default. The image editor previews a per-image fit, position, and overlay, and saves or resets the override. Global settings apply to other images. The [plugin API](plugin-development.md#plugin-api) defines the storage.
|
||||
- A new browser tab on `about:blank` shows the host background. A loaded page keeps its own rendering, even when it is empty.
|
||||
|
||||
Decisions: [UI-015](design-decisions.md#ui-015--slower-slideshow-fades), [UI-020](design-decisions.md#ui-020--per-image-slideshow-layout).
|
||||
|
||||
## Tooltips and text selection
|
||||
|
||||
Tooltips use the shared tooltip tokens for padding, font size, surface, text, and shadow. Controls keep one tooltip and no duplicate native title. Table cell hints use the same surface as toolbar hints. Hover and keyboard focus show the hint. Escape dismisses it. The hint stays within the viewport.
|
||||
- Use one tooltip per control, with no duplicate native `title`. Tooltips use the `--rs-tooltip-*` tokens for padding, font size, surface, text, and shadow. Table cell hints use the same surface.
|
||||
- Hover and keyboard focus show a tooltip. Escape dismisses it. It stays inside the viewport.
|
||||
- Text selection uses `--rs-selection` and `--rs-selection-text` in Writer, Reading, the IDE, and Project Management fields. A CodeMirror selection layer must override its generated default styles.
|
||||
- Text selection keeps the theme hue at 65% opacity or less, so the background shows through. A lower explicit opacity stays unchanged. Text stays opaque. Theme exports keep the source colors.
|
||||
|
||||
Text selection uses --rs-selection and --rs-selection-text in Writer, Reading, IDE, and Project Management fields. A CodeMirror selection layer must override its generated default styles.
|
||||
Decisions: [UI-019](design-decisions.md#ui-019--one-tooltip-surface), [UI-029](design-decisions.md#ui-029--text-selection-transparency).
|
||||
|
||||
Text selection retains the theme hue with at most 65% opacity. This lets users see the background through selected text.
|
||||
Explicit lower opacity values remain unchanged. Text stays opaque. Theme exports retain the source palette colors.
|
||||
See [UI-029](design-decisions.md#ui-029--text-selection-transparency).
|
||||
## Document panes and Find
|
||||
|
||||
See [UI-019](design-decisions.md#ui-019--one-tooltip-surface).
|
||||
- A workspace link can open another document in a pane to the right. A duplicate target focuses its existing pane.
|
||||
- Closing a split keeps its tab and unsaved text. The focused pane controls Save, the outline, and the Terminal selection.
|
||||
- Narrow work areas stack the panes vertically. Pane layouts stay local to the window.
|
||||
- Writer, source, Reading, and plugin editor views share `FindPanel.svelte` and `find.css`.
|
||||
- A plugin document editor without a Find handler searches its visible rendered text through `readingSearch.ts`. Rendered-text Find has no replace controls. Plugin Find handlers stay in use for views with their own search engine.
|
||||
- Generic plugin views and Kanban documents have no fallback Find.
|
||||
- Ctrl+F opens Find. Enter and Shift+Enter move between matches. Escape closes Find and returns focus. Find and Replace fields turn off saved-input suggestions.
|
||||
|
||||
## Browser and slideshow images
|
||||
Decisions: [UI-021](design-decisions.md#ui-021--workspace-links-in-document-panes), [UI-031](design-decisions.md#ui-031--shared-find-controls-in-plugin-views), [UI-034](design-decisions.md#ui-034--find-scope-and-shared-list-names).
|
||||
|
||||
New browser tabs with about:blank show the host background. Loaded pages retain their own rendering, including intentionally empty pages.
|
||||
|
||||
Slideshow stores per-image fit, position, and overlay in .runestone-backgrounds.json beside the images. The sidecar uses schema 1 and an images object. Settings saves compare the previous file text to preserve external changes. The sidecar has a 1 MiB limit.
|
||||
Portrait images show the full image over a blurred cover layer by default. Each target scales the foreground and blurred layer separately. The image editor shows a preview and lets users save or reset an override. Global settings remain the fallback for other images.
|
||||
The optional background API adds readImageSettings and writeImageSettings. Temporary frames can supply blurredUrl. The plugin owns all frame URLs and releases them after replacement or shutdown.
|
||||
|
||||
|
||||
See [UI-020](design-decisions.md#ui-020--per-image-slideshow-layout).
|
||||
|
||||
See [UI-018](design-decisions.md#ui-018--named-palettes-and-local-fonts) for the palette names and font choices.
|
||||
|
||||
|
||||
## Document panes
|
||||
|
||||
Workspace links can open another document to the right. Duplicate targets focus their existing pane. Closing a split preserves its tab and unsaved text. The focused pane controls Save, outline, and Terminal selection. Narrow work areas stack the panes vertically. Pane layouts stay local to the open window.
|
||||
|
||||
See [UI-021](design-decisions.md#ui-021--workspace-links-in-document-panes).
|
||||
## Find controls
|
||||
|
||||
Writer, source, Reading, and plugin editor views share FindPanel and find.css.
|
||||
Plugin document editors without a Find handler search their visible rendered text through readingSearch.ts.
|
||||
Generic plugin views and Kanban documents do not expose fallback Find. Find and Replace inputs disable saved-info suggestions.
|
||||
Keep replacement controls hidden for rendered text. Preserve plugin Find handlers for views with their own search engine.
|
||||
Ctrl+F opens Find. Enter and Shift+Enter select matches. Escape closes Find and returns focus.
|
||||
See [UI-031](design-decisions.md#ui-031--shared-find-controls-in-plugin-views) for the plugin scope and limits.
|
||||
## Project Management lists
|
||||
|
||||
A list can set an optional maximum through its shared action menu. Show the active count and maximum together.
|
||||
Use an opaque warning icon and tooltip when the count reaches or exceeds the maximum. Extra cards remain permitted.
|
||||
Count all active cards in the list, including cards outside the current search results.
|
||||
- A list can set an optional card maximum through its action menu. Show the active count and the maximum together.
|
||||
- At or above the maximum, show an opaque warning icon with a tooltip. Extra cards stay permitted. The count includes active cards outside the current search results.
|
||||
- Lists collapse to narrow strips with a vertical name and card count. The expand control keeps its accessible name, tooltip, focus, and expanded state.
|
||||
- Named boards save collapse state with their lists. All Tasks saves its own collapse state, and does not change board lists or card placement.
|
||||
|
||||
All Tasks merges lists with matching names into one column. Name matching ignores case and outer spaces.
|
||||
Cards appear once per matching column. Distinct lists and empty lists remain visible.
|
||||
Merged columns omit board-specific capacity limits. Named board lists retain their own limits.
|
||||
Keep this overview frozen against card drag and quick movement actions. Card details and named boards retain their move controls.
|
||||
See [UI-033](design-decisions.md#ui-033--list-capacity-and-a-frozen-all-tasks-overview) for the reason and separate hotfix.
|
||||
### All Tasks
|
||||
|
||||
See [UI-034](design-decisions.md#ui-034--find-scope-and-shared-list-names) for the current Find and All Tasks rules.
|
||||
- All Tasks merges lists with the same name into one column. The match ignores case and outer spaces. Distinct and empty lists stay visible.
|
||||
- Each column groups cards under board-name dividers. A shared card shows once per column, under a heading that names each matching board. Cards without an active board go under No active board. Empty groups stay hidden.
|
||||
- Merged columns have no capacity limits. Named board lists keep their own limits.
|
||||
- Card drag and quick move actions are off in All Tasks. Card details and named boards keep their move controls.
|
||||
- New cards from a column or New card need an active board. The Board and List controls come from the shared card editor and host menus. The destination is the list with a matching name, or the default list of the board.
|
||||
|
||||
All Tasks groups cards within each column under board names with dividers.
|
||||
Shared cards appear once per column, under a heading that names each matching board.
|
||||
Cards without an active board use No active board. Empty groups stay hidden.
|
||||
See [UI-035](design-decisions.md#ui-035--board-dividers-in-all-tasks) for the scope and review evidence.
|
||||
### Cards and boards
|
||||
|
||||
- A description edit stays a draft until Save. Cancel restores the saved text. Closing card details keeps the draft, and the card then shows an unsaved marker. Edit opens the draft. Use the labels Save and Cancel, and leave readable space below long descriptions.
|
||||
- Board and list changes save at once. Close and an outside click use the same save path for other fields.
|
||||
- Each workspace can set a fixed default view: All tasks or one board. Restored tabs and explicit links keep their targets. An unavailable default returns to All tasks. A workspace without boards shows a New board action.
|
||||
- New cards record their creation time, and card details show it. Existing cards show Unknown when no reliable time exists. Moves and edits do not change it. Board cards do not show timestamps.
|
||||
|
||||
### Collapse and creation
|
||||
Decisions: [UI-033](design-decisions.md#ui-033--list-capacity-and-a-frozen-all-tasks-overview), [UI-034](design-decisions.md#ui-034--find-scope-and-shared-list-names), [UI-035](design-decisions.md#ui-035--board-dividers-in-all-tasks), [UI-036](design-decisions.md#ui-036--compact-list-collapse-and-assigned-creation), [UI-037](design-decisions.md#ui-037--saved-metadata-and-explicit-description-drafts), [UI-038](design-decisions.md#ui-038--fixed-workspace-default-board).
|
||||
|
||||
Lists collapse into narrow strips with vertical names and card counts in named boards and All Tasks.
|
||||
The expand control keeps its accessible name, tooltip, keyboard focus, and expanded state.
|
||||
Named boards save collapse state with their lists. All Tasks saves its own collapse state with the view.
|
||||
Collapsing All Tasks columns does not change board lists or card placements.
|
||||
## Review checklist
|
||||
|
||||
All Tasks can create cards through each column or the New card action.
|
||||
Each new card requires an active board. The destination list uses that board's own list ID.
|
||||
A matching list name selects the destination list when available. Otherwise, the board's default list applies.
|
||||
The shared card editor and host choice menus supply the Board and List controls.
|
||||
Card movement remains disabled in the overview.
|
||||
See [UI-036](design-decisions.md#ui-036--compact-list-collapse-and-assigned-creation) for the decision.
|
||||
Examine each changed control in these conditions:
|
||||
|
||||
### Card drafts and metadata
|
||||
- Light and dark themes, and each named palette that the change affects
|
||||
- Narrow windows and viewport edges
|
||||
- Empty, populated, and long content, such as long plugin lists in Settings
|
||||
- Normal, hover, keyboard focus, selected, and disabled states
|
||||
- Keyboard use and focus return
|
||||
- For selection: single items, contiguous ranges, separate groups, and nested rows
|
||||
- For tabs: plugin views and pinned tabs
|
||||
- For menus: file, folder, pane, tab, editor, table, and submenu examples, with icon alignment
|
||||
|
||||
Existing card descriptions remain drafts until Save. Cancel restores the saved description.
|
||||
Closing card details preserves the draft separately. Reopening shows an unsaved marker. Edit opens the draft.
|
||||
Board and list choices save immediately. Close and outside click use the same save path for other metadata.
|
||||
Keep readable space below long descriptions and use the labels Save and Cancel.
|
||||
See [UI-037](design-decisions.md#ui-037--saved-metadata-and-explicit-description-drafts) for the reason and checks.
|
||||
Run these checks:
|
||||
|
||||
### Default board and card creation time
|
||||
| Change | Command |
|
||||
| --- | --- |
|
||||
| Shared menu code | `node scripts/menuConsistency.smoke.mjs` against the [development server](development.md#run-from-source). Set `SMOKE_URL` for a different server. Set `PLAYWRIGHT_MODULE` and `CHROME_PATH` when the environment needs explicit paths. |
|
||||
| Any menu, select, or picker work | `pnpm check:menus` (runs `node scripts/menuSurfaceAudit.mjs`) before Review |
|
||||
|
||||
Each workspace can choose a fixed default: All tasks or one board.
|
||||
The launcher uses that default. Restored tabs and explicit links retain their targets.
|
||||
An unavailable default returns to All tasks. A workspace without boards shows a visible New board action.
|
||||
See [UI-038](design-decisions.md#ui-038--fixed-workspace-default-board) for the scope and host contract.
|
||||
The audit compares source entry points with the inventory in `docs/menu-surfaces.json`, across the host and sibling plugins. A new or changed entry point needs an inventory review. The audit covers source only. It does not prove runtime compliance.
|
||||
|
||||
New cards record their original creation time. Card details show that date and time.
|
||||
Existing cards show Unknown unless a reliable original creation time exists.
|
||||
Moves and later edits do not change the creation time. Keep timestamps out of board cards.
|
||||
For a card, open the exact control in each screenshot of the card. A neighboring control does not satisfy the card.
|
||||
|
||||
Record this evidence in the card or change review:
|
||||
|
||||
- The affected controls, the guide section, and the shared component or token. Explain any separate implementation and any local override.
|
||||
- Screenshots of the changed states in light and dark themes, including narrow layouts, at normal scale.
|
||||
- The check results. State each check that you could not run.
|
||||
- A check against the [design principles](#design-principles): repeated headings, competing accents, extra controls, and space for the user's work.
|
||||
- A link to a decision entry when a rule changes, a problem recurs, or an exception applies.
|
||||
|
||||
Browser tests with mocked desktop services do not replace native window and installer checks. Automated checks do not decide whether the interface keeps attention on the work.
|
||||
Label accepted screenshots with their control, theme, state, and rule, and use them as references. Replace them when the rule changes. An unreviewed screenshot is not an accepted design.
|
||||
Move work to Review after the relevant checks pass. Keep unresolved work In progress. Done needs the user's acceptance.
|
||||
|
||||
## Decision records
|
||||
|
||||
This guide holds the current rules. The [design decision log](design-decisions.md) records why rules changed, recurring problems, and exceptions.
|
||||
|
||||
| Change | Record |
|
||||
| --- | --- |
|
||||
| Isolated correction, such as a menu restored to its specified color | Card or commit record only. No log entry. |
|
||||
| Rule change, such as a new interface font, even for one control | Update this guide and add a rule-change entry in the same change. |
|
||||
| Recurring problem, such as repeated wrong menu colors | Add or update one problem entry. Link the occurrences, and record the cause and the prevention check. |
|
||||
| Exception | Add an exception entry with the user benefit, exact scope, and review date or trigger. Link it from the affected rule here. |
|
||||
|
||||
- A log entry does not authorize a departure from the current rule.
|
||||
- Repeated symptoms do not prove a cause. Record an unknown cause as unknown.
|
||||
- Clarify this guide only when a rule is missing or unclear.
|
||||
|
||||
Decisions: [UI-001](design-decisions.md#ui-001--separate-design-decisions-from-routine-corrections).
|
||||
|
||||
+145
-118
@@ -2,188 +2,215 @@
|
||||
|
||||
[RuneStone](../README.md) · [Installation](installation.md)
|
||||
|
||||
This guide describes current source behavior. A supplied installer can contain an earlier feature set.
|
||||
Check its release notes if a control is missing.
|
||||
This guide explains how to work with files, documents, tabs, settings, and the built-in browser in RuneStone.
|
||||
|
||||
| Task | Go to |
|
||||
| --- | --- |
|
||||
| Open a workspace or create files | [Files and workspaces](#open-a-workspace) |
|
||||
| Open or create a workspace | [Open a workspace](#open-a-workspace) |
|
||||
| Create, find, or organize files | [Create and find files](#create-and-find-files) |
|
||||
| Write, read, or follow a link | [Edit documents](#edit-documents) |
|
||||
| Work with images, diagrams, or tables | [Document tools](guides/document-tools.md) |
|
||||
| Save a reusable note | [Templates](#use-note-templates) |
|
||||
| Change colors | [Appearance](guides/themes.md) |
|
||||
| Browse websites and manage browser profiles | [Built-in browser](#use-the-built-in-browser) |
|
||||
| Work with images, diagrams, or tables | [Images, diagrams, and tables](guides/document-tools.md) |
|
||||
| Start a note from a template | [Use note templates](#use-note-templates) |
|
||||
| Arrange tabs and windows | [Manage tabs](#manage-tabs) |
|
||||
| Save, or recover from a changed file | [Save your work](#save-your-work) and [Resolve file conflicts](#resolve-file-conflicts) |
|
||||
| Change the language or colors | [Change settings](#change-settings) and [Appearance](guides/themes.md) |
|
||||
| Add Terminal, Git, or other features | [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) |
|
||||
| Resolve a changed or missing file | [File conflicts](#resolve-file-conflicts) |
|
||||
|
||||
## Open a workspace
|
||||
|
||||
Use the folder button or Ctrl+O to open a folder or choose a recent workspace.
|
||||
The menu shows full paths and remembers the 20 most recent folders.
|
||||
Use the × beside a recent workspace to remove it from this menu.
|
||||
Removal keeps its files, settings, and open windows.
|
||||
New workspace creates a named folder without replacing an existing folder.
|
||||
Opening another workspace creates a new window and keeps the current window's documents and terminals.
|
||||
A workspace is a folder on your computer. RuneStone reads and writes its files directly.
|
||||
|
||||
RuneStone uses ordinary files. The navigator, Quick Open, and search do not apply Git ignore rules.
|
||||
They hide `.git`, `.obsidian`, and temporary save files. The navigator hides `.runestone` by default.
|
||||
Settings → General → Show .runestone folder reveals workspace configuration files in the navigator.
|
||||
The navigator does not traverse directory symlinks.
|
||||
1. Select the folder button at the bottom of the sidebar, or press Ctrl+O.
|
||||
2. Choose a recent workspace, **Open another folder…**, or **New workspace…**.
|
||||
|
||||
Each workspace opens in its own window. The current window keeps its documents and terminals.
|
||||
**New workspace…** creates a named folder at the location that you choose. It does not replace an existing folder.
|
||||
The recent list keeps the 20 most recent folders. Select × beside a folder to remove it from the list. This does not change the folder.
|
||||
|
||||
The navigator, Quick Open, and search hide `.git`, `.obsidian`, `.runestone`, and temporary save files.
|
||||
They do not apply Git ignore rules, and the navigator does not follow folder symbolic links.
|
||||
To show workspace settings and plugin data in the navigator, turn on **Settings → General → Show .runestone folder**.
|
||||
|
||||
## Create and find files
|
||||
|
||||
Press Ctrl+N for New file. Enter the complete filename, including its extension, such as `notes/meeting.md` or `scripts/check.py`.
|
||||
RuneStone does not add an extension to New file.
|
||||
New note creates a Markdown file. The note title can then rename it.
|
||||
| Action | How |
|
||||
| --- | --- |
|
||||
| New file | Press Ctrl+N and type the full name with its extension, such as `notes/meeting.md` or `scripts/check.py`. RuneStone does not add an extension. |
|
||||
| New note | Select **New note** in an empty tab, or right-click the navigator and choose **New note**. RuneStone creates a Markdown file. Rename it from the note title. |
|
||||
| Find a file by path | Press Ctrl+P. |
|
||||
| Search all files | Press Ctrl+Shift+F. |
|
||||
| Find in the document | Press Ctrl+F. |
|
||||
| Show or hide the sidebar | Press Ctrl+B. |
|
||||
| Rename | Select an item in the navigator and press F2. RuneStone selects the name without the extension. |
|
||||
| Move | Drag files between folders. |
|
||||
| Bookmark | Right-click a file and choose **Bookmark**. The Bookmarks pane lists it. |
|
||||
|
||||
Use Ctrl+P to find files by path. Ctrl+Shift+F searches the workspace, and Ctrl+F searches the editor.
|
||||
Right-click a file or folder for its available actions. Drag files between folders to reorganize them.
|
||||
With the navigator focused, Ctrl+Z undoes a file move and Ctrl+Shift+Z repeats it.
|
||||
Right-click a file or folder for more actions, such as **Make a copy**, **Copy workspace path**, and **Open in default app**.
|
||||
With the navigator focused, Ctrl+X, Ctrl+C, and Ctrl+V cut, copy, and paste files.
|
||||
Ctrl+Z undoes a file move or rename, and Ctrl+Shift+Z or Ctrl+Y repeats it.
|
||||
|
||||
**Delete** removes files permanently. It does not use the Recycle Bin or Trash, and Ctrl+Z cannot restore the files.
|
||||
|
||||
## Edit documents
|
||||
|
||||
Writer shows Markdown as a continuous document. The active line reveals its source, while other lines show formatting.
|
||||
Use Enter, arrow keys, and ordinary text selection to edit across lines.
|
||||
Checkboxes update their task markers, and completed tasks show a strike through their text.
|
||||
Each document pane has two controls:
|
||||
|
||||
Ctrl+E switches between Writer and the IDE source editor. The document controls select Edit, Read, or Split.
|
||||
Hover a control or focus it with the keyboard to see its label. Split stacks vertically in narrow panes.
|
||||
Writer edits preserve Markdown source, frontmatter, and Windows line endings.
|
||||
Read displays frontmatter in a collapsed Properties section.
|
||||
| Control | Choices |
|
||||
| --- | --- |
|
||||
| Editor layout (Ctrl+E) | **Writer** shows formatted Markdown and reveals the source of the active line. **IDE** shows the plain source with syntax colors. |
|
||||
| Document view | **Edit**, **Read**, or **Split**. Split shows the editor and the reading view together. It stacks them in narrow panes. |
|
||||
|
||||
Ctrl+click opens links in Writer and IDE mode. Workspace file links open a tab and retain the source document.
|
||||
Links to document sections scroll to the heading in Writer, IDE, Read, and Split views.
|
||||
Use a Markdown heading fragment, such as `#install-and-start`, after the file path or by itself for the current document.
|
||||
Read mode follows links with an ordinary click. Wiki links, note callouts, and Mermaid diagrams work in document views.
|
||||
Wiki links resolve note names across the workspace. Use a relative or workspace path when names repeat.
|
||||
The Backlinks section below the outline lists notes that link to the current note. Select an entry to open its source.
|
||||
Collapse the section to hide it. Use Rebuild note index to scan the workspace again.
|
||||
The index follows note changes and link edits. Markdown files remain readable without the index.
|
||||
Code blocks remain editable on the first click. Their Copy code button copies the body without the Markdown fences.
|
||||
Hover over a control, or focus it with the keyboard, to see its name.
|
||||
Writer keeps your Markdown source, frontmatter, and Windows line endings. Read shows frontmatter in a collapsed **Properties** section.
|
||||
Select a checkbox to complete a task. Copy code blocks without their Markdown fences with the **Copy code** button.
|
||||
|
||||
Click the note title in Writer to rename its file. Enter or leaving the field saves the name, and Escape cancels.
|
||||
The rename keeps the folder, Markdown extension, contents, and editing history.
|
||||
Press F2 in the file navigator to rename an item. File names select the stem and keep the extension outside the selection.
|
||||
Folder names select the complete name.
|
||||
To rename a note, select its title in Writer and type a new name. Press Enter or leave the field to save the name. Press Escape to cancel.
|
||||
The file keeps its folder, extension, contents, and edit history.
|
||||
|
||||
### Links and backlinks
|
||||
|
||||
- Ctrl+click a link in Writer or IDE. In Read, a normal click follows the link.
|
||||
- A workspace file link opens in a new tab and keeps the current document open.
|
||||
- A heading link, such as `guide.md#save-your-work` or `#save-your-work`, scrolls to that heading.
|
||||
- A wiki link, such as `[[Meeting notes]]`, finds the note by name anywhere in the workspace. If two notes have the same name, use a relative or workspace path.
|
||||
- The **Backlinks** section below the outline lists notes that link to the current note. Select an entry to open it.
|
||||
|
||||
If backlinks look out of date, select **Rebuild note index**. Your Markdown files do not depend on this index.
|
||||
|
||||
### Format text
|
||||
|
||||
Right-click Markdown text, or press Shift+F10, for formatting, links, search, extraction, and clipboard actions.
|
||||
Use arrow keys for submenus and Escape to return to editing.
|
||||
Right-click Markdown text, or press Shift+F10, to open the context menu. Use the arrow keys for submenus. Press Escape to return to the text.
|
||||
|
||||
| Menu | Actions |
|
||||
| --- | --- |
|
||||
| Format | Bold, italic, strike, highlight, code, math, comments, and clear formatting |
|
||||
| Paragraph | Lists, tasks, headings 1–6, body text, and quotes |
|
||||
| Format | Bold, italic, strikethrough, highlight, code, math, comment, and clear formatting |
|
||||
| Paragraph | Bulleted and numbered lists, tasks, headings 1–6, body text, and quotes |
|
||||
| Insert | Footnotes, tables, callouts, horizontal rules, code blocks, and math blocks |
|
||||
|
||||
There is no formatting toolbar. Obsidian Bases are not supported.
|
||||
Right-click a misspelled word for the operating system's spelling suggestions when available.
|
||||
Windows can retain its native spelling menu when WebView2 cannot expose suggestion labels to RuneStone.
|
||||
The menu also has link, search, extraction, and clipboard actions. RuneStone has no formatting toolbar.
|
||||
Right-click a misspelled word to see spelling suggestions from the operating system.
|
||||
|
||||
## Use note templates
|
||||
|
||||
1. Right-click a Markdown file or its tab.
|
||||
2. Choose Save as template and enter a name.
|
||||
3. Choose the saved template from New note.
|
||||
A template is a Markdown file in the workspace folder `.runestone/templates/`.
|
||||
|
||||
Templates belong to the current workspace and live in `.runestone/templates/` as Markdown files.
|
||||
New note copies the template into a new file. Duplicate names receive a unique filename.
|
||||
Editing the new note does not change the template. New file still accepts an exact filename and extension.
|
||||
1. Right-click a Markdown file or its tab.
|
||||
2. Choose **Save as template** and type a name.
|
||||
3. To use the template, choose **New note** in an empty tab or in the navigator, then select the template.
|
||||
|
||||
New notes are copies. A change to a new note does not change the template.
|
||||
To create, rename, edit, or delete templates, choose **New note → Manage templates…** in the navigator.
|
||||
|
||||
## Manage tabs
|
||||
|
||||
Tabs retain their editor models, undo history, cursor, and scroll position while open.
|
||||
Click + or press Ctrl+T for an empty tab. Opening or creating a file uses that tab.
|
||||
Ctrl+Tab selects the next tab, and Ctrl+Shift+Tab selects the previous tab.
|
||||
Each open tab keeps its undo history, cursor, and scroll position.
|
||||
|
||||
Drag a tab to reorder it. Holding it near an edge scrolls the tab strip, and Escape cancels the drag.
|
||||
Right-click a tab for Move tab left or Move tab right.
|
||||
With a tab focused, Alt+Shift+Left or Alt+Shift+Right moves it. Arrow keys, Home, and End select tabs.
|
||||
| Action | How |
|
||||
| --- | --- |
|
||||
| New empty tab | Select + or press Ctrl+T. The next file that you open uses this tab. |
|
||||
| Next or previous tab | Ctrl+Tab or Ctrl+Shift+Tab |
|
||||
| Close the tab | Ctrl+W |
|
||||
| Reorder | Drag the tab. Press Escape to cancel. With a tab focused, press Alt+Shift+Left or Alt+Shift+Right. |
|
||||
| Pin, close others, or close all | Right-click the tab. |
|
||||
| Move to a new window | Drag the tab out of the tab strip, or right-click it and choose **Open in new window**. |
|
||||
| Move to another window | Drag the tab to the tab strip of the other window. |
|
||||
|
||||
Drag a tab outside the tab strip to move it into a new window.
|
||||
Drop a tab near another window's tab ribbon to add it at the end.
|
||||
Drop over an existing tab to choose its position.
|
||||
You can also right-click the tab and choose Open in new window.
|
||||
RuneStone transfers the current buffer, including unsaved text. It closes the source tab after the new window accepts the transfer.
|
||||
If the transfer fails or the source buffer changes before acceptance, the source tab remains open.
|
||||
Move a plugin tab between existing windows of the same workspace, or tear it into a new window.
|
||||
The source tab stays open if the destination cannot accept it or already contains the view.
|
||||
RuneStone moves the current text of the tab, also unsaved text. It closes the source tab only after the new window accepts the tab.
|
||||
If the move fails, the source tab stays open.
|
||||
|
||||
A normal application restart restores document tabs in their saved order, with the active tab and pins.
|
||||
Missing or renamed files do not block the remaining tabs. RuneStone reads document contents from disk.
|
||||
When you start RuneStone again, it opens the document tabs of the workspace. It keeps their order, pins, and active tab.
|
||||
This includes plugin tabs that show a file, such as a PDF. RuneStone reads the contents again from disk. Missing files do not stop the other tabs from opening.
|
||||
|
||||
## Save your work
|
||||
|
||||
Auto-save starts enabled with a five-second interval and includes background tabs.
|
||||
Ctrl+S saves immediately. RuneStone does not rewrite unchanged files.
|
||||
Settings → General accepts an interval from 1 to 300 seconds or turns auto-save off.
|
||||
The interval changes when you leave the field. Restore defaults enables the five-second interval again.
|
||||
Auto-save is on by default. It saves changed files every 5 seconds, also in background tabs. RuneStone does not write unchanged files.
|
||||
Press Ctrl+S to save the active file immediately.
|
||||
|
||||
Closing a dirty tab or desktop window asks before it discards edits or ends terminal sessions.
|
||||
Unsaved buffers, terminal sessions, and plugin views without a document do not restore after restart. Crash recovery remains planned.
|
||||
To change auto-save, open **Settings → General**. Set an interval from 1 to 300 seconds, or turn auto-save off.
|
||||
**Restore defaults** sets auto-save on with a 5-second interval.
|
||||
|
||||
If you close a tab or window with unsaved edits, RuneStone asks before it discards them or ends terminal sessions.
|
||||
Unsaved text and terminal sessions do not survive a restart or a crash.
|
||||
|
||||
## Resolve file conflicts
|
||||
|
||||
Clean buffers reload when another tool changes the file. A buffer with local edits shows a disk conflict instead.
|
||||
Choose the disk version, keep local edits, or save a copy. Missing files keep their open buffer.
|
||||
When another program changes an open file, RuneStone does one of two things:
|
||||
|
||||
Saves compare disk text with the saved baseline, write a complete temporary file, then replace the destination.
|
||||
Failed writes keep the edits available. This process does not lock other tools out of the file.
|
||||
Another process can still write between the final comparison and replacement.
|
||||
- If the tab has no unsaved edits, RuneStone loads the new file contents.
|
||||
- If the tab has unsaved edits, RuneStone keeps your edits and shows a message. Expand **View disk version** to compare. Auto-save pauses for this tab until you choose an action.
|
||||
|
||||
## Change settings or add plugins
|
||||
Then choose one action:
|
||||
|
||||
The gear beside the workspace selector opens Settings. Ctrl+, works when the sidebar is hidden.
|
||||
Settings searches by category. Preferences apply to all workspaces on this device and synchronize across open windows.
|
||||
The desktop uses a separate Settings window. The browser preview uses a dialog.
|
||||
| Action | Result |
|
||||
| --- | --- |
|
||||
| **Use disk version** | Replaces your edits with the file on disk. |
|
||||
| **Keep my edits** | Keeps your edits. The next save replaces the file on disk. |
|
||||
| **Save a copy** | Saves your edits to a new file. |
|
||||
|
||||
Settings → Appearance selects built-in colors or installs a theme. See the [appearance guide](guides/themes.md).
|
||||
Settings → General → Display language selects English, French, Japanese, or Simplified Chinese for the host interface.
|
||||
This setting does not translate documents, plugin-owned content, operating-system messages, or bundled Monaco controls.
|
||||
Some runtime and file-operation diagnostics retain English fallback text.
|
||||
Reopen a document to refresh existing editor widget tooltips after a language change.
|
||||
The documentation remains in English.
|
||||
Settings → Plug-ins installs local ZIPs or experimental Gitea release links.
|
||||
Use the [plugin guide](plugins.md#install-a-plugin) for installation, access, and removal details.
|
||||
If the file is deleted, the tab keeps your text. Use **Save a copy**, or **Retry** after the file is back.
|
||||
|
||||
No optional plugin starts automatically in a fresh installation. Enable choices persist across restarts and windows.
|
||||
Disabling Terminal ends its sessions. Disabling Table Formulas preserves formulas and basic table editing.
|
||||
Uninstall removes the installed package after confirmation and retains its settings and workspace documents.
|
||||
Before it saves, RuneStone compares the file on disk with the version that it last read. It writes a complete temporary file, then replaces the original.
|
||||
If a write fails, your edits stay in the tab. RuneStone does not lock files, so another program can still write at the same time.
|
||||
|
||||
## Change settings
|
||||
|
||||
Select the gear at the bottom of the sidebar, or press Ctrl+,. Use the search field to find a setting.
|
||||
Settings apply to all workspaces on this computer and update all open windows.
|
||||
|
||||
| Category | Settings |
|
||||
| --- | --- |
|
||||
| General | Display language, **Show .runestone folder**, and auto-save |
|
||||
| Appearance | Color theme, transparency, background image, and custom themes. See [Appearance and custom themes](guides/themes.md). |
|
||||
| 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 |
|
||||
|
||||
**Display language** sets the RuneStone controls to English, Français, 日本語, or 简体中文.
|
||||
It does not translate documents, plugin content, or operating system messages. Some error messages stay in English.
|
||||
Reopen a document to update its editor tooltips after a language change.
|
||||
|
||||
## Use the built-in browser
|
||||
|
||||
The RuneStone installer includes the browser interface and its native Chromium runtime. No plugin ZIP is required.
|
||||
Use **New browser tab** to open a browser tab. Manage profiles in Settings and use web bookmarks to return to saved sites.
|
||||
The browser keeps the existing data directory, including profiles, bookmarks, cookies, and settings.
|
||||
You can uninstall an old Browser package through **Settings → Plug-ins**. The host does not load it alongside the built-in browser.
|
||||
RuneStone includes a Chromium-based browser. It needs no plugin.
|
||||
|
||||
1. Select the globe button at the top right of the window to open a **New browser tab**.
|
||||
2. Type an address or a search.
|
||||
|
||||
Use **Settings → Browser** to set the homepage and search engine, manage profiles, block ads, and clear cookies, cache, or history.
|
||||
Each profile keeps its own cookies and bookmarks. Web bookmarks show in the Bookmarks pane.
|
||||
To open web links from your documents in your system browser instead, turn off **Open web links in RuneStone**.
|
||||
|
||||
## Keyboard reference
|
||||
|
||||
These are the Windows/Linux shortcuts. macOS desktop behavior still needs native tests.
|
||||
This table lists the Windows and Linux keys.
|
||||
|
||||
| Action | Shortcut |
|
||||
| --- | --- |
|
||||
| Open workspace / Find file / New file | Ctrl+O / Ctrl+P / Ctrl+N |
|
||||
| Open a workspace | Ctrl+O |
|
||||
| Find a file / New file | Ctrl+P / Ctrl+N |
|
||||
| New tab / Close tab | Ctrl+T / Ctrl+W |
|
||||
| Next tab / Previous tab | Ctrl+Tab / Ctrl+Shift+Tab |
|
||||
| Save / Find in document / Search workspace | Ctrl+S / Ctrl+F / Ctrl+Shift+F |
|
||||
| Move the focused tab | Alt+Shift+Left / Alt+Shift+Right |
|
||||
| Save | Ctrl+S |
|
||||
| Find in document / Search workspace | Ctrl+F / Ctrl+Shift+F |
|
||||
| Switch Writer and IDE | Ctrl+E |
|
||||
| Context actions | Shift+F10 |
|
||||
| Show or hide the sidebar | Ctrl+B |
|
||||
| Rename | F2 |
|
||||
| Context menu | Shift+F10 |
|
||||
| Settings / Help and about | Ctrl+, / F1 |
|
||||
|
||||
The [Terminal guide](guides/terminal.md) lists plugin shortcuts.
|
||||
The [Terminal guide](guides/terminal.md) lists the terminal shortcuts.
|
||||
|
||||
## Get help and check limits
|
||||
## Limits
|
||||
|
||||
Press F1 or use the question mark beside the workspace selector for Help and about.
|
||||
It shows the app version, basic instructions, and shortcuts. Escape or the close button returns to the document.
|
||||
- Math shows as formatted source text. RuneStone does not typeset formulas.
|
||||
- The IDE editor colors syntax, but has no language services such as error checks or go to definition.
|
||||
- RuneStone does not support Obsidian Bases.
|
||||
- Plugins have full access to RuneStone and your files. See [Install and manage plugins](plugins.md).
|
||||
|
||||
Math rendering still needs work.
|
||||
Crash recovery and restricted plugin permissions remain planned.
|
||||
Language-server support belongs to a future optional plugin because of its technical requirements.
|
||||
Git controls are available through the optional Git plugin. Git is no longer only a planned feature.
|
||||
Unsaved buffers and terminal sessions last only for the current application session.
|
||||
## Get help
|
||||
|
||||
For installation and update steps, use the [installation guide](installation.md).
|
||||
For a reproducible problem, record the app version, operating system, steps, expected result, and error text.
|
||||
Press F1, or select the question mark at the bottom of the sidebar, for **Help and about**. It shows the app version, basic steps, and shortcuts.
|
||||
|
||||
When you report a problem, include the app version, operating system, steps, expected result, and error text.
|
||||
|
||||
Reference in New Issue
Block a user