SemanticScreen component sets main and focus._id to each match one of the point._ids stored in points. Because PouchDB reassigns assigns every single point._id but leaves main and focus._id alone, main and focus do not refer to the correct points. In fact, they do not refer to any point._id stored in PouchDB.
Currently, searchMessages returns docs, an array of messages with createdAt attributes set to milliseconds since 1970. The createdAt attributes should be converted to Date objects before being returned.
The app should be able to query ushin-db for all messages which contain references to a given pointId. Note that not all references to pointIds are contained inside message.shapes. The value of message.focus is a pointId which is not duplicated inside message.shapes (while message.mainis duplicated inside message.shapes). I am not sure if the implementation details of this feature depend on whether the frontend uses this data model.
Return all messages which contain a point with a given shape which also matches some text search query.
For example, "give me all messages which contain a fact point with the text "cats" in it.