Commit Graph
30 Commits
Author SHA1 Message Date
Knotty Wyvern 9fc1490988 Make menus and hover fills translucent over a background image
With a background image, menus use the surface transparency of Appearance
(82% by default) instead of at least 92%, and they keep the blur.
Hovered rows and controls in the work area, hovered menu rows, and the
workspace button use the new --rs-hover-bg token. With an image, it is a
6% veil of the strong text color. The image stays visible, and the hover
shows over light and dark image areas. Without an image, nothing changes.

Silver Serpent dim text is now #c2c6cc. It keeps 4.5:1 contrast on a
hovered row over a white image.

UI-061 replaces the image rule of UI-043. Card 05b9bfa1.
2026-10-30 13:38:47 -07:00
Knotty Wyvern e66f089176 Make Project Management a native feature
- Move the storage and model of the plugin into src/lib/features/pm/ as pure TypeScript, so the skill can still bundle them.
- Move the DOM interface onto the host menus, the shared tooltip, and the host icons.
- A ribbon button opens Project Management. Board tabs keep the owner runestone.pm and the board-<hex> view IDs through view patterns.
- Read only .runestone/pm/. Offer the plugin migration, with backups, for legacy notes.
- A save, move, or delete reads only that card again. Watcher paths reach the feature.
- Add Settings → Project Management and the projectManagement section. View states move to localStorage.
- Background reads the boards from workspace.json. Remove api.backgrounds and the boards service.
- Add yaml 2.9.1. Use the host markdown-it.
- Move 18 plugin test files to tests/unit/features/pm/ and add native tests.
2026-10-29 20:54:29 -07:00
Knotty Wyvern e6deecc092 Make PDF Viewer a native feature
- Move the PDF Viewer plugin into src/lib/features/pdf/ with pdfjs-dist 6.4.299 (minified builds).
- A static pdf document type marks PDF files and opens them as tabs. The first PDF tab loads the module.
- The worker, the character maps, the fonts, and the decoders come from the app. One worker for each tab.
- The toolbar uses IconButton and the shared tooltip, with the new zoom-in, zoom-out, fit-width, and rotate icons.
- Add THIRD_PARTY_NOTICES.md for PDF.js and xterm.
- Update the tests, the menu inventory, the docs, and UI-059.
2026-10-29 19:41:17 -07:00
Knotty Wyvern 833f793244 Make Terminal a native feature
- Move the Terminal plugin into src/lib/features/terminal/ on the host Svelte runtime, with xterm 6.0.0 and addon-fit 0.11.0.
- Buttons, shortcuts, Help rows, and the close guard follow the Terminal switch. The first use loads the module.
- Add Settings → Terminal and the terminal settings section. The first start copies the old runestone.terminal key.
- The 16 ANSI colors come from the --rs-ansi-* tokens.
- Off asks first when a shell runs in any window (pty_running).
- Rust: no pty-data or pty-exit events, an owner check for write, resize, and close, output joined up to 64 KiB or 8 ms, and the sessions of a reloaded page close.
- Remove api.pty, the terminal contribution, TerminalSlot, and the plugin loader of the smoke harness.
- Check only the tested switches in the Background smoke test.
- Update the tests, the menu inventory, the docs, and UI-058.
2026-10-29 19:02:58 -07:00
Knotty Wyvern ab868bbe8e Make Background a native feature
- Background replaces the Background Slideshow plugin and the background image of Appearance. It shows a folder as a slideshow, or one image.
- It is on by default. Its module loads at launch only when a folder or an image is chosen.
- Rust keeps the one folder in background-folder.json. The interface never sends a path. Eight background_* commands replace the six deprecated backgrounds_* commands.
- The first start moves the slideshow folder and settings, and keeps the saved image as the image source.
- One blur worker with a cache, fewer folder reads, and a decode before each fade. The hub writes only the changed properties.
- Remove the deprecated folder methods of api.backgrounds. set, get, and subscribe stay for the Project Management plugin.
- Show the view buttons in the workbench test without text, after UI-056.
- Update the tests, the measurement tool, the docs, and UI-057.
2026-10-29 17:25:17 -07:00
Knotty Wyvern 4e5c3cb165 Add the memory and response measurement of native features
- scripts/measureFeatures.mjs starts a test build with remote debugging, runs each scenario 3 times, and writes the medians to output/phase-7/<stage>/.
- It records the private bytes and the working set of the process tree, the JS heap, the start time, the first-need time, and long tasks.
- It refuses the installed RuneStone and its identifier, and it stops only the process tree that it started.
- Plugin mode installs the plugin ZIPs through a local Gitea-format server. Native mode uses the features settings section.
2026-10-29 15:52:19 -07:00
Knotty Wyvern d3218b2501 Make Git a native feature with an off switch
- Add the native feature runtime in src/lib/features/: the catalog, the switches, the first-start migration, the loader, and the feature sessions.
- Add Settings → Features and the features settings section.
- Add features_legacy. It reads the old plugin packages and changes nothing.
- Move Git from the plugin into src/lib/features/git/, on host internals.
- Remove api.git, the git contribution key, and the SDK Git types.
- Add pnpm check:features. It fails when a feature module loads at start.
- Update the tests, the menu inventory, the docs, and UI-055.
2026-10-29 15:51:21 -07:00
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 48b8249ba6 Remove the special cases for the old Browser package
A browser request now needs the session token of its window. Disabling
an old runestone.browser package no longer stops the engine. One list of
built-in modules starts the browser and the theme editor, and the plugin
menus skip their tools. The access rules no longer treat the browser ID
in a special way.
2026-10-29 00:48:37 -07:00
Knotty Wyvern eeddd880e1 Ask Save or Don't save, and show useful status facts
Phase 5-7.

- A changed tab asks Save, Don't save, or Cancel through the native
  dialog, instead of OK and Cancel to discard.
- The conflict banner uses --rs-warn with a warning icon. Keep my
  edits is the primary choice and comes first. Use disk version comes
  last, in the error color. The banner wraps in a narrow pane.
- The status bar shows the save state, the line and column, the word
  count, the line endings, and the view. It shows the watch mode only
  when it polls a network folder.
- The outline and the document facts follow the active tab. A tab
  without a document has no outline and no document facts.
- Tables: only formula cells have a hover hint, so no hint covers the
  next cell. The table adds no gap above its control area. The add
  controls show while a cell has focus.
- The plugin review marks Install and enable as the primary action. The
  other choice is Install, keep disabled.
- Read follows CommonMark soft breaks. Settings, General, Keep line
  breaks shows each source line break. The table preview and cell
  editors of Write keep their line breaks, because their editing
  depends on them.
- Catalog rows in French, Japanese, and Simplified Chinese.
- Docs: UI-053, the user guide, and plugins.md.

Tests: the new layout/plainFixes, the keepLineBreaks cases in the
settings unit tests, and the new install button name.
2026-10-28 22:06:13 -07:00
Knotty Wyvern 9cf82503d0 Show one view control and name the file once
Phase 5-3.

- One radio group shows Write, Source, and Read at all times, with an
  icon and a name. Narrow panes show only the icons. The arrow keys
  move the choice, and the group has one Tab stop. The current choice
  gets the selection fill and an accent bar. Hover gets only a fill.
- A Split toggle shows Read beside Write or Source. Each document pane
  keeps a split flag beside its reading flag. Read ends Split.
- Ctrl+Shift+E switches between Read and the editor. Ctrl+E still
  switches between Write and Source.
- "IDE" becomes "Source" in the Chrome type, the tab menu (a View
  submenu), the status bar, the catalog, the tests, and the docs.
- Settings, General, File name title hides the title in Write and
  Read. It is on by default.
- The breadcrumb shows only the folder of the file. The status bar
  shows the view, not the path.
- ModeSwitcher.svelte and its hover test are gone. The new test
  layout/viewModes covers the control.
- The command palette from 5-2 gets its row in docs/menu-surfaces.json.
- The user guide Format table is whole again. The 5-2 edit had put
  the Paragraph and Insert rows under the shortcut table.
- 8 new catalog rows and 10 removed rows, in French, Japanese, and
  Simplified Chinese.
- Docs: UI-049, the user guide, ui-design.md, document-tools.md,
  development.md, and the README feature list.

Tests: the new layout/viewModes, new cases in documentPanes.spec.ts
and settings.spec.ts, and the chooseView harness helper. 21 smoke
tests use the new control. Tests that read the full path from the
breadcrumb now read its tooltip.
2026-10-28 19:45:08 -07:00
Knotty Wyvern ebacdb8164 Add the command palette, Write formatting keys, and platform labels
Phase 5-2.

- Ctrl+Shift+P opens the command palette: every workbench command with
  its shortcut, then the plugin commands (UI-048).
- In Write, Ctrl+B, Ctrl+I, Ctrl+Shift+X, and Ctrl+Shift+H format the
  selection, and Ctrl+K inserts a Markdown link. The Format menu shows
  these shortcuts.
- Ctrl+\ toggles the side pane. It matches the physical key on every
  keyboard layout. Ctrl+B now belongs to Write.
- Help lists every shortcut in groups, open by default. The list comes
  from the command table.
- src/lib/ui/shortcuts.ts writes shortcut labels for the platform:
  Ctrl+Shift+P on Windows and Linux, and the macOS symbols on a Mac.
  The catalog uses placeholders, so no translation contains "Ctrl".
- 19 new catalog rows, and 10 rows converted to placeholders, in
  French, Japanese, and Simplified Chinese.
- Docs: UI-048, the user guide keyboard tables, and a label rule in
  ui-design.md.

New tests: layout/commands, tests/unit/ui/shortcuts.spec.ts, and new
cases in workbenchKeys.spec.ts. Tests that read the old labels or
pressed Ctrl+B for the side pane now use the new names and Ctrl+\.

The smoke harness raises the resource timing buffer to 5000 entries.
The new modules pushed the CodeMirror language module past the
default 250 entries, so editor/markdownPaste could not find its URL.
2026-10-28 19:10:25 -07:00
Knotty Wyvern 5483881bc2 Add the theme editor tab and theme preview cards
Phase 5a-5.

- Settings → Appearance shows a preview card for each theme. The cards
  are one radio group. The arrow keys move and select, and the current
  card has the selection outline and a check mark (UI-047).
- Edit theme opens the theme editor as a workbench tab in the window
  that opened Settings. The window shows each change at once.
- The editor shows all 51 color roles in seven groups. Each role has a
  color picker, a hex field, its lowest readability result, and a reset
  button. A failure shows a warning icon and its ratio, or "Too close".
- Save writes a short schema 3 theme with the built-in theme as its
  base. A built-in theme does not change. Discard returns to the saved
  colors, and Duplicate saves a copy.
- The editor is a built-in package, like the browser, so it uses the
  editor tab code of plugins.
- 23 new catalog rows with French, Japanese, and Simplified Chinese.
- The smoke harness sends emit to every page and emit_to to the pages
  with the target window label.
- Docs: UI-047, ui-design.md, and "Edit a theme" in guides/themes.md.

New tests: appearance/themeEditor and tests/unit/theme/themeEditor.spec.ts.
Six smoke tests use the cards instead of the theme menu.
2026-10-28 18:13:57 -07:00
Knotty Wyvern 35f39e93f3 Redesign the character palettes from the reference cards
Phase 5a-4. The owner chose candidate B of each palette.

- Harvest Moon uses copper from Holo's tail as the accent, cream from
  the tail tip, and red-brown surfaces.
- Crimson Pilot uses plugsuit red as the accent, orange hair, blue eyes,
  and the yellow dress. Borders are a low-chroma wine. Error is a light
  rose red, so it differs from the accent.
- Silver Serpent uses silver from the grey eyes as the accent, Slytherin
  emerald as the second accent, and charcoal surfaces.
- All eight built-in palettes pass every readability rule. The
  known-failure list in contrast.spec.ts is gone.
- characterPalettes.spec.ts measures text selection as the app draws
  it, at most 65% opaque over the page (UI-029).
- Docs: UI-045, and the character references in ui-color.md.

pnpm check passes. pnpm test: 446 of 446 pass. Full smoke suite: 95
passed, 2 known.
2026-10-28 17:25:51 -07:00
Knotty Wyvern 445d0200b2 Make menus opaque and redesign the core palettes
Phase 5a-3. The owner chose candidate B of each palette.

- Menus are opaque (UI-043, replaces UI-013). With a background image,
  menus are at least 92% opaque and blur the image. Submenus show as
  manual popovers in the top layer, so the blur cannot clip them.
- In a light palette, the page is the lightest surface, and the side
  panes have a slight tint (UI-044).
- RuneStone uses neutral surfaces and the rune cyan of the app icon.
  Claude Dark uses the layout of the Claude app. Claude Light uses a
  white page with brand Light panes and a darker orange for text.
  Sakura uses Petal Veil for active rows.
- All five core palettes pass every readability rule. A text role keeps
  the hue of its source and changes only its lightness.
- The accent-text rule also checks accent-2, because inline code in
  Read uses it as text.
- The root token defaults match RuneStone Dark.

pnpm check passes. pnpm test: 447 pass, 5 todo, 0 fail. Full smoke
suite: 92 passed, 2 known. editor/markdownPaste and tables/formulas
failed one time and passed on retry. workspace/manageTemplates fails
about half of its runs, also on the previous commit: the tree menu
rebuilds when the template list reloads, and the open submenu closes.
2026-10-28 16:47:55 -07:00
Knotty Wyvern 5bd616d7fd Give themes named color roles, theme data files, and file format 3
Phase 5a-1 and 5a-2.

- roles.ts names 51 color roles. One derivation rule fills the roles
  that a theme does not give, for all themes. tokens.css keeps only the
  root defaults, without theme blocks.
- Each built-in theme is one data file in src/lib/theme/themes/. No code
  outside the theme data names a theme ID. characterThemes.ts is gone.
- New roles: link, focus, on-accent, highlight, scrim, the syntax roles,
  and 16 terminal (ANSI) roles. Stray colors in components use the roles.
- contrast.ts checks each theme against the readability rules of
  docs/ui-color.md. The tests mark the known palette failures as todo,
  and a second test fails when a known failure starts to pass.
- Theme files use schema 3 with a mode and an optional built-in base.
  A short file gets the missing colors and fonts from the base. Schema 1
  and 2 files still import. Old syntax names convert on import.
- Docs: ui-color.md, plugin-development.md (theme tokens), ui-design.md,
  guides/themes.md, and UI-041 and UI-042 in design-decisions.md.

The applied colors stay the same for every built-in theme, except three
small changes: the conflict line uses the warn color, the Write
highlight uses the highlight role, and two dialog backdrops use the
scrim role.

pnpm check passes. pnpm test: 447 pass, 31 todo, 0 fail. Full smoke
suite: 93 passed, 2 known. appearance/palettes read the old syntax
names and passed 3 of 3 times after the fix. workspace/manageTemplates
failed one time and passed on retry.
2026-10-28 15:50:45 -07:00
Knotty Wyvern 3e6bc5f088 Move global CSS beside its code and make Documents reactive
Phase 4e.

- app.css holds only imports. Its rules moved into files beside their
  code, in the original cascade order. Dead rules of the deleted TipTap
  Writer are gone.
- workbenchKeys.ts is one table of the workbench shortcuts. Workbench
  runs the commands.
- session.linkTargets is the one link resolution for the link menu and
  for link opening.
- Documents is a rune module (documents.svelte.ts). Workbench reads the
  tabs and the active path from it, without a copy of all buffers on
  each change. The editor mount effect now copies the buffer inside
  untrack, so an edit does not remount the editor.
- Unit tests can import .svelte.ts modules through a Node module hook
  that compiles them with the Svelte compiler.

pnpm check, pnpm test (350 of 350), and the full smoke suite pass,
except tables/linkCaret, which failed one time under load and passed
on retry and 3 of 3 times alone.
2026-10-28 11:50:33 -07:00
Knotty Wyvern f32f60b540 Add a workspace session for marks, renames, the index, and events
Phase 4d. session.svelte.ts holds the workspace state of each window:
the marks, the note index, renames, and typed change events. It
replaces refreshToken.

- One rename path: session.rename serves the tree, the note title, the
  rename command, the link menu, plugins, and the template manager.
  Open documents, plugin views, the index, and the marks follow it.
  A title rename, the rename command, and a plugin rename now also
  move pins and bookmarks.
- marksStore.svelte.ts is the only writer of .runestone/marks.json.
  Changes run in order from the latest marks. A change from another
  window reloads the marks.
- The note index updates only the paths that change, does not rescan
  on window focus, reads in batches of 64, and keeps links, not text.
- Plugins also hear about .runestone/ changes from other windows.
- The outline uses the heading parser of heading links and Read, so
  lines in code blocks are no longer headings.
- New note is above New file in the tree menu (card a6032af5).
- New workspace/session smoke test and new unit tests for the index
  and the outline.

pnpm check, pnpm test (347 of 347), and the full smoke suite pass,
except workspace/manageTemplates, which failed one time under load and
passed on retry and 4 of 4 times alone.
2026-10-28 11:28:54 -07:00
Knotty Wyvern 724402729e Replace Monaco with one CodeMirror editor and nest list items with Tab
Phase 4b. DocumentEditor.svelte replaces LiveWriter.svelte and the Monaco
EditorHost.svelte. Each open document has one CodeMirror state. Write and
Source are two compartment configurations of it, so they share the undo
history. editorStates.ts keeps the state while the tab stays open. The
Monaco model, the diff bridge, its timers, and sessions.ts are gone.

- Source: syntax colors from the theme tokens, lazy language packages,
  line numbers, folding, and the current line in IDE, wrapped lines in
  Writing, several carets, and bracket matching and closing.
- Lists (card 088e778b): Tab nests a list item and Shift+Tab moves it
  up, in Write and Source. Both renumber the list. The source keeps
  "1.". Write and Read show numbers, letters, then Roman numerals.
- Indent (card 696c30ce): a fixed 4 spaces in Write and Source.
- The code menu uses CodeMirror commands. The command palette item and
  the Monaco styles, search, theme, and workers are removed.
- @codemirror/legacy-modes is pinned to 6.5.4. Version 6.5.5 uses
  parser types that do not match @codemirror/language 6.12.
- 26 smoke tests use CodeMirror instead of Monaco. New tests:
  editor/listNesting and the markdownLists unit tests.
- Docs: development, UI design, plugin host, user guide, and UI-040.

pnpm check, pnpm test (341 of 341), and pnpm build pass. The full smoke
suite passes, except one template test that passed on retry.
2026-10-28 10:48:44 -07:00
Knotty Wyvern 80f5d908e0 Fix the table cell arrow race and remove the TipTap Writer
Phase 4a. The ProseMirror focus handler starts a 20 ms timer that writes
the ProseMirror selection back to the DOM. Under load, the timer ran
after a native arrow move and before ProseMirror read the
selectionchange event, so one move was lost. The cell editor now moves
the DOM selection with Selection.modify and reads the result in the
same key event. This covers plain and Shift arrows and word moves.
Other shortcuts stay with the browser.

- Workbench.svelte no longer filters access events. Rust already drops
  them.
- Delete the unused TipTap Writer: WriterHost.svelte, writerMenu.ts,
  writerMarks.ts, headingMarks.ts, and their two unit tests.
- Remove the 8 TipTap packages that only the Writer used, and its entry
  in docs/menu-surfaces.json.

With a 4x CPU slowdown, 11 of 60 runs failed before the fix and 0 of
120 after it. pnpm check, pnpm test, and the smoke suite pass.
2026-10-28 09:39:08 -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 a6d6e96d6d Give plugins SDK APIs for terminals, granted folders, and plugin services
Plugins can now do through the SDK what they did with direct native calls.
The SDK checks plugin shutdown, so these APIs can move to an isolated
plugin context later.

- api.pty opens shell sessions. pty_open accepts an optional channel.
  A channel session sends its output as raw bytes to its own webview
  and sends no pty-data or pty-exit events. Without a channel, the
  events stay, so the released Terminal plugin keeps working. The host
  closes the open sessions of a plugin when the plugin stops.
- api.files gives folder grants. The user selects the folder, the
  host keeps the grants of each plugin in its retained data, and the
  plugin uses an opaque grant ID. The host rejects names with folder
  parts, links, and files over the size limit. Sidecar JSON files
  replace the per-image settings commands.
- api.services lets one plugin offer data to another plugin in the
  same window. The host copies arguments and results.
- The folder methods of api.backgrounds are deprecated. They stay for
  released Background Slideshow versions.
- The plugin reference lists the native calls of each plugin and the
  SDK member that replaces each call.
2026-10-28 01:46:55 -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 5d5ba9e1f7 Keep preferences in one settings file and move tab transfer to the host
Keep the user preferences in settings.json in the app config folder.
WebView storage can be lost, and the host cannot read it. The file has
a schema number, a revision number, and one value for each section:
general, appearance, customThemes, customThemesLegacy, and language.
- settings_read gives all sections, the revision, and a one-time
  notice.
- settings_write replaces one section, writes the file atomically, and
  sends settings-changed to all windows. The limit is 8 MiB.
- settings_migrate writes the first file only when no file exists.
- The host moves a damaged file to settings.corrupt-<seconds>.json,
  starts from the defaults, and reports this one time.

Each window loads the sections before its first render. One store in
src/lib/settings/store.ts replaces the storage listeners. When no file
exists, the window normalizes the old localStorage values and migrates
them. The old keys stay in place for one release. The window layout
and the open tabs stay in localStorage on purpose. The browser preview
keeps all preferences in localStorage.

Keep tab transfer offers in host memory, not in localStorage, because
an offer can hold unsaved text. A window takes an offer once. The host
checks the workspace root and a 120 second expiry. When the receiver
accepts the tab, the host sends tab-transfer-accepted to the source
window only. A refused offer stays open, and the source tab stays open.
A new window and a drop on the tab ribbon use one check.

The smoke harness serves the new commands from one shared state for
each browser context. Tests read saved values from the mock settings
file. Rust, unit, and smoke tests cover the changes.
2026-10-27 23:56:00 -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 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 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