Skip to content

Store saved views as records (obsidian.base, mdbase.view) - #176

Merged
callumalpass merged 3 commits into
mainfrom
feature/bases-as-records
Sep 29, 2026
Merged

callumalpass merged 3 commits into
mainfrom
feature/bases-as-records

Conversation

@callumalpass

@callumalpass callumalpass commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Saved views are stored as records claimed through contracts:

  • Provisions the published obsidian.base 1.0.0 and mdbase.view 1.0.0 packs (vendored byte for byte) and requires those contracts.
  • Requires and provisions md and base in settings.record_extensions. set_add on an absent list creates it with only the added value, so Markdown is kept explicitly.
  • View sources are read with read({includeDocument}), created with create, replaced whole with update({document}) (which keeps Obsidian's comments and layout), and removed with delete. views.manage is no longer requested.
  • A Base that is not a YAML mapping is rejected instead of being written as {}.
  • Uses mdbase connect beta117 (now in production), which accepts the record_extensions setup target. A connector that predates beta117 is asked to update before approving.

Checks: pnpm verify passes, including manifest:validate with the published beta117 devkit, 719 app tests, conformance and the build.

….view

Bases are YAML document records whose type implements obsidian.base, and
mdbase views are records whose type implements mdbase.view. TaskNotes
provisions both published packs during collection setup, requires md and
base record extensions, and reads, writes and deletes view sources with the
ordinary record operations instead of the view-source operations, so it no
longer asks for views.manage.

Requires an mdbase connect release whose connectors advertise
yaml-document-records-v1 and whose setup accepts the record_extensions
target.
beta117 accepts the record_extensions setup target and gates base records on
connectors that advertise yaml-document-records-v1.
@callumalpass
callumalpass marked this pull request as ready for review September 29, 2026 07:01
The relay fixture now describes the obsidian.base and mdbase.view contracts
a set-up collection carries, and answers reads of .base view sources, which
now use the ordinary read operation, instead of treating them as task reads.
@callumalpass
callumalpass merged commit d09dfad into main Sep 29, 2026
4 checks passed
callumalpass added a commit that referenced this pull request Sep 29, 2026
callumalpass added a commit that referenced this pull request Sep 29, 2026
* Reapply "Store saved views as records (obsidian.base, mdbase.view) (#176)" (#177)

This reverts commit d1cdb51.

* Use mdbase connect beta119

beta119 stores hosted Obsidian Bases as records once setup adds base, so
saved-view editing through the record operations works on hosted
collections as well as local ones.
@callumalpass callumalpass mentioned this pull request Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant