Commit Graph
3153 Commits
Author SHA1 Message Date
Zef Hemel a446014e2c Fix: accidentally pulled in a huge amount of codemirror code by not using the parseMarkdown syscall in outline ops, whoopsies
Reduces the editor plug bundle size by about 600K
2026-04-21 16:52:50 +02:00
Zef Hemel a34c2d3ac9 Plugs: per-path load/unload syscalls
Track the source path on each Plug and rename the sandbox-factory "cacheKey" to "path" to reflect what it actually is. Fold the one-liner web_worker_sandbox helper into a WorkerSandbox.forPath factory and add system.loadPlug / system.unloadPlug syscalls so individual plugs can be (re)loaded by path — foundation for the upcoming configuration-manager libraries UI.
2026-04-21 16:51:33 +02:00
Zef Hemel e226bfd685 Client: add editor.focus syscall 2026-04-21 16:50:34 +02:00
Zef Hemel 15b1f37734 Potentially breaking CSS change for the themers: .sb-notifications is now elsewhere in the DOM
Goal: make it always appear above even modal windows
2026-04-21 16:29:38 +02:00
Zef Hemel 795c248a0c Set some sensible default (fallback) config options when defaults are not yet available (initial index) 2026-04-21 13:06:36 +02:00
Zef Hemel f1394f3bc0 Expose content type also via X-Content-Type header 2026-04-21 10:30:11 +02:00
Zef Hemel 42bbcf5f7c lint fixes 2026-04-21 10:16:05 +02:00
Zef Hemel 8d8bb46649 Expanded plug dev guide
Split the Plug Development page into a quick-start with more subtopics: Architecture (loading, sandboxing, execution), Reference (manifests, hooks, syscalls), and Distribution and Testing.

Swap the Excalidraw architecture embed for a Mermaid diagram, and update the website Dockerfile to ship the Mermaid plug instead of Excalidraw.
2026-04-21 10:11:24 +02:00
Zef Hemel 1a0cb49fd7 Server: stop seeding CONFIG.md in empty spaces
The configuration-manager plug now creates and owns the managed  CONFIG.md block on first save, so the server no longer needs to  inject a template. Client also gracefully handles the absense of CONFIG.
2026-04-21 10:09:28 +02:00
Zef Hemel 88c3f00b7d First iteration of the new: configuration-manager plug
Adds the `Configuration: Open` command (Ctrl/Cmd-,) (and `Configuration: Key Bindings` also) backed by a Preact UI compiled through the new plug build steps. Supports editing scalar, enum, password, and object fields against the registered JSON schemas, plus a shortcuts tab with a chord recorder that handles multi-stroke sequences and multiple alternate bindings per command.

Edits are written back into a managed `space-lua` block (created  from template/CONFIG.md on first save).
2026-04-21 10:08:27 +02:00
Zef Hemel d25e98b932 Std Library: wire schema defaults and UI categories
Registers UI categories and moves default values from `config.set` blocks into schema `default` fields, so the configuration manager can drive everything directly from the schema. Only `actionButtons`, whose entries hold function bodies, stays in `config.set`.

Also adds a schema for `github.*` settings so the integration shows  up in the configuration UI (later commit)
2026-04-21 10:06:52 +02:00
Zef Hemel 21ce019ede Editor: move built-in commands from plug to client
Cursor motions, selection, delete, undo/redo, completion, and the various navigator/palette openers are registered directly on the CommandHook from client code, eliminating the async plug round-trip that was racing Enter/Backspace handling in some cases (especially e2e tests).

CommandHook gains `registerCommand` and a shared `mergeCommand`  helper so built-ins, plug commands.
2026-04-21 10:05:38 +02:00
Zef Hemel dcc5f8992c Plug compiler: add "build" steps (esbuild/sass/copy)
Adds an optional `build:` section to plug manifests, running esbuild,  sass, or copy transforms before asset bundling. Enables plugs to ship bundled TSX/SCSS UIs (used by the upcoming configuration-manager plug).
2026-04-21 10:04:34 +02:00
Zef Hemel 0c9c07b3e6 Config: schema defaults, UI categories and annotations
`config.define` now propagates schema `default` values, so features like smart quotes no longer need their own fallback constants.

Adds `defineCategory` / `getCategories` for the upcoming configuration  manager UI.
2026-04-21 10:03:40 +02:00
Zef Hemel efd827b721 Implements #510
Extracts almost all codemirror keyboard shortcuts into proper SB
commands so they can be rebound

Bonus: renders prettier versions of keyboard shortcuts on Mac
2026-04-17 16:45:11 +02:00
Zef Hemel ea2ad9a732 Add actionButton.define "command" attribute
This automatically triggers a command bound to an actionButton, and
notably also shows the keyboard shortcut connected to it (if any)
2026-04-16 14:23:54 +02:00
Zef Hemel 1ec2574836 Fix: button text wrapping 2026-04-16 14:09:51 +02:00
Zef Hemel 338c78f806 Iterating on the CLI
* Renamed 'lua' to 'eval'
* Renamed 'luascript' to 'script'
* Added 'describe' to describe LIQ and lists tags that have defined
  schemas

Tests for all of this
2026-04-16 10:58:20 +02:00
Zef Hemel 31efb8351f Fix e2e tests (again) 2026-04-14 20:59:23 +02:00
Zef Hemel 61f2ace09e Fix e2e tests 2026-04-14 19:02:40 +02:00
Zef Hemel 6cb80f4ba3 SilverBullet+ links 2026-04-14 19:02:34 +02:00
Zef Hemel 1ae2bd4d9e Fix: regression aspiring pages not being deleted once page is created 2026-04-14 09:18:37 +02:00
Zef Hemel c5a61acda2 Revert "Revert unnecessary Webkit hacks"
This reverts commit f46196adcf.
2026-04-14 08:09:58 +02:00
Zef Hemel 0627e7cb49 Fixes #1931 and #1923 (hopefully)
The service worker's proxy fallback only matched the wrapped "Offline"
error from HttpSpacePrimitives, but raw fetch() throws browser-native
errors like
"Failed to fetch" (Chrome), "NetworkError..." (Firefox), or "Load
failed"
(Safari). This caused a hard 503 instead of falling through to serve
local
data. Additionally, the `fullSyncConfirmed` flag reset on every service
worker
restart, forcing unnecessary proxying even when synced data existed in
IndexedDB.

In this commit:
- Use `isNetworkError()` in proxy_router.ts to catch all browser network
  errors
  and fall through to local serving instead of returning 503
* Recover `fullSyncConfirmed` from persisted sync snapshot on SW
  restart, so
  previously synced spaces serve locally immediately
* Adds e2e tests trying to emulate this behavior and prevent regressions
2026-04-14 08:01:43 +02:00
Zef Hemel 628fbb3ed3 Fixes #1932 2026-04-14 07:57:26 +02:00
Zef Hemel f46196adcf Revert unnecessary Webkit hacks 2026-04-13 20:09:10 +02:00
Zef Hemel cf159dba06 Fix: too tall a mini editor in various pickers on Safari
Hacky, but... probably working with a safari bug here.
2026-04-13 18:04:44 +02:00
Zef Hemel 21de72c6b5 Fix: don't wait for index drain on navigation on initial index
Currently when an inintial index takes a long time, navigation will
basically be blocked until it's finished which isn't great. This
special-cases that scenario and doesn't block (at the cost of possibly
not showing up to date widgets on the target page).
2026-04-13 13:44:03 +02:00
Zef Hemel 35f267c4b6 Update CHANGELOG.md 2026-04-13 08:03:01 +02:00
Zef Hemel 453139780b Fix: initial sync handling 2026-04-13 07:59:16 +02:00
Zef Hemel 82868f7992 Fix: cannot rename pages that contain an external link 2026-04-13 07:58:57 +02:00
Zef Hemel b7d46faa76 Remove VOLUME from dockerfile
This gives a false sense of persistence, users need to explicitly mount
/space in all cases as is documented.
2026-04-12 10:52:43 +02:00
Zef Hemel a7ed4e074c Fix paste e2e tests for firefox 2026-04-12 10:51:20 +02:00
Zef Hemel c9f93dccde Fixes #1929 2026-04-12 10:33:44 +02:00
Zef Hemel f168ead370 tweak to rebuild 2026-04-11 15:08:55 +02:00
Zef Hemel 9f54b3a719 2.6.1 2026-04-11 14:33:26 +02:00
Zef Hemel 95438849e0 2.6.0 2026-04-11 14:30:22 +02:00
Zef Hemel 9bc1582533 Minor tweaks to new template index.md 2026-04-09 14:38:21 +02:00
Zef Hemel 64898923e1 Restore separate copy path for Lua widgets with cleaner markdown
Specifically for tables using (less rich) markdown syntax when possible
2026-04-09 14:38:10 +02:00
Zef Hemel 9a21b319a1 Updated dev instructions (make setup) in README 2026-04-08 20:12:11 +02:00
Zef Hemel ecf06497b6 Install all playwright browsers 2026-04-08 20:07:24 +02:00
Zef Hemel 92c3121756 Add Playwright e2e tests for all scenarios described in website/Guide/* 2026-04-08 20:05:08 +02:00
Zef Hemel cca2bc6392 Typo in Journaling.md 2026-04-08 20:04:27 +02:00
Zef Hemel b1df359b69 Run e2e tests on Firefox as well 2026-04-08 20:04:00 +02:00
Zef Hemel 2229a11160 Fix tag stripping for page templates 2026-04-08 20:03:46 +02:00
Zef Hemel d8832b5431 Chore: dep updates 2026-04-07 18:15:51 +02:00
Zef Hemel 1946df3cb5 Generate <br/> instead of <br> for line breaks 2026-04-07 18:15:43 +02:00
Zef Hemel fbaad6cffb Fix widget glitching
No longer cache widget HTML content just widget heights, either way the
widgets will briefly flash as the widget is recalculated and this saves
storage space and reduces issues in Webkit
2026-04-07 15:42:59 +02:00
Zef Hemel 97e84607e7 Minor layout regression fix 2026-04-07 15:42:59 +02:00
Zef Hemel f495fd0854 Tweak default index and CONFIG pages 2026-04-07 15:42:59 +02:00