From 5d1f3c1cee606cdfbe4fef533a791777149904e1 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 15 Sep 2026 01:07:56 +0300 Subject: [PATCH] fixes --- src/components/conversation/conversation.js | 4 ++-- src/components/timeline/timeline.vue | 2 +- src/composables/useConversation.js | 4 +++- src/composables/useVirtualScrolling.js | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 1c94fad3a..89a42a41d 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -187,7 +187,7 @@ export default { // # Linear style stuff const isLinearView = computed(() => displayStyle.value !== 'tree') const linearElement = useTemplateRef('linear') - const linearScrollCompensation = computed(() => isLinearView.value) + const linearScrollCompensation = computed(() => isExpanded.value && isLinearView.value) const { heightChart: heightChartLinear, changeSuspendState: changeSuspendStateLinear, @@ -233,7 +233,7 @@ export default { const currentAncestorsLite = computed(() => currentAncestors.value.map(({ id }) => ({ id }))) const ancestorsElement = useTemplateRef('ancestors') - const treeScrollCompensation = computed(() => isTreeView.value) + const treeScrollCompensation = computed(() => isExpanded.value && isTreeView.value) const { heightChart: heightChartAncestors, changeSuspendState: changeSuspendStateAncestors, diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 8ad3521cd..ac2a5b125 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -88,7 +88,7 @@ > { if (newStatus) setFocused(newStatus.id) - fetchConversation() + if (newStatus.id !== oldStatus.id) { + fetchConversation() + } }) watch(expanded, (value) => { diff --git a/src/composables/useVirtualScrolling.js b/src/composables/useVirtualScrolling.js index 864b0cf7b..f20ffd7d4 100644 --- a/src/composables/useVirtualScrolling.js +++ b/src/composables/useVirtualScrolling.js @@ -176,6 +176,7 @@ export function useVirtualScrolling({ console.log('COMPENSATE', oldVal, newVal, topScrollBoundary.value) const oldVisible = oldVal.filter((item) => checkVisible(item)) const oldItem = first(oldVisible) + if (!oldItem) return 0 // probably out of bounds in timeline const oldItemUpdated = newVal.find(({ id }) => id === oldItem.id) console.log('OLD', oldItem, oldItemUpdated) if (!oldItemUpdated) return 0 // context change?