One of my projects which contains only 2 Agents exhibits a peculiar behaviour:
It only happens in Map View, and then again only if I have no Note selected at the time, or an Adornment selected.
Every few minutes, the selected/focus Note autonomously changes and each time, the newly focused Note is the same - it is an alias created by 1 of the 2 Agents that operate on this project, It seems the Agent runs and when it stops, the default selected Note is the last one updated by’ the Agent.
My question is whether this behaviour expected or anomalous?
A missing element here is what is the map’s focus. If it is a map of an agents contents, this might not be unexpected as every agent cycle the agent reviews its aliases and deletes or adds to them as needed. But point #2 suggests it is a ‘normal’ map. As the agent(s) are updating notes on the map, how complex (or not) are the agent actions.
From the information given, it may be the agents are doing work involving an active selection, which is why understanding the agents’ $OnAdd might help.
In the past when I’ve had gremlins of this nature (different set-up, but unexpected behaviour) it most often tracks down to side effects of the doc/code that I’d not known or hadn’t taken into account. far less often it has been a glitch in the app but experience has me doing a find trawl first on the code I am causing to run, albeit unseen, an which can result in thinks like you see. HTH.
The Map’s focus is root-level. The Agent itself is a 1-liner, namely $ToDo==true
I was curious whether this behaviour was expected/anticipated - OK I will mess around with the file, re-create the Agent’ add an instruction in $AgentAction, and so on.
I’d agree noting complex liking in the agent code. does your doc do anything related to $ToDo, other than store the attribute boolean? Does some other code change badges, colour etc—anything that might cause the map to re-draw. Even so, I’d not expect the latter to have the effect described.
I suspect one needs to see the effect to look for clues. IOW, your report isn’t doubted but often seeing the effect live can trigger ideas at to the cause. Then again, that begs a question. I don’t know how big the ‘real’ file behind this is. I’m wondering if it is possible to recreate the effect in a new minimal file. Another approach might be to do something I’ve found useful in the past when hunting the cause of such gremlins in a mature file:
make a copy of the file. I suggest using File ▸ Save As so the test file has a new UUID and give the new file a different name so it doesn’t pollute your Time Machine with an inappropriate version of the original (i.e. after you’ve experimented on it).
delete as much extraneous material as you can, checking as you go that the effect still occurs. If a deletion kills the odd effect being reported, then the scope of that delete hints at the cause of the effect.
Check what got deleted, and consider the effects on the doc if the last deletion’s content..
Note that it’s not just the notes/agents/etc. objects deleted but the effect of any now-missing rules, edicts, etc. Also aliases now missing from insideremaining agents. Anywhere some action amy fall on a note or alias.
If you get to a slim file with no personal/sensitive data and you can still see the effect, it’s worth sharing here.