Commit Graph
27 Commits
Author SHA1 Message Date
Knotty Wyvern a950edfb13 Release the plugin SDK as a package file
pnpm release:sdk now packs runestone-plugin-sdk-<version>.tgz and sdk.json
into releases/plugin-sdk/<version>/. Plugins install the SDK from the URL
of that file on the RuneStone releases page. The script no longer uses a
clone of a separate SDK repository.

Installers, browser engine ZIPs, and SDK packages now share the RuneStone
releases page.
2026-10-29 13:05:10 -07:00
Knotty Wyvern aebe700366 Ship the browser engine as its own release file
The installer no longer bundles the engine, and the installer script
stops when the bundle names it or when the setup file is over 30 MB.
pnpm build:browser-engine packages the engine, writes a deterministic
ZIP and its record to releases/browser-engine/<version>/, and pins the
ZIP in the host. The installer hooks remove the engine folder that 0.1.48
leaves behind, and uninstall removes the downloaded engine.
2026-10-29 01:25:53 -07:00
Knotty Wyvern e9c59f28de Send the remaining interface text through the catalog and audit it
Phase 4f.

- scripts/i18nAudit.mjs runs in pnpm check. It fails for a key that the
  catalog does not have, a catalog key that the code does not use, and
  a row without all four languages.
- message() marks a key that a variable carries to the translation call
  later: table formats, formula errors, and browser status messages.
- 53 new rows with French, Japanese, and Simplified Chinese text for the
  status and error messages of the workbench, the tree, Settings, theme
  import, images, the built-in browser, and code blocks. The backlinks
  toggle now translates too.
- 13 unused rows are gone.
- Errors of the plugin API stay in English. docs/development.md has the
  rule in "Interface text".

pnpm check, pnpm test (350 of 350), and the full smoke suite pass,
except two tests that failed one time under load and passed on retry
and 3 of 3 times alone.
2026-10-28 12:00:24 -07:00
Knotty Wyvern 4d09da30d9 Support the migrated plugins in the host tests
- The pty_open mocks in layout/workbench and plugins/lifecycle send
  output through the channel that api.pty passes. Without a channel they
  keep the old events, so released Terminal versions still pass.
- plugins/gitToolbar resolves the Git plugin's "@runestone/plugin-sdk"
  imports to this repository's SDK build. The smoke runner builds the
  SDK when it is missing.
- The menu audit no longer compares the Terminal plugin's copies of the
  host menu files. The plugin now uses host menus through the SDK.

Checked with the released plugins and with the migrated Terminal, Git,
and Project Management branches.
2026-10-28 03:11:07 -07:00
Knotty Wyvern bb0b8f88b6 Add the versioned plugin SDK package and its release script
The new package packages/plugin-sdk (@runestone/plugin-sdk) is the one source of the public plugin types.
It contains PluginApi and its members, the manifest type, API_VERSION, and feature checks
(hasFeature, requireFeature, requireFeatures, missingFeatures). It also contains the action icons and
the tooltip helper as DOM functions, because RuneStone has no API for them. Menus stay host-drawn through
api.ui.showActionMenu, so the SDK contains only the menu types. The SDK uses the Apache License 2.0.

The host imports the SDK with relative paths in src/lib/plugins/sdk.ts, src/lib/ui/actionIcons.ts, and
src/lib/ui/tooltip.ts. The completion, Git, background, and contribution contract files export the SDK types.
The menu files keep their types, because the Terminal plugin keeps copies of them. A unit test makes sure
that those types and the SDK types are the same. The menu inventory now scans the SDK source.

pnpm sdk:build compiles the SDK to dist/. pnpm release:sdk --version <v> builds it, then commits and tags
v<v> in a local clone of the public repository. It never pushes, and it prints the push commands.
It stops before a change in these conditions:
- The clone is missing, has changes, or is not on a branch.
- The tag exists, or the version is not greater than the current version.
- The package has no LICENSE file, or the SDK source has changes that are not committed.
A failed attempt restores the version and the clone.

pnpm check type checks the SDK and the example plugin. The example plugin now has JSDoc types from the SDK.
pnpm test covers the feature checks, the host and SDK parity, and the release script with temporary
Git repositories. The plugin development, release, development, and completion guides describe the SDK.
2026-10-28 02:33:16 -07:00
Knotty Wyvern e83bf46268 Cache plugin package hashes, add a content security policy, and limit browser windows
Plugin runtime cost:
- Remove the timed plugin scan. Windows scan at start, on focus, on Refresh, and on plugins-changed.
- Keep one package check for each plugin folder. Read and hash the files again only when the
  entry names, sizes, or modification times change. Enable and load always read all files.
  An asset read checks the SHA-256 hash of its file.
- A changed package still stops and needs a new enable decision. Add tests for the cache,
  for changes that keep the metadata, and for the enable decision.
- Replace the 50 ms wait loops of update and removal with a condition variable. The limit
  stays at 10 seconds. Command names, arguments, and results do not change.

Content security policy:
- Set app.security.csp in tauri.conf.json. Keep Tauri from adding nonces to style-src.
- Add CSP mode to the smoke tests (pnpm smoke --csp). The dev server sends the same policy
  with each HTML page, and the harness fails a test on a policy violation.
- Decode data URLs without fetch in the background frame test.

Capabilities:
- Give browser windows their own capability. They load no installed plugin.
  Add a unit test and a browser window smoke test for the command set.

Document the scans, the hash cache, the policy, and the window capabilities.
2026-10-28 02:01:50 -07:00
Knotty Wyvern 5e1533c371 Make Table Formulas a built-in feature
The formula engine, the rendered results, and the formula help now
come from src/lib/formulas/. The editor and the renderer call this
module directly. The tableFormulas contribution type is removed.

- Add the tableFormulas general setting (default on) and a switch in
  Settings > General. When it is off, formulas show as source text.
- Do not load an installed runestone.table-formulas package. Settings
  > Plug-ins marks it as included with RuneStone and tells the user
  that it can be removed. The user's files stay in place.
- Translate the formula help and the error descriptions into French,
  Japanese, and Simplified Chinese.
- Port the plugin unit tests. Test the setting and use a test-only
  contribution for the generic plugin lifecycle tests.
- Smoke tests load only Terminal. The formula and lifecycle tests use
  the built-in feature and its setting.
- Remove scripts/buildPlugins.mjs, the build:plugins script, and the
  plugin-packages requirement of the smoke runner.
- Remove RuneStone_Table_Formulas from the menu audit scope. It had no
  menu surfaces.
- Update the README, the user guides, and the developer references.
2026-10-28 01:05:43 -07:00
Knotty Wyvern 70510a114f Give the front end its version through the build environment
vite.config.js reads RUNESTONE_VERSION and falls back to package.json.
The installer build sets RUNESTONE_VERSION and writes all four version
files only after the installer exists. Before, it wrote package.json
before the build and restored it after a failure.

The installation guide and CLAUDE.md now say that setup replaces the
installed app in place. The installer no longer shows a maintenance page.
2026-10-27 22:59:22 -07:00
Knotty Wyvern 7914942698 Use the stock Tauri NSIS template with RuneStone installer hooks
Remove the 996-line fork of the Tauri 2.11.4 template and the custom
comparator. src-tauri/windows/hooks.nsh now adds the RuneStone behavior
through bundle.windows.nsis.installerHooks:

- RuneStoneGuiInit (MUI_CUSTOMFUNCTION_GUIINIT) runs before the first
  page in interactive and passive setup. It stops a downgrade with exit
  code 2. It makes the stock maintenance page skip itself, so that setup
  never starts the uninstaller for an upgrade or a reinstall.
- The hidden section RuneStoneVersionCheck runs before the Tauri sections
  in all modes. Silent setup shows no pages, so it needs this check.
- NSIS_HOOK_POSTINSTALL writes the release version to DisplayVersion and
  RuneStoneReleaseVersion, and the Windows version to
  RuneStoneWindowsVersion. Installed apps now show 0.1.23a, not 0.1.23+1.

Setup compares the four-number Windows encoding with ${VersionCompare}.
An unknown installed version stops setup.

buildInstaller.mjs gives the toolchain version to Tauri through a
--config override. It writes tauri.conf.json, Cargo.toml, and Cargo.lock
only after the installer is complete. package.json changes during the
build because the Settings dialog imports its version. A failed build
restores it. Add --dry-run, which prints the plan and changes no file.

The tests compile NSIS programs with the real makensis. They simulate the
installed version in a test-only HKCU key and check /S, /P, /UPDATE, and
interactive setup. A drift check reads the template from the installed
Tauri CLI. The first real installer needs the installer checks in
docs/builds.md.
2026-10-27 22:54:00 -07:00
Knotty Wyvern e217eb31d2 Start the smoke test server on the port in SMOKE_URL
Two checkouts can then run their smoke tests at the same time.
2026-10-27 22:42:39 -07:00
Knotty Wyvern 69f90df571 Move the smoke tests onto the shared harness
Each smoke test now uses tests/smoke/_harness/ for Playwright, the Tauri
IPC mock, the in-memory workspace, and output folders, instead of its
own copy. The tests keep their interactions and assertions. Mock
handlers that the app never calls are gone.

- Split the four mixed regression scripts into 18 feature tests.
- Update tests that broke when the app changed on purpose. Each update
  cites the app source that shows the new behavior.
- Mark two real app defects with @known-issue: the settings window
  controls are 1px shorter than the main window controls, and plugin
  tabs cannot be reordered by dragging without a workspace.
- Merge three palette unit tests into one table-driven test.
- The native tests load Playwright through the harness and read
  NATIVE_CDP_URL, with their old variable names as fallbacks.
- A failed smoke test saves a screenshot and prints the console errors.
- The runner runs failed tests once more, alone, and reports a test
  that then passes as flaky.

Result: 89 passed, 1 flaky, 2 known issues, 0 failed. Before, 45 of 78
passed.
2026-10-27 20:58:55 -07:00
Knotty Wyvern c66ea1ce83 Add a smoke test runner, a shared harness, and safer build scripts
- pnpm smoke runs tests/smoke/ in parallel. It starts Vite when nothing
  serves SMOKE_URL, finds an installed Chrome when Playwright has no
  Chromium, and skips a test with a reason when a requirement that the
  test declares with "// @requires" is missing. Logs go to
  output/smoke/logs/.
- tests/smoke/_harness/ holds the Playwright launch, page error
  collection, the Tauri IPC mock with an in-memory workspace, and output
  folders. tabs/order uses it as the first converted test.
- Pin Playwright 1.63.0, the version that browser-runtime uses.
- RUNESTONE_PLUGIN_REPOS names the folder of the sibling plugin
  checkouts for buildPlugins, the menu audit, and the smoke tests.
- buildInstaller restores the version fields after Ctrl+C, keeps the
  backups of each attempt, stops when the browser runtime is not staged,
  and writes the file name instead of absolute paths to host.json.
- buildPlugins clears the staged Table Formulas package before copying.
- plugins/choiceMenus used the wrong Local Autocomplete folder name.
2026-10-27 19:55:49 -07:00
Knotty Wyvern e433bed28e Move the tests from scripts/ to tests/ by feature
Unit tests go to tests/unit/<area>/, browser smoke tests to
tests/smoke/<area>/, and tests against a running desktop app to
tests/native/. Files named after dates, work passes, or Kanban cards get
feature names, for example editorOctober12 -> editor/footnotes.

scripts/ keeps the build, release, and package tools. Plugin repositories
import scripts/packagePlugin.mjs, and the Terminal smoke test imports
scripts/pluginMocks.mjs, which now re-exports the harness copy.

The unit tests get their own type check (tests/tsconfig.json) with Node
types. pnpm check runs it after the app check. Add @types/node and fix
the three test mocks that it reported.
2026-10-27 19:47:39 -07:00
Knotty Wyvern 90d1940c73 Make the checks pass on a fresh clone
- build.rs creates the empty browser-engine folder that tauri-build
  requires, so cargo test runs before the browser runtime is staged.
- The Table Formulas tests skip with a reason when the package is not
  built. Before, the missing module failed two whole test files.
- The installer test accepts CRLF checkouts and skips with a reason
  when the NSIS compiler is missing.
- hostTodo.spec.mjs never ran because of its extension. Its two valid
  background tests move to appearance.spec.ts with current defaults.
  The third test repeated an existing export test.
- Remove tsconfig.plugins.json. It checked the plugins/ folder, which
  moved to separate repositories in 0.1.7.
2026-10-27 19:41:08 -07:00
Knotty Wyvern 562ef87d24 Add workspace links, restore tabs, and update project guides 2026-10-21 21:05:48 -07:00
Knotty Wyvern f741389418 Close secondary workspace windows after the last tab 2026-10-21 15:06:55 -07:00
Knotty Wyvern 42dd0fa711 Improve editor, plugin updates, and window transfers for 0.1.41 2026-10-21 10:42:44 -07:00
Knotty Wyvern 68e86ab6eb Add interface languages and improve themes and workspace controls for 0.1.36 2026-10-15 10:55:59 -07:00
Knotty Wyvern edef2520af Update editor, themes, menus, backgrounds, and release tooling 2026-10-14 16:19:51 -07:00
Knotty Wyvern f6eaa52949 Update the browser, editor, settings, and installer 2026-10-12 14:46:21 -07:00
Knotty Wyvern 909894b9c8 Update editor, workspace, Git services, appearance, and project guides 2026-10-11 09:41:16 -07:00
Knotty Wyvern a8b1defb9d Add completion, browser integration, and workspace improvements 2026-10-07 11:25:17 -07:00
Knotty Wyvern 5d0a4a24f9 Release RuneStone 0.1.7 with plugin documents and shared menus 2026-10-06 09:29:09 -07:00
Knotty Wyvern 6b7af0d527 Release RuneStone 0.1.4 with installable plugins and settings 2026-10-04 15:05:51 -07:00
Knotty Wyvern 0268c5c9f0 Release RuneStone 0.1.3 and expand plugin plans 2026-10-03 04:23:45 -07:00
Knotty Wyvern 43106ed9c7 Improve workspace navigation, search, and tab actions 2026-09-29 07:48:24 -07:00
Knotty Wyvern bdc15e952d Initial RuneStone project 2026-09-26 01:25:42 -07:00