I just did a quick proof of concept, using a https://tiddlywiki.com/#Alternative%20page%20layouts
In side a custom clone of $:/core/ui/PageTemplate I wrapped it in a message catcher widget, this example puts a message into the developer console, unfortunately it did not work.
I then did a minimal example that wraps the content of the contents tab, This works, on tiddlywiki.com, but I wont share it as below has better;
You can alter what occurs in the caught-actions and current tiddler is available but you may need to pass other variables if needed, however the console suggests most are available.
We then need to find where to wrap any list of links to capture navigation from them and wrap that. This package edits $:/core/ui/PageTemplate/sidebar and seems to capture any link in the sidebar.
sidebar-message-capture.json (1.1 KB)
So back to your @RedAsset problem. Here you may need to close all and then navigate.
With my attempt I could no longer open any tiddler, except I had this installed edit-recent.json (1.9 KB) which allowed me to click to edit directly.
Other combinations I am getting Internal JavaScript Error on navigate;
- The following actions seem to cause the problem.
<$action-sendmessage $message="tm-close-tiddler"/>
<$action-sendmessage $message="tm-close-all-tiddlers"/>
<$action-sendmessage $message="tm-close-other-tiddlers"/>
Testing suggests it is not working from the search drop down yet.