TiddlyWiki / TiddlyWiki/MultiWikiServer

Recipe tiddlers do not update revision when an overlaying tiddler is deleted

Open
#17 2 comments 0 reactions 1 assignee View on GitHub

@Arlen22 is already working on this.

Since Apr 14, 2025.

enhancement
Dominant language
TypeScript
Stars
60
Forks
16
PR merge metrics
No merged PRs in 30d

Description

When an overlaying tiddler is deleted, the current system does not update the revision of the tiddler below it to reflect the fact that it is now the top tiddler (from the perspective of the revision tracker, it has been modified and needs to be updated).

When a tiddler gets deleted, it would need to check if there is a tiddler below it which is now exposed. It would be possible to do this with shadow tiddlers, but that would break [all[normal]] filters so we probably need to add this functionality to the sync adaptor.

It might be necessary to provide the client with a list of all titles with the following form.

type RecipeBagInfo = {
  bag_name: string;
  position: number;
  is_plugin: boolean;
  last_known_tiddler_id: number;
  titles: string[];
}[];

When the sync adaptor deletes a tiddler from the server it would need to check if there is another tiddler with the same title below it and retrieve that tiddler from the server. The server could also just offer this information in the DELETE response. When the sync adaptor checks for updated tiddlers, it would send the RecipeBagInfo object, minus the titles, and the server would respond with the usual tiddlers.json array, but without flattening it or filtering for overlay.

Basically the client would be aware of the state of every tiddler in every bag in the recipe. The client would be able to read any bag according to the usual permissions, so if a user wanted to do a diff with the contents of a tiddler further down they could do that.

This would also allow some more advanced recipe systems to be made relatively simply, such as prefixing tiddlers with the name of the bag they're in, for example, to create partitioned layers in the recipe. Such a layer might need to be read-only, but at least it's possible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.