Skip to content

fix(solid)!: register only the instance in the type index - #672

Open
ixuz wants to merge 2 commits into
mainfrom
fix/type-index-instance-only
Open

ixuz wants to merge 2 commits into
mainfrom
fix/type-index-instance-only

Conversation

@ixuz

@ixuz ixuz commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

What and why

Solid Memo wrote up to seven type index registrations per instance: its own sm:Instance one, plus one for each class of the instance's data (dcat:Catalog, sm:Deck, sm:Card, sm:ReviewState, sm:Answer, and sm:Deck again for the drafts). The issue points out that Solid apps register the library a user owns and reach what's inside through their own links. The type index proposal also asks for coarse library types, not every class an app writes. Nothing read the extra registrations, Solid Memo included, and users were left to clean them up by hand.

Only the instance is registered

  • Creating an instance, and moving a guest's study into the pod, write only the sm:Instance registration.
  • The format update no longer writes anything outside the instance. Until now it added registrations back after every update, including ones the user had removed.
  • "Findable by other apps / Register what is missing" is gone from Preferences, along with its strings.

Existing pods

  • Removing, deleting and renaming an instance still recognize the registrations earlier versions wrote. Those are removed with the instance, and renaming retitles them.
  • Preferences has a new "Old registrations" section. It lists the old entries still there for the open instance and removes them when the user asks.
    • It shows nothing when there are none, and isn't offered to a guest.
    • An entry is removed only when its class, its exact target in the instance and the #sm-…- id the app gave it in that index document all match.
    • The instance's own registration and other apps' entries are left as they are. A registration that also names something else keeps it.
    • It never runs on its own, neither when an instance is opened nor during a format update.

Contract

  • This is a breaking change, released as a major version. Other apps can no longer find an instance's catalog, decks, cards, review states, answers or drafts by their class in the type index; they find the instance by sm:Instance and its data from there.
  • api/pod-layout.txt now lists only the sm:Instance registration. The first commit says it breaks (! and a BREAKING CHANGE: footer), and check:breaking accepts it.

Checks

  • npm run check, lint:reuse and lint:commits pass.
  • The pod integration tests cover three cases:
    • a new instance gets one registration;
    • a format update leaves the type index byte for byte unchanged;
    • old entries, another app's entry and an unprefixed lookalike are seeded, and only ours are removed.

Closes: #644

@ixuz ixuz added bug Something isn't working enhancement New feature or request interop labels Nov 8, 2026
ixuz added 2 commits November 8, 2026 22:53
Solid Memo wrote up to seven type index registrations per instance:
its own sm:Instance one, and one for each class of its data (the
catalog, decks, cards, review states, answers and drafts). Solid apps
register the library a user owns and reach what is inside through its
own links; the type index proposal asks for coarse library types, not
every class an app writes. Nothing read the extra registrations, and
users were left to tidy them by hand.

Creating an instance, a format update and a guest's study moved into
the pod now write only the sm:Instance registration. The format update
writes nothing outside the instance, so it no longer adds back a
registration the user removed. "Findable by other apps" in Preferences
goes with them. Removing, deleting and renaming an instance still
recognize the registrations earlier versions wrote, so those go when
the instance does.

Closes: #644

BREAKING CHANGE: Solid Memo no longer registers the classes of an instance's data in the type indexes (dcat:Catalog, sm:Deck, sm:Card, sm:ReviewState, sm:Answer, and sm:Deck for the drafts). A new instance has only its sm:Instance registration, and a format update no longer adds the others. An app that found the data by those classes finds the instance by sm:Instance instead, and its data at the places the instance's folder gives it (docs/data-model.md). Those earlier versions wrote stay until the user removes them in Preferences or removes the instance.
Earlier versions registered each class of an instance's data in the
user's type indexes. The app no longer writes them, but they stay in
the pods of instances users keep, and cleaning a type index by hand is
hard.

Preferences now lists those still there for the open instance and
removes them when the user asks; it shows nothing when there are none,
and is not offered to a guest. Only what is surely Solid Memo's goes:
a registration of one of those classes, naming exactly that class's
place in the instance, with the id the app gave it in the index
document itself. The instance's own registration and other apps' stay,
and a registration that also names something else keeps it. Nothing
is removed without the user's say, on opening an instance or in a
format update.

Refs: #644
@ixuz
ixuz force-pushed the fix/type-index-instance-only branch from 7aeeb36 to c21ab91 Compare November 8, 2026 21:54
@ixuz ixuz changed the title fix(solid): register only the instance in the type index fix(solid)!: register only the instance in the type index Nov 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request interop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

solid-memo typeIndex content is over detailed. Should be limited to /solid-memo/ container location

1 participant