Keeping my Node.js TW instance's open tiddler state local to a device (or even browser tab)

99 views
Skip to first unread message

Hugo Saavedra

unread,
May 2, 2020, 5:48:10 PM5/2/20
to tiddl...@googlegroups.com
Hi all!

I apologize if this question has been asked before -- I'm not totally sure what strings to search on, and I've scoured the TW docs pretty thoroughly.

Question

Is it possible to make it so that the state of my Wiki (specifically, which tiddlers are open) is local to the device? If so, how does one d?o this

Background

I have been using TiddlyWiki as a repository for my math notes using the Node.js server.

An important condition for me is that my server is accessible from different devices, so I am hosting it behind NGINX on a DO droplet. 

Write access is private with an authenticated user, read access is public.

When I open TiddlyWiki on a brand new device, my default "Home" page will be open momentarily, and then suddenly all the Tiddlers I have open (including drafts!) on some tab on a completely different device will open. 

If I open different tiddlers on the new device, after 10-30 seconds those tiddlers will be replaced by the tiddlers on a different device.

I think that if I log in on this new device, this behavior stops, but the annoyance for me is that I would like users of my wiki to browse without seeing the state on one of my machines.

I really appreciate any help or thoughts here!

TonyM

unread,
May 2, 2020, 8:25:56 PM5/2/20
to TiddlyWiki
Hugo,

Doing what you ask may not be straight forward but here are a few leads, pending other input;

Design considerations
  • Do try and design your solution independently of node vs single File Wikis 
  • Please try and publish it eventualy back into the community
  • Continue asking for help in the forum.
Regards
Tony

Hugo Saavedra

unread,
May 2, 2020, 9:03:25 PM5/2/20
to tiddl...@googlegroups.com
Tony,

Thanks very much for the pointers. I'll hack around on this. 

I'm surprised that this is expected behavior -- it was pretty unexpected for me when I realized what was happening!

Are there any published guidelines and best practices for writing plugins? And similarly for understanding the Tiddlywiki internals/APIs (in addition to the helpful link you provided about InfoMechanism)?

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/22z0Qse3amw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ef5c0cb5-04a1-4f08-b821-4cf5827f725f%40googlegroups.com.

TonyM

unread,
May 2, 2020, 9:45:58 PM5/2/20
to TiddlyWiki
Hugo,

There is documentation and discussions in the forum, including the dev forum, on writing plugins but you do not need to, using tiddlywikis native tools as pointed to by me is sufficient to build this solution.

I am building something that would encompass this but I do not want to suggest when and If I will publish it, as I am so busy.

Regards
Tony


On Sunday, 3 May 2020 11:03:25 UTC+10, Hugo Saavedra wrote:
Tony,

Thanks very much for the pointers. I'll hack around on this. 

I'm surprised that this is expected behavior -- it was pretty unexpected for me when I realized what was happening!

Are there any published guidelines and best practices for writing plugins? And similarly for understanding the Tiddlywiki internals/APIs (in addition to the helpful link you provided about InfoMechanism)?
To unsubscribe from this group and all its topics, send an email to tiddl...@googlegroups.com.

Saq Imtiaz

unread,
May 3, 2020, 1:28:09 AM5/3/20
to TiddlyWiki
Hugo, I assume you are running the latest version, 5.1.22?
If so, I believe you are encoutering a bug that was introduced due to some changes to the sync mechanism. See the discussion here:

If you are comfortable with javascript I think these are the two bits that need tweaking, both part of the TiddlyWeb adaptor plugin:



Alternatively you can run 5.1.21 until this gets fixed.

Regards,
Saq

On Sunday, May 3, 2020 at 3:03:25 AM UTC+2, Hugo Saavedra wrote:
Tony,

Thanks very much for the pointers. I'll hack around on this. 

I'm surprised that this is expected behavior -- it was pretty unexpected for me when I realized what was happening!

Are there any published guidelines and best practices for writing plugins? And similarly for understanding the Tiddlywiki internals/APIs (in addition to the helpful link you provided about InfoMechanism)?
To unsubscribe from this group and all its topics, send an email to tiddl...@googlegroups.com.

Jed Carty

unread,
May 3, 2020, 5:38:27 AM5/3/20
to TiddlyWiki
It sounds like the $:/StoryList tiddler is syncing. Make a tiddler called $/config/SyncFilter and put 

[all[]] -[[$:/StoryList]]

in the text field. That should prevent the server from saving the state of the open tiddlers and pushing it to other browsers. Make sure that before you do this you have the tiddlers you want open by default open, or after you do this you need to go onto the server and delete the story list .tid file manually because it won't sync after you set the sync filter.

Saq Imtiaz

unread,
May 3, 2020, 6:48:39 AM5/3/20
to TiddlyWiki
@Jed : I suspected the same but in the other thread @HokieGeek did not manage to resolve this via $:/config/syncFilter. It is possible the problem may have been the open tiddlers in the browser at the time of the change to the syncFilter, as you mentioned. 

I do think the default syncing behaviour for the story list needs to be changed.

Hugo Saavedra

unread,
May 3, 2020, 6:58:57 AM5/3/20
to tiddl...@googlegroups.com
Thanks, all.

For now switching to 5.1.21 seems to be a solid solution while I try to patch 5.1.22 locally (or until the 2.1.22 release, which will likely happen first!)

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/22z0Qse3amw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4ddbe6d5-fb2f-4cf6-b7c8-8e58ca43063d%40googlegroups.com

Saq Imtiaz

unread,
May 3, 2020, 7:45:48 AM5/3/20
to TiddlyWiki
@Hugo please do confirm for us if reverting to 5.1.21 resolved the issue for you.


On Sunday, May 3, 2020 at 12:58:57 PM UTC+2, Hugo Saavedra wrote:
Thanks, all.

For now switching to 5.1.21 seems to be a solid solution while I try to patch 5.1.22 locally (or until the 2.1.22 release, which will likely happen first!)

On Sun, May 3, 2020 at 4:48 AM Saq Imtiaz wrote:
@Jed : I suspected the same but in the other thread @HokieGeek did not manage to resolve this via $:/config/syncFilter. It is possible the problem may have been the open tiddlers in the browser at the time of the change to the syncFilter, as you mentioned. 

I do think the default syncing behaviour for the story list needs to be changed.


On Sunday, May 3, 2020 at 11:38:27 AM UTC+2, Jed Carty wrote:
It sounds like the $:/StoryList tiddler is syncing. Make a tiddler called $/config/SyncFilter and put 

[all[]] -[[$:/StoryList]]

in the text field. That should prevent the server from saving the state of the open tiddlers and pushing it to other browsers. Make sure that before you do this you have the tiddlers you want open by default open, or after you do this you need to go onto the server and delete the story list .tid file manually because it won't sync after you set the sync filter.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/22z0Qse3amw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddl...@googlegroups.com.

Arlen Beiler

unread,
May 4, 2020, 9:01:54 AM5/4/20
to TiddlyWiki
Hello, yes this is expected behavior and it has been in tiddlywiki for many versions. The TiddlyWeb adapter plugin specifies the sync filter I believe. In any case you seen you simply need to add " -$:/StoryList" to the end of the active sync filter.  This problem is only related to the server side of things. Single file wikis do not use this mechanism.

On Sat, May 2, 2020, 17:48 Hugo Saavedra <h...@listen.systems> wrote:
Hi all!

I apologize if this question has been asked before -- I'm not totally sure what strings to search on, and I've scoured the TW docs pretty thoroughly.

Question

Is it possible to make it so that the state of my Wiki (specifically, which tiddlers are open) is local to the device? If so, how does one d?o this

Background

I notice that the Tiddlers that are open for me in one browser tab are open for me in all other tabs, in all other devices.

When I open TiddlyWiki on a brand new device, my default "Home" page will be open momentarily, and then suddenly all the Tiddlers I have open (including drafts!) on some tab on a completely different device will open.

I have been using TiddlyWiki as a repository for my math notes using the Node.js server.

An important condition for me is that my server is accessible from different devices, so I am hosting it behind NGINX on a DO droplet. 

Write access is private with an authenticated user, read access is public.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/136d622e-4ef8-453b-84b9-2be5ad36a671%40googlegroups.com.

Arlen Beiler

unread,
May 4, 2020, 9:26:49 AM5/4/20
to TiddlyWiki
I apologize. The sync filter is actually a core syncer feature, not a plugin syncadaptor feature. 

Add " -[[$:/StoryList]]" to the end of $:/config/SyncFilter. Make sure you include the space in between. 

Arlen Beiler

unread,
May 4, 2020, 9:28:58 AM5/4/20
to TiddlyWiki
Leave the current text in there and just add that to the end. 
Reply all
Reply to author
Forward
0 new messages