History display always shows the most-recent Names for Things
Summary: Related to this: Deleted Things will show up with an empty Name
The issue is that, in order to fix
Computed Name is not used in History entries, we are now computing the names in a Future-ized pass at the end of filling out the History. But this has a knock-on problem: if something has been deleted, it no longer exists in the State, so we don't have the name. And if the name has changed, we are using the current name.
Fixing this entirely correctly will probably take some serious rework of the History Summary. In particular:
- We probably should, in principle, be including the ThingNames for each Event in that Event, so that we can represent them properly.
- In which case, Create has to be handled specially: it should use the first name that then gets assigned for the Thing. (And it isn't obvious how to calculate that.)
- As an optimization, we should probably keep the overall ThingNames table, and remove duplicates from the stream where they are the same as in this table. (Which will be the vast majority.)
- All of this needs to detect and suppress OIDs, except as a last resort.
- In the UI, if the name has changed, we should probably show both the original and current names, so you can interpret correctly.