Report moved history at final record paths

This commit is contained in:
2026-11-02 17:29:36 +00:00
parent 25382a112b
commit 34c3241dae
3 changed files with 65 additions and 6 deletions

View File

@@ -113,11 +113,10 @@ func (model *historyModel) selectHistory(path Path) []historySelection {
} else if !historyObservationMatchesQuery(query, observation.path) {
continue
}
if query.String() != path.String() && pathContains(query, reportedPath) {
suffix := reportedPath.segments[len(query.segments):]
reportedPath = Path{segments: append(clonePathSegments(path.segments, len(suffix)), suffix...)}
} else if query.String() != path.String() && pathContains(reportedPath, query) && len(reportedPath.segments) >= len(query.segments)-1 {
reportedPath = path.clone()
if observation.phase != historyPhaseResolution && query.String() != path.String() {
if translated, matched := model.resolutionPayload.correspondence.finalPath(reportedPath); matched {
reportedPath = translated
}
}
selectionIndex, found := selectionByPayload[observation.payload]
if !found {