SilverBullet 2.8 released

SilverBullet 2.8 is here. The headliners this release are X-Ray, a new editor lens that lets you inspect indexed objects inline as you write (just run Editor: Toggle X-Ray), and a brand new built-in Journal library for journaling workflows. As usual, there's also a healthy pile of fixes as well.

Changes

  • X-Ray: an editor lens (run Editor: Toggle X-Ray) to inspect indexed objects inline.
  • New built-in Journal library.
  • Runtime API: Expose objects (with filter) /.runtime/objects/* for external integrations and the CLI, see Runtime API.
  • New SB_DISABLE_SERVICE_WORKER : server-side switch to disable the client service worker for all clients, this will disable sync (all loads and saves will go directly to the server) and disable any offline support.
  • UX: now showing spinners instead of underlying (Lua) code in states where widgets aren't ready to render yet (e.g. before an initial index hasn't completed)
  • Fix: indexed range for data blocks (and #tag data blocks) now points at the YAML content instead of the surrounding fence markers; multi-document blocks now compute per-doc ranges correctly.
  • sb CLI changed how it encrypts secrets, so if you used token or password-based auth you need to re-add your space.
  • Fix: indexed range for space-lua and space-style blocks now points at the inner code, not the ``` fences.
  • Fix: Page Templates are now fixed (required specifying of suggestedName before), now also supports objects as frontmatter
  • Removed: tapping the top bar (page name / action buttons area) no longer scrolls the editor to the top.
  • Fix: page decoration prefixes now consistently appear in query-driven lists
  • Fix: Safari/WebKit no longer renders block lua widget (queries, etc.) borders at the wrong position on first paint (previously required hovering or resizing the window to clean up).
  • Fix: page navigation should now glitch less.
  • Fix: browser back/forward now restores the scroll position you last had on each page.

Upgrading

  • For docker-based install, pull the new image, stop the container and start a new one. For binary-based installs run silverbullet --upgrade and restart.
  • After upgrading the server, make sure you reload all your SilverBullet tabs a few times, just to make sure the cache is flushed.

SilverBullet+

This release also coincides with the first "stable" release of SilverBullet+, which will follow the same release schedule. Official announcement next.

thanks, il's time to migrate my custom journal to the official :sweat_smile:

If you like, but no real reason. You can also disabled what’s included and keep using your own. It’s intended mostly to give some guidance/inspiration for new users.

According to the docs the new Journal feature automatically adds a #journal tag that is used for navigating journal entries. Would it be advantageous to go add that to my pre ious journal pages? How would I do that as a bulk operation? (I’m assuming space lua but I’m unfamiliar with it.)

Yes, it uses the tag for navigation (next day, previous days) command. Automatically adding this... I'd have to think, you could probably do this with some clever sed command.

I used sd, and I already have the #journal tags, but it's the same basic idea:

cd Journal
for f in 2*.md; do
  sd -A -- '^#journal' "---\ntags: journal\ndate: ${f%.md}\n---" $f
done

For no existing tag or front-matter, this would probably work:

cd Journal
for f in 2*.md; do
  sd -A -- '^' "---\ntags: journal\ndate: ${f%.md}\n---\n" $f
done

After upgrading to version 2.8, I'm experiencing weird "cursor behavior" on pages with a lot of query blocks (on Firefox). When using the down key, the cursor will jump to the end of the next query block and when I click with the mouse the cursor does not always jump to that position.

I've had to delete all browser data already two times because SB became completely unstable after a while.

Anyone else experiencing weird behaviour? Are these some changes that may be causing this?

Yes, this is a known issue, fixes should already be in the edge builds right now. I'll release it as a patch release a bit later.

2.8.1

SilverBullet.md

  • Fix: cursor and clicks no longer drift by a line or two when working below a tall widget (e.g. arrow-up from a list under a ${query[[…]]} now advances exactly one line). Some other cursor preservation issues addressed as well.
  • Fix: arrow keys now reliably enter multi-line block widgets (queries, tables) line by line.
  • Fix: Some finetuning of the markdown renderer.
  • Fix: PWA boot no longer crashes silently when the server is unreachable and a boot-time file (e.g. CONFIG.md) was previously 404 — the 404 result is now cached so subsequent offline boots succeed instead of throwing a raw TypeError: Failed to fetch that the boot code swallowed.
  • New index.* query-collection helpers: index.objects (the new alias for index.tag), plus index.pages, index.subPages, index.contentPages, index.metaPages, index.aspiringPages, index.tasks, index.headers, index.items, index.paragraphs, index.tables, index.documents, index.links, and index.tags. Each type-specific helper takes an optional extra tag for filtering (except index.subPages, which takes the parent page name, and index.documents/index.links/index.tags, which take no arguments).

SilverBullet+

  • Fix (Flatpak): shipped meta pages (e.g. Library/Std/Journal/Journal) no longer loop with "Page changed elsewhere, reloading" messages
  • Fix: Custom URL-scheme links (e.g. message:, mailto:, zotero:, things:, obsidian:, vscode:) now open via the OS's registered handler when clicked from inside the editor, instead of being silently dropped by the webview.
  • Running sb somefile.md now opens it in a "single file space", also should work with double clicking a .md file in the explorer/finder (on most OSes)
  • Fix: dashboard-configured Space Ignore patterns are now actually honored by the local file backend. A .gitignore file at the space root is also automatically applied on top of the configured patterns.
  • On startup, the window that was active at last quit is now brought to the foreground after all windows are restored.

Thanks for this nice update! The Journal function is great and a unique selling point for me.
A new Sponsor is born :blush:

Thank you -- that click/up-down error was driving me crazy!

Thank you Zef (and all contributors) for this release.

I noticed some lagging (on chome/firefox/pc/phone/tablet) when pressing some of my buttons that update my data objects.

I'm not sure if started from 2.7, but I reverted to that version and I faced the same issue (reloading everything and even wiping and reinstalling the app).

After some debugging I disabled my custom top hook and now my space is working a bit better. Not quite sure if is because my code, the size of my space (is not big 1600pages and 150 docs.

Now the quick question: How do you recommend to debug my issue?. I tried with the chome dev console (logs, network and lighthouse). I'm interested on identify my space-lua bottlenecks and loading times.

Thank you.