Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(channel): scroll position jumping and flickering (#691)
dev-rb2993e583befa
diff --git a/js/app/packages/block-channel/component/Message/MessageContainer.tsx b/js/app/packages/block-channel/component/Message/MessageContainer.tsxindex e5df75cfb3..c38272cdd5 100644--- a/js/app/packages/block-channel/component/Message/MessageContainer.tsx+++ b/js/app/packages/block-channel/component/Message/MessageContainer.tsx@@ -1,9 +1,8 @@+import { useMessageListContext } from '@block-channel/component/MessageList/MessageList';import { COLLAPSED_THREAD_INDEX_CUTOFF } from '@block-channel/constants';import { messageAttachmentsStore } from '@block-channel/signal/attachment';import { reactToMessage } from '@block-channel/signal/reactions';-import type { ThreadViewData } from '@block-channel/type/threadView';import type { MessageListContext } from '@block-channel/utils/listContext';-import { scrollIntoViewAndFocus } from '@block-channel/utils/scrollAndFocus';import { StaticMarkdown } from '@core/component/LexicalMarkdown/component/core/StaticMarkdown';import { channelTheme } from '@core/component/LexicalMarkdown/theme';import {@@ -17,7 +16,6 @@ import { TOKENS } from '@core/hotkey/tokens';import { isTouchDevice } from '@core/mobile/isTouchDevice';import { isMobileWidth } from '@core/mobile/mobileWidth';import {- type InputAttachment,isStaticAttachmentType,STATIC_IMAGE,STATIC_VIDEO,@@ -43,7 +41,6 @@ import {Show,Switch,} from 'solid-js';-import type { SetStoreFunction } from 'solid-js/store';import type { VirtualizerHandle } from 'virtua/solid';import { TypingIndicator } from '../MessageList/TypingIndicator';import {@@ -101,19 +98,11 @@ function NewMessageIndicator(props: NewIndicatorProps) {type MessageProps = {message: MessageType;lastViewed: Accessor<string | null | undefined>;- newMessageIndex: Accessor<number | undefined>;isFocused: boolean;- setFocusedMessageId: Setter<string | undefined>;index: Accessor<number>;orderedMessages: Accessor<MessageType[]>;threadChildren?: MessageType[];threadSiblings?: MessageType[];- threadViewStore: ThreadViewData;- setThreadViewStore: SetStoreFunction<ThreadViewData>;- threadInputAttachmentsStore: Record<string, InputAttachment[]>;- setThreadInputAttachmentsStore: SetStoreFunction<- Record<string, InputAttachment[]>- >;newIndicatorShown: Accessor<number | undefined>;setNewIndicatorShown: Setter<number | undefined>;virtualHandle: VirtualizerHandle;@@ -126,12 +115,16 @@ type MessageProps = {export function MessageContainer(props: MessageProps) {const { message } = props;++ const listContext = useMessageListContext();+const [editing, setEditing] = createSignal(false);const [contextMenuOpen, setContextMenuOpen] = createSignal(false);const [reactionSearchOpen, setReactionSearchOpen] = createSignal(false);const [topBarEmojiMenuOpen, setTopBarEmojiMenuOpen] = createSignal(false);const [messageBodyRef, setMessageBodyRefInner] =createSignal<HTMLDivElement>();+const setMessageBodyRef = ((value?:| HTMLDivElement@@ -220,6 +213,17 @@ export function MessageContainer(props: MessageProps) {);});+ const threadState = createMemo(() => {+ const threadID = message.thread_id;+ if (!threadID) return;++ return listContext.getThreadState(threadID);+ });++ const messageState = createMemo(() => {+ return listContext.getThreadState(message.id);+ });+const isFirstMessage = createMemo(() => {return props.index() === 0;});@@ -229,7 +233,7 @@ export function MessageContainer(props: MessageProps) {return (props.index() === props.orderedMessages().length - 1 ||(props.listContext.isInLastThread &&- !props.threadViewStore[message.thread_id ?? '']?.threadExpanded &&+ !threadState()?.threadExpanded &&props.listContext.threadIndex === COLLAPSED_THREAD_INDEX_CUTOFF));});@@ -257,7 +261,7 @@ export function MessageContainer(props: MessageProps) {const isLastInCollapsedThread = createMemo(() => {return (- !props.threadViewStore[message.thread_id ?? '']?.threadExpanded &&+ !threadState()?.threadExpanded &&props.threadSiblings &&props.threadSiblings.length > COLLAPSED_THREAD_INDEX_CUTOFF + 1 &&props.listContext.threadIndex === COLLAPSED_THREAD_INDEX_CUTOFF@@ -265,14 +269,11 @@ export function MessageContainer(props: MessageProps) {});const shouldShowThreadAppendInput = createMemo(() => {- return props.threadViewStore[message.thread_id ?? '']?.hasActiveReply;+ return threadState()?.hasActiveReply === true;});const shouldShowFirstReply = createMemo(() => {- return (- !props.threadChildren?.length &&- props.threadViewStore[message.id ?? '']?.hasActiveReply- );+ return !props.threadChildren?.length && messageState()?.hasActiveReply;});const collapsedThreadMessages = createMemo(() => {@@ -324,28 +325,17 @@ export function MessageContainer(props: MessageProps) {const onThreadAppend = () => {const threadId = message.thread_id;if (!threadId) return;- props.setThreadViewStore(threadId, (prev) => {- return {- ...prev,- hasActiveReply: true,- threadExpanded: true,- replyInputShouldFocus: true,- };- });- props.virtualHandle.scrollToIndex(props.index(), {+ listContext.createReply(threadId, true);+ listContext.scrollToIndex(props.index(), {align: 'nearest',});};const onCreateReply = () => {- props.setThreadViewStore(message.id ?? '', () => {- return {- threadExpanded: true,- hasActiveReply: true,- replyInputShouldFocus: true,- };+ listContext.createReply(message.id, true);+ listContext.scrollToIndex(props.index(), {+ align: 'end',});- props.virtualHandle.scrollToIndex(props.index());};const actions = createMessageActions({@@ -396,10 +386,8 @@ export function MessageContainer(props: MessageProps) {.orderedMessages().findIndex((m) => m.id === message.id);if (focusedIndex === -1) return false;- props.setThreadViewStore(message.id ?? '', () => {- return { threadExpanded: true, hasActiveReply: true };- });- props.virtualHandle?.scrollToIndex(focusedIndex);+ listContext.createReply(message.id);+ listContext.scrollToIndex(focusedIndex);return true;},hotkeyToken: TOKENS.channel.replyToMessage,@@ -423,18 +411,15 @@ export function MessageContainer(props: MessageProps) {}return hasThreadChildren()- ? !props.threadViewStore[message.id ?? '']?.threadExpanded- : !props.threadViewStore[message.thread_id ?? '']?.threadExpanded;+ ? !messageState()?.threadExpanded+ : !threadState()?.threadExpanded;});const setThreadExpansion = (shouldExpand: boolean) => {const threadId = hasThreadChildren() ? message.id : message.thread_id;if (!threadId) return;- props.setThreadViewStore(threadId, (prev) =>- prev- ? { ...prev, threadExpanded: shouldExpand }- : { threadExpanded: shouldExpand }- );++ listContext.toggleThread(threadId, shouldExpand);};registerHotkey({@@ -445,12 +430,7 @@ export function MessageContainer(props: MessageProps) {hotkeyToken: TOKENS.channel.expandThread,keyDownHandler: () => {setThreadExpansion(true);- scrollIntoViewAndFocus({- virtualHandle: props.virtualHandle,- container: props.container,- targetIndex: props.index(),- targetId: message.id,- });+ listContext.scrollToMessage(message.id, props.index());return true;},displayPriority: 10,@@ -471,12 +451,7 @@ export function MessageContainer(props: MessageProps) {.orderedMessages().findIndex((m) => m.id === parentId);if (parentIndex >= 0) {- scrollIntoViewAndFocus({- virtualHandle: props.virtualHandle,- container: props.container,- targetIndex: parentIndex,- targetId: parentId,- });+ listContext.scrollToMessage(parentId, parentIndex);}return true;},@@ -490,16 +465,14 @@ export function MessageContainer(props: MessageProps) {const handleThreadToggle = () => {if (!message.thread_id) return;- if (!props.threadViewStore[message.thread_id]) {- props.setThreadViewStore(message.thread_id, () => ({- threadExpanded: true,- }));- } else {- props.setThreadViewStore(message.thread_id, (prev) => ({- ...prev,- threadExpanded: !prev.threadExpanded,- }));+ const threadState_ = threadState();++ if (!threadState_) {+ listContext.toggleThread(message.thread_id, true);+ return;}++ listContext.toggleThread(message.thread_id);};return (@@ -603,12 +576,14 @@ export function MessageContainer(props: MessageProps) {onThreadAppend={onThreadAppend}shouldShowThreadAppendInput={shouldShowThreadAppendInput}isTarget={props.isTarget}- setThreadAppendMountTarget={(el) =>- props.setThreadViewStore(message.thread_id ?? '', (prev) => ({- ...prev,- replyInputMountTarget: el,- }))- }+ setThreadAppendMountTarget={(el) => {+ if (!message.thread_id) return;++ listContext.registerThreadAppendMountTarget(+ message.thread_id,+ el+ );+ }}setMessageBodyRef={setMessageBodyRef}><MessageComponent.TopBar@@ -669,10 +644,7 @@ export function MessageContainer(props: MessageProps) {timestamp={lastReplyTimestamp()}users={threadReplyUsers()}onClick={handleThreadToggle}- isThreadOpen={- !!message.thread_id &&- props.threadViewStore[message.thread_id]?.threadExpanded- }+ isThreadOpen={threadState()?.threadExpanded}/></div></div>@@ -776,10 +748,7 @@ export function MessageContainer(props: MessageProps) {isLastInThreadshouldShowThreadAppendInput={createSignal(true)[0]}setThreadAppendMountTarget={(el) =>- props.setThreadViewStore(message.id ?? '', (prev) => ({- ...prev,- replyInputMountTarget: el,- }))+ listContext.registerThreadAppendMountTarget(message.id, el)}><MessageComponent.TopBar name={currentUserName()} />diff --git a/js/app/packages/block-channel/component/MessageList/MessageList.tsx b/js/app/packages/block-channel/component/MessageList/MessageList.tsxindex 9b0e6369cc..a5f199f443 100644--- a/js/app/packages/block-channel/component/MessageList/MessageList.tsx+++ b/js/app/packages/block-channel/component/MessageList/MessageList.tsx@@ -1,4 +1,3 @@-import { SplitLayoutContext } from '@app/component/split-layout/context';import {COLLAPSED_THREAD_INDEX_CUTOFF,TARGET_MESSAGE_ACTIVE_TIME,@@ -9,7 +8,10 @@ import {type ThreadStoreData,threadsStore,} from '@block-channel/signal/threads';-import type { ThreadViewData } from '@block-channel/type/threadView';+import type {+ ThreadView,+ ThreadViewData,+} from '@block-channel/type/threadView';import { loadDraftMessage } from '@block-channel/utils/draftMessages';import {createMessageListContextLookup,@@ -20,6 +22,7 @@ import { TextButton } from '@core/component/TextButton';import { toast } from '@core/component/Toast/Toast';import { observedSize } from '@core/directive/observedSize';import type { InputAttachment } from '@core/store/cacheChannelInput';+import { clamp } from '@core/util/math';import SunIcon from '@icon/duotone/sun-horizon-duotone.svg';import ArrowDownIcon from '@icon/regular/arrow-down.svg';import XIcon from '@icon/regular/x.svg';@@ -30,6 +33,7 @@ import { debounce } from '@solid-primitives/scheduled';import { activeElement } from 'app/signal/focus';import {type Accessor,+ createContext,createEffect,createMemo,createRenderEffect,@@ -38,7 +42,7 @@ import {Match,mapArray,on,- onCleanup,+ onMount,type Setter,Show,Switch,@@ -47,6 +51,7 @@ import {} from 'solid-js';import { createStore, reconcile } from 'solid-js/store';import { type VirtualizerHandle, VList } from 'virtua/solid';+import type { ScrollToIndexOpts } from 'virtua/unstable_core';import { MessageContainer } from '../Message/MessageContainer';import { ReplyInputsPortaler } from '../ReplyInputsPortaler';@@ -63,11 +68,51 @@ const LONG_DATE_FORMATTER = new Intl.DateTimeFormat(undefined, {year: 'numeric',});+const toScrollHintDate = (isoDate?: string) => {+ if (!isoDate) return '';+ const date = new Date(isoDate);+ if (Number.isNaN(date.getTime())) return '';+ const now = new Date();+ const formatter =+ date.getFullYear() === now.getFullYear()+ ? SHORT_DATE_FORMATTER+ : LONG_DATE_FORMATTER;+ return formatter.format(date).toUpperCase();+};++// Provide stable row models to VList so item instances are preserved across moves/insertions+type RowModel = {+ id: string;+ message: Message;+};+// The size of a message with a profile picture and a one line messageconst BASE_ITEM_SIZE = 50;-const clampIndex = (value: number, minValue: number, maxValue: number) =>- Math.min(Math.max(value, minValue), maxValue);+type MessageListContentContextValues = {+ registerVirtualHandle: (handle: VirtualizerHandle) => void;+ scrollContainerRef: Accessor<HTMLElement | undefined>;+ registerScrollContainer: (el: HTMLElement) => void;+ scrollToIndex: (index: number, alignOpts?: ScrollToIndexOpts) => void;+ scrollToMessage: (messageID: string, index: number, focus?: boolean) => void;+ createReply: (id: string, focus?: boolean) => void;+ toggleThread: (threadID: string, value?: boolean) => void;+ clearThreadFocus: (threadID: string, expanded?: boolean) => void;+ toggleReplyInputFocus: (threadID: string, value?: boolean) => void;+ getThreadsWithActiveReplies: () => string[];+ registerThreadAppendMountTarget: (threadID: string, el: HTMLElement) => void;+ getThreadState: (threadID: string) => ThreadView | undefined;+ orderedMessages: Accessor<Message[]>;+};++const MessageListContentContext =+ createContext<MessageListContentContextValues>();++export const useMessageListContext = () => {+ const context = useContext(MessageListContentContext);++ return context!;+};export type TargetMessageInfo = { messageId: string; threadId?: string };@@ -97,16 +142,114 @@ function EmptyMessageList() {}export function MessageList(props: MessageListProps) {- const [containerRef, setContainerRef] = createSignal<HTMLDivElement>();const [virtualHandle, setVirtualHandle] = createSignal<VirtualizerHandle>();- const [listContainerRef, setListContainerRef] = createSignal<- HTMLDivElement | undefined- >();const [scrollContainerRef, setScrollContainerRef] = createSignal<HTMLDivElement | undefined>();- const [scrollHintLabel, setScrollHintLabel] = createSignal<string>();- const [isScrollHintVisible, setIsScrollHintVisible] = createSignal(false);++ const [threadViewStore, setThreadViewStore] = createStore<ThreadViewData>({});++ const normalizeIndex = (index: number) => {+ const length = props.orderedMessages().length;++ return length - 1 - index;+ };++ const context: MessageListContentContextValues = {+ registerVirtualHandle: setVirtualHandle,+ scrollContainerRef,+ registerScrollContainer: setScrollContainerRef,+ scrollToIndex: function (index: number, opts?: ScrollToIndexOpts): void {+ virtualHandle()?.scrollToIndex(normalizeIndex(index), opts);+ },+ scrollToMessage: function (+ messageID: string,+ index: number,+ focus: boolean = true+ ): void {+ const handle = virtualHandle();++ if (!handle) return;++ handle.scrollToIndex(normalizeIndex(index), { align: 'end' });+ if (!focus) return;+ const targetEl = scrollContainerRef()?.querySelector<HTMLElement>(+ `[data-message-body-id="${messageID}"]`+ );+ if (targetEl) {+ requestAnimationFrame(() => {+ targetEl.focus();+ });+ }+ },+ createReply: function (id: string, focus = false): void {+ setThreadViewStore(id, (prev) => {+ return {+ ...prev,+ threadExpanded: true,+ hasActiveReply: true,+ replyInputShouldFocus: focus,+ };+ });+ },+ toggleThread: function (threadID: string, value?: boolean): void {+ setThreadViewStore(threadID, (prev) => {+ return {+ ...prev,+ threadExpanded: value ?? (prev ? !prev.threadExpanded : true),+ };+ });+ },+ clearThreadFocus: function (threadID: string, expanded?: boolean): void {+ setThreadViewStore(threadID, (prev) => {+ return {+ ...prev,+ threadExpanded: expanded,+ hasActiveReply: false,+ };+ });+ },+ toggleReplyInputFocus: function (threadID: string, value?: boolean): void {+ setThreadViewStore(threadID, (prev) => {+ return {+ ...prev,+ replyInputShouldFocus:+ value ?? (prev ? !prev.replyInputShouldFocus : true),+ };+ });+ },+ getThreadsWithActiveReplies: () => {+ return Object.keys(threadViewStore).filter(+ (threadId) => threadViewStore[threadId].hasActiveReply+ );+ },+ registerThreadAppendMountTarget: function (+ threadID: string,+ el: HTMLElement+ ): void {+ setThreadViewStore(threadID, (prev) => ({+ ...prev,+ replyInputMountTarget: el,+ }));+ },+ getThreadState: function (threadID: string): ThreadView | undefined {+ return threadViewStore[threadID];+ },+ orderedMessages: props.orderedMessages,+ };+ return (+ <MessageListContentContext.Provider value={context}>+ <MessageListImpl {...props} />+ </MessageListContentContext.Provider>+ );+}++function MessageListImpl(props: MessageListProps) {+ const listContext = useMessageListContext();++ const [virtualHandle, setVirtualHandle] = createSignal<VirtualizerHandle>();+ const [containerRef, setContainerRef] = createSignal<HTMLDivElement>();+const [newIndicatorShown, setNewIndicatorShown] = createSignal<number>();const [hasUserScrolled, setHasUserScrolled] = createSignal(false);const [messageListContext, setMessageListContext] =@@ -119,13 +262,17 @@ export function MessageList(props: MessageListProps) {const [threadInputAttachmentsStore, setThreadInputAttachmentsStore] =createStore<Record<string, InputAttachment[]>>({});- const [threadViewStore, setThreadViewStore] = createStore<ThreadViewData>({});-const [isNearBottom, setIsNearBottom] = createSignal(true);const [initialScrollComplete, setInitialScrollComplete] = createSignal(false);const openedChannel = openedChannelSignal.get;+ const normalizeIndex = (index: number) => {+ const length = props.orderedMessages().length;++ return length - 1 - index;+ };+const lastViewed = createMemo(() => {return props?.latestActivity?.viewed_at;});@@ -150,53 +297,13 @@ export function MessageList(props: MessageListProps) {// represents active highlighted state on the target messageconst [targetMessageActive, setTargetMessageActive] =createSignal<boolean>(false);+const activeTargetMessageId = createMemo(() => {if (!targetMessageActive()) return;return untrack(props.targetMessage)?.messageId;});- const isActiveTargetMessage = createSelector(activeTargetMessageId);-- let scrollTimeoutId: ReturnType<typeof setTimeout> | undefined;- let scrollHintTimeoutId: ReturnType<typeof setTimeout> | undefined;-- const formatScrollHintDate = (isoDate?: string) => {- if (!isoDate) return '';- const date = new Date(isoDate);- if (Number.isNaN(date.getTime())) return '';- const now = new Date();- const formatter =- date.getFullYear() === now.getFullYear()- ? SHORT_DATE_FORMATTER- : LONG_DATE_FORMATTER;- return formatter.format(date).toUpperCase();- };- const updateScrollHint = () => {- if (!hasUserScrolled()) return;- const handle = virtualHandle();- const list = props.orderedMessages();- if (!handle || !list || list.length === 0) return;-- const endIndex = handle.findItemIndex(- handle.scrollOffset + handle.viewportSize- );- if (endIndex === undefined) return;-- const index = clampIndex(endIndex, 0, list.length - 1);- const message = list[index];- const label = formatScrollHintDate(message?.created_at);- if (!label) return;-- if (scrollHintTimeoutId) {- clearTimeout(scrollHintTimeoutId);- }-- setScrollHintLabel(label);- setIsScrollHintVisible(true);- scrollHintTimeoutId = setTimeout(() => {- setIsScrollHintVisible(false);- }, 300);- };+ const isActiveTargetMessage = createSelector(activeTargetMessageId);/*** Scroll to the bottom of the document or the target message depending on the@@ -214,8 +321,7 @@ export function MessageList(props: MessageListProps) {forceBottom ||((!target || delta > TARGET_MESSAGE_ACTIVE_TIME) && isNearBottom())) {- if (scrollTimeoutId) clearTimeout(scrollTimeoutId);- const lastIndex = props.orderedMessages().length - 1;+ const lastIndex = 0;virtualHandle()?.scrollToIndex(lastIndex, {align: 'end',});@@ -239,16 +345,11 @@ export function MessageList(props: MessageListProps) {}if (threadId) {- setThreadViewStore(threadId, (prev) => ({- ...prev,- threadExpanded: true,- }));+ listContext.toggleThread(threadId, true);}- if (scrollTimeoutId) clearTimeout(scrollTimeoutId);-setTargetMessageActive(true);- virtualHandle()?.scrollToIndex(index, {+ virtualHandle()?.scrollToIndex(normalizeIndex(index), {align: 'center',});setTimeout(() => {@@ -275,11 +376,8 @@ export function MessageList(props: MessageListProps) {const activeMessageId = activeElement_?.getAttribute('data-message-body-id');- if (activeMessageId) {- props.setFocusedMessageId(activeMessageId);- } else {- props.setFocusedMessageId(undefined);- }++ props.setFocusedMessageId(activeMessageId ?? undefined);});const isFocused = createSelector(props.focusedMessageId);@@ -313,6 +411,13 @@ export function MessageList(props: MessageListProps) {return out;});+ const [isPrepend, setIsPrepend] = createSignal(false);++ createEffect(() => {+ props.messages;+ setIsPrepend(true);+ });+createEffect(on(flattenedThreaded, (flat, prev) => {const oldFlat = prev;@@ -345,13 +450,15 @@ export function MessageList(props: MessageListProps) {if (currentView !== threadArr) {dirtyTypingThreadId = id;}- } else {- if (currentView !== threadArr) {- setViewThreads(id, reconcile(threadArr));- }- if (dirtyTypingThreadId === id) {- dirtyTypingThreadId = undefined;- }+ continue;+ }++ if (currentView !== threadArr) {+ setViewThreads(id, reconcile(threadArr));+ }++ if (dirtyTypingThreadId === id) {+ dirtyTypingThreadId = undefined;}}});@@ -373,26 +480,43 @@ export function MessageList(props: MessageListProps) {return currentTypingId;});- // Provide stable row models to VList so item instances are preserved across moves/insertions- type RowModel = {- id: string;- message: Message;- };+ const rows = mapArray(+ () => props.orderedMessages().toReversed(),+ (msg) => {+ return { id: msg.id, message: msg } as RowModel;+ }+ );- const rows = mapArray(props.orderedMessages, (msg) => {- return { id: msg.id, message: msg } as RowModel;+ createEffect(() => {+ rows();+ setIsPrepend(false);});+ const getScrollHint = () => {+ if (!hasUserScrolled()) return;+ const handle = virtualHandle();+ const list = props.orderedMessages();+ if (!handle || !list || list.length === 0) return;++ const endIndex = handle.findItemIndex(handle.scrollOffset);++ if (endIndex === undefined) return;++ const index = clamp(endIndex, 0, list.length - 1);+ const row = rows()[index];+ const label = toScrollHintDate(row?.message.created_at);++ return label;+ };+// Ensure thread view store store reflects drafts. Only sets when no entry exists to avoid overriding user actions.createEffect(() => {const base = filteredTopLevelMessages() ?? [];for (const message of base) {const hasDraft = !!loadDraftMessage(message.channel_id, message.id);- if (hasDraft && !threadViewStore[message.id]) {- setThreadViewStore(message.id, {- threadExpanded: true,- hasActiveReply: true,- });+ const threadDetails = listContext.getThreadState(message.id);+ if (hasDraft && threadDetails) {+ listContext.createReply(message.id);}}});@@ -405,13 +529,24 @@ export function MessageList(props: MessageListProps) {for (let i = 0; i < list.length; i++) {const msg = list[i];const next = list[i + 1];- const threadId = msg.thread_id ?? '';+ const threadId = msg.thread_id;++ if (!threadId) continue;++ const threadState = listContext.getThreadState(threadId);++ // Since orderedMessages is a flat list: if the next message' thread id is different OR+ // there is no next message, then this message is the last message in the thread+ const isLastInThread =+ (next && next.thread_id !== msg.thread_id) || !next;++ // We captured this thread reply but there was no message. The user might be+ // typing or want to type a reply+ const isLocallyFrozenWithEmptyMessage = !viewThreads[msg.id]?.length;+if (- (threadId &&- ((next && next.thread_id !== msg.thread_id) || !next) &&- threadViewStore[threadId]?.hasActiveReply) ||- (threadViewStore[msg.id]?.hasActiveReply &&- !viewThreads[msg.id]?.length)+ (isLastInThread && threadState?.hasActiveReply) ||+ (threadState?.hasActiveReply && isLocallyFrozenWithEmptyMessage)) {indices.push(i);}@@ -425,8 +560,7 @@ export function MessageList(props: MessageListProps) {if (!initialScrollComplete()) return true;const THRESHOLD = 100;- const distanceFromBottom =- handle.scrollSize - handle.scrollOffset - handle.viewportSize;+ const distanceFromBottom = handle.scrollOffset;return distanceFromBottom <= THRESHOLD;};@@ -463,7 +597,6 @@ export function MessageList(props: MessageListProps) {const [dismissUnviewedMessages, setDismissUnviewedMessages] =createSignal(false);const [dismissJumpToLatest, setDismissJumpToLatest] = createSignal(false);- const [newMessageIndex, setNewMessageIndex] = createSignal<number>();// Record new unviewed messages// TODO: show new reply state for threads with new messages@@ -501,19 +634,6 @@ export function MessageList(props: MessageListProps) {}));- // Record the index of the first unviewed message, to set a new new message indicator- createEffect(- on([unviewedMessages], () => {- if (unviewedMessages()?.length) {- setNewMessageIndex(- props- .orderedMessages()- ?.findIndex((m) => m.id === unviewedMessages()?.[0]?.id)- );- }- })- );-// TODO: do we want this?// Scroll to the bottom on new typing updates// createEffect(@@ -528,18 +648,6 @@ export function MessageList(props: MessageListProps) {const [size, setSize] = createSignal<DOMRect>();- // set scroll container ref on virtualizer updates- createEffect(- on([virtualHandle, listContainerRef], ([handle, listContainerRef]) => {- if (!handle || !listContainerRef) return;-- const scrollContainer = listContainerRef.querySelector(- '[data-channel-message-list]'- ) as HTMLDivElement | null;- setScrollContainerRef(scrollContainer ?? undefined);- })- );-createRenderEffect(on(props.targetMessage, (target) => {if (!target) return;@@ -548,53 +656,9 @@ export function MessageList(props: MessageListProps) {}));- // initial scroll- createRenderEffect(- on(- [virtualHandle, listContainerRef, props.orderedMessages],- // NOTE: ordered messages gets updated on initial load due to thread layout calculations- // so we need to keep scrolling down until it settles- ([handle, listContainerRef, orderedMessages]) => {- if (- !handle ||- !listContainerRef ||- !orderedMessages.length ||- initialScrollComplete()- )- return;-- scrollToBottomOrTarget({ forceBottom: true });- }- )- );-- const splitLayoutContext = useContext(SplitLayoutContext);- const manager = splitLayoutContext?.manager;- const splitCount = createMemo(() => manager?.splits().length ?? 0);-- // Due to channel data reconciliation, adding a new split will cause the virtualizer scroll state- // to unset. This effect will attempt to restore the scroll position. It is a reasonable approximation- // but will clamp to the end of the message so there can be a small shift.- createEffect((prev: number) => {- const newCount = splitCount();- const handle = untrack(virtualHandle);- if (handle && prev !== 0 && newCount > prev) {- const endIndex = handle.findItemIndex(- handle.scrollOffset + handle.viewportSize- );- queueMicrotask(() => {- handle.scrollToIndex(endIndex, {- align: 'end',- });- });- }- return newCount;- }, 0);-// Handle vlistscroll eventsconst handleScroll = () => {if (!initialScrollComplete()) return;- updateScrollHint();const nearBottom = checkIfNearBottom();setIsNearBottom(nearBottom);@@ -631,7 +695,7 @@ export function MessageList(props: MessageListProps) {.orderedMessages()?.findIndex((m) => m.id === messages[0].id);if (firstUnviewedIndex === undefined) return;- virtualHandle()?.scrollToIndex(firstUnviewedIndex, {+ virtualHandle()?.scrollToIndex(normalizeIndex(firstUnviewedIndex), {align: 'start',});}@@ -641,12 +705,6 @@ export function MessageList(props: MessageListProps) {() => !dismissUnviewedMessages() && !!unviewedMessages()?.length);- onCleanup(() => {- if (scrollHintTimeoutId) {- clearTimeout(scrollHintTimeoutId);- }- });-const markUserScrolled = () => {if (!hasUserScrolled()) {setHasUserScrolled(true);@@ -662,7 +720,17 @@ export function MessageList(props: MessageListProps) {><divclass="flex flex-col h-full relative"- ref={setListContainerRef}+ ref={(el) => {+ onMount(() => {+ const scrollContainer = el.querySelector(+ '[data-channel-message-list]'+ ) as HTMLDivElement | null;++ if (!scrollContainer) return;++ listContext.registerScrollContainer(scrollContainer);+ });+ }}onWheel={markUserScrolled}onTouchMove={markUserScrolled}onPointerDown={markUserScrolled}@@ -673,19 +741,27 @@ export function MessageList(props: MessageListProps) {<Switch fallback={<EmptyMessageList />}><Match when={props.messages.length > 0}><VList- ref={setVirtualHandle}+ ref={(handle) => {+ if (handle) {+ listContext.registerVirtualHandle(handle);+ }+ setVirtualHandle(handle);+ }}style={{- height: `${listHeight()}px`,+ 'max-height': `${listHeight()}px`,+ height: 'fit-content',contain: 'none','overflow-x': 'hidden','overflow-y': 'scroll','overflow-anchor': 'none',+ display: 'flex',+ 'flex-direction': 'column-reverse',}}class="scrollbar-hidden"- itemSize={BASE_ITEM_SIZE}data-channel-message-listdata={rows() ?? []}- bufferSize={10 * BASE_ITEM_SIZE}+ shift={isPrepend()}+ bufferSize={30 * BASE_ITEM_SIZE}keepMounted={keepMountedIndices()}onScroll={handleScroll}onScrollEnd={() => {@@ -696,10 +772,15 @@ export function MessageList(props: MessageListProps) {>{(row: { id: string; message: Message }, i) => {const isParentless = () => !row.message.thread_id;- const isThreadExpanded = createMemo(- () =>- threadViewStore[row.message.thread_id ?? '']?.threadExpanded- );+ const isThreadExpanded = createMemo(() => {+ if (!row.message.thread_id) return false;++ const state = listContext.getThreadState(+ row.message.thread_id+ );++ return state?.threadExpanded === true;+ });const isThreadIndexWithinCutoff = createMemo(() =>messageListContext[row.id].threadIndex !== -1 &&@@ -715,38 +796,26 @@ export function MessageList(props: MessageListProps) {virtualHandle()}>- {(handle) => (- <MessageContainer- message={row.message}- lastViewed={lastViewed}- newMessageIndex={newMessageIndex}- isFocused={isFocused(row.id)}- setFocusedMessageId={props.setFocusedMessageId}- index={i}- orderedMessages={props.orderedMessages}- threadSiblings={viewThreads[- row.message.thread_id ?? ''- ]?.filter(messageFilterFn)}- threadChildren={viewThreads[- row.message.id ?? ''- ]?.filter(messageFilterFn)}- threadViewStore={threadViewStore}- setThreadViewStore={setThreadViewStore}- threadInputAttachmentsStore={- threadInputAttachmentsStore- }- setThreadInputAttachmentsStore={- setThreadInputAttachmentsStore- }- newIndicatorShown={newIndicatorShown}- setNewIndicatorShown={setNewIndicatorShown}- virtualHandle={handle()}- container={containerRef()}- listContext={messageListContext[row.id]}- setLastMessageRef={props.setLastMessageRef}- isTarget={isActiveTargetMessage(row.message.id)}- />- )}+ <MessageContainer+ message={row.message}+ lastViewed={lastViewed}+ isFocused={isFocused(row.id)}+ index={() => normalizeIndex(i())}+ orderedMessages={props.orderedMessages}+ threadSiblings={viewThreads[+ row.message.thread_id ?? ''+ ]?.filter(messageFilterFn)}+ threadChildren={viewThreads[row.message.id ?? '']?.filter(+ messageFilterFn+ )}+ newIndicatorShown={newIndicatorShown}+ setNewIndicatorShown={setNewIndicatorShown}+ virtualHandle={virtualHandle()!}+ container={containerRef()}+ listContext={messageListContext[row.id]}+ setLastMessageRef={props.setLastMessageRef}+ isTarget={isActiveTargetMessage(row.message.id)}+ /></Show>);}}@@ -789,19 +858,15 @@ export function MessageList(props: MessageListProps) {/></Show><CustomScrollbar- scrollContainer={scrollContainerRef}- label={scrollHintLabel()}- showLabel={isScrollHintVisible()}+ reverse+ scrollContainer={listContext.scrollContainerRef}+ getLabel={getScrollHint}enabled={hasUserScrolled()}/></div><ReplyInputsPortalerchannelId={props.channelId}- orderedMessages={props.orderedMessages}- threadViewStore={threadViewStore}- setThreadViewStore={setThreadViewStore}threads={viewThreads}- virtualHandle={virtualHandle}threadInputAttachmentsStore={threadInputAttachmentsStore}setThreadInputAttachmentsStore={setThreadInputAttachmentsStore}setLocalTypingThreadId={setLocalTypingThreadId}diff --git a/js/app/packages/block-channel/component/ReplyInputsPortaler.tsx b/js/app/packages/block-channel/component/ReplyInputsPortaler.tsxindex b08a1e9a5b..89519a5a2f 100644--- a/js/app/packages/block-channel/component/ReplyInputsPortaler.tsx+++ b/js/app/packages/block-channel/component/ReplyInputsPortaler.tsx@@ -1,3 +1,4 @@+import { useMessageListContext } from '@block-channel/component/MessageList/MessageList';import {channelStore,type SendMessageArgs,@@ -5,7 +6,6 @@ import {} from '@block-channel/signal/channel';import type { ThreadStoreData } from '@block-channel/signal/threads';import { postTypingUpdate } from '@block-channel/signal/typing';-import type { ThreadViewData } from '@block-channel/type/threadView';import {clearDraftMessage,loadDraftMessage,@@ -14,10 +14,8 @@ import {import { blockElementSignal } from '@core/signal/blockElement';import type { InputAttachment } from '@core/store/cacheChannelInput';import { channelParticipantInfo } from '@core/user/util';-import type { Message } from '@service-comms/generated/models';import { createCallback } from '@solid-primitives/rootless';import {- type Accessor,createEffect,createMemo,createSignal,@@ -26,16 +24,11 @@ import {} from 'solid-js';import type { SetStoreFunction } from 'solid-js/store';import { Portal } from 'solid-js/web';-import type { VirtualizerHandle } from 'virtua/solid';import { BaseInput } from './BaseInput';export type ReplyInputsPortalerProps = {channelId: string;- orderedMessages: Accessor<Message[]>;- threadViewStore: ThreadViewData;- setThreadViewStore: SetStoreFunction<ThreadViewData>;threads: ThreadStoreData;- virtualHandle: Accessor<VirtualizerHandle | undefined>;threadInputAttachmentsStore: Record<string, InputAttachment[]>;setThreadInputAttachmentsStore: SetStoreFunction<Record<string, InputAttachment[]>@@ -44,6 +37,7 @@ export type ReplyInputsPortalerProps = {};export function ReplyInputsPortaler(props: ReplyInputsPortalerProps) {+ const listContext = useMessageListContext();const sendMessage = useSendChannelMessageAction();const postTypingUpdate_ = createCallback(postTypingUpdate);@@ -65,7 +59,7 @@ export function ReplyInputsPortaler(props: ReplyInputsPortalerProps) {// flattened list.// Use a timeout to ensure the new message mounts in the DOM first.setTimeout(() => {- const list = props.orderedMessages() ?? [];+ const list = listContext.orderedMessages() ?? [];const lastMessageInThreadId = props.threads[threadId]?.at(-1)?.id;const currentIdx = list.findIndex((m) => m.id === lastMessageInThreadId);const targetIndex = currentIdx >= 0 ? currentIdx + 1 : -1;@@ -74,7 +68,7 @@ export function ReplyInputsPortaler(props: ReplyInputsPortalerProps) {if (!targetMessageId) return;// Ensure it's scrolled into view in the virtual list- props.virtualHandle()?.scrollToIndex(targetIndex, { align: 'nearest' });+ listContext.scrollToIndex(targetIndex, { align: 'nearest' });// Then focus the element once mountedsetTimeout(() => {@@ -87,31 +81,18 @@ export function ReplyInputsPortaler(props: ReplyInputsPortalerProps) {};const onAfterSend = (threadId: string) => () => {- props.setThreadViewStore(threadId, (prev) =>- prev- ? { ...prev, threadExpanded: true, hasActiveReply: false }- : { threadExpanded: true, hasActiveReply: false }- );- props.setThreadViewStore(threadId, (prev) =>- prev- ? { ...prev, threadExpanded: true, hasActiveReply: false }- : { threadExpanded: true, hasActiveReply: false }- );+ listContext.clearThreadFocus(threadId, true);};const onEmptyBlur = (threadId: string) => () => {clearDraftMessage(props.channelId, threadId);- props.setThreadViewStore(threadId, (prev) =>- prev- ? { ...prev, threadExpanded: true, hasActiveReply: false }- : { threadExpanded: true, hasActiveReply: false }- );+ listContext.clearThreadFocus(threadId, true);};const onFocusLeaveStart = (e: KeyboardEvent, threadId: string) => {e.preventDefault();e.stopPropagation();- const orderedMessages = props+ const orderedMessages = listContext.orderedMessages().filter((item) => item.thread_id === threadId);if (!orderedMessages.length) return;@@ -126,39 +107,31 @@ export function ReplyInputsPortaler(props: ReplyInputsPortalerProps) {let replyFocusTimeout: ReturnType<typeof setTimeout> | undefined;return (- <For- each={Object.keys(props.threadViewStore).filter(- (threadId) => props.threadViewStore[threadId].hasActiveReply- )}- >+ <For each={listContext.getThreadsWithActiveReplies()}>{(threadId) => {+ const threadState = createMemo(() =>+ listContext.getThreadState(threadId)+ );// This create effect maintains focus on reply inputs when the mount target changes due to new messages in the thread coming in// TODO: this should only fire if this reply input was focusedcreateEffect((prev) => {+ const state = threadState();if (focusedReplyInputThreadId() === threadId &&- props.threadViewStore[threadId].replyInputMountTarget &&+ state?.replyInputMountTarget &&prev &&- prev !== props.threadViewStore[threadId].replyInputMountTarget+ prev !== state?.replyInputMountTarget) {- props.setThreadViewStore(threadId, (prev) => ({- ...prev,- replyInputShouldFocus: true,- }));+ listContext.toggleReplyInputFocus(threadId, true);}- return props.threadViewStore[threadId].replyInputMountTarget;+ return state?.replyInputMountTarget;});return (- <Portal- mount={- props.threadViewStore[threadId].replyInputMountTarget ??- document.body- }- >+ <Portal mount={threadState()?.replyInputMountTarget ?? document.body}><divclassList={{'fixed top-0 left-0 width-[1px] height-[1px] overflow-hidden opacity-0 pointer-events-none':- !props.threadViewStore[threadId].replyInputMountTarget,+ !threadState()?.replyInputMountTarget,}}><BaseInput@@ -166,14 +139,9 @@ export function ReplyInputsPortaler(props: ReplyInputsPortalerProps) {afterSend={onAfterSend(threadId)}placeholder={`Send a reply`}autoFocusOnMount={false}- shouldFocus={- props.threadViewStore[threadId].replyInputShouldFocus- }+ shouldFocus={threadState()?.replyInputShouldFocus}clearShouldFocus={() =>- props.setThreadViewStore(threadId, (prev) => ({- ...prev,- replyInputShouldFocus: false,- }))+ listContext.toggleReplyInputFocus(threadId, false)}onFocus={() => {if (replyFocusTimeout) clearTimeout(replyFocusTimeout);diff --git a/js/app/packages/core/component/CustomScrollbar.tsx b/js/app/packages/core/component/CustomScrollbar.tsxindex 7a30c7b1a0..4eff5af084 100644--- a/js/app/packages/core/component/CustomScrollbar.tsx+++ b/js/app/packages/core/component/CustomScrollbar.tsx@@ -1,12 +1,15 @@+import { debounce } from '@solid-primitives/scheduled';import { createEffect, createSignal, onCleanup, Show } from 'solid-js';interface CustomScrollbarProps {scrollContainer: () => HTMLElement | undefined;class?: string;- label?: string;- showLabel?: boolean;+ getLabel?: (offset: number) => string | undefined;+ /** How long a label is visible for. Set to `Infinity` to keep the label visible at all times * */+ labelVisibilityDebounceMs?: number;labelClass?: string;enabled?: boolean;+ reverse?: boolean;}export function CustomScrollbar(props: CustomScrollbarProps) {@@ -25,6 +28,16 @@ function InnerCustomScrollbar(props: CustomScrollbarProps) {const [scrollStartTop, setScrollStartTop] = createSignal(0);const [scrollVelocity, setScrollVelocity] = createSignal(0);const [isHovering, setIsHovering] = createSignal(false);++ const [scrollLabelVisible, setScrollLabelVisible] = createSignal(+ props.labelVisibilityDebounceMs === Infinity+ );++ const debouncedHideScrollLabel = debounce(+ () => setScrollLabelVisible(false),+ props.labelVisibilityDebounceMs ?? 300+ );+let lastScrollTop = 0;let lastScrollTime = Date.now();let velocityTimeoutId: ReturnType<typeof setTimeout> | undefined;@@ -33,26 +46,42 @@ function InnerCustomScrollbar(props: CustomScrollbarProps) {const container = props.scrollContainer();if (!container) return;- setScrollTop(container.scrollTop);- setScrollHeight(container.scrollHeight);- setClientHeight(container.clientHeight);+ const { scrollTop, scrollHeight, clientHeight } = container;++ setScrollTop(scrollTop);+ setScrollHeight(scrollHeight);+ setClientHeight(clientHeight);};// Calculate scrollbar metrics- const thumbHeight = () => {+ function thumbHeight() {const containerHeight = clientHeight();const contentHeight = scrollHeight();if (contentHeight <= containerHeight) return 0;return Math.max(20, (containerHeight / contentHeight) * containerHeight);- };+ }const thumbTop = () => {const containerHeight = clientHeight();const contentHeight = scrollHeight();- const maxScroll = contentHeight - containerHeight;++ let maxScroll = contentHeight;++ if (!props.reverse) {+ maxScroll -= containerHeight;+ }+if (maxScroll <= 0) return 0;const thumbH = thumbHeight();- return (scrollTop() / maxScroll) * (containerHeight - thumbH);++ // scrollTop is negative when reversed so adding to scrollHeight will+ // set the scrollTop to be the total scrollable space - the current scroll position+ const scrollOffset = props.reverse+ ? scrollTop() + scrollHeight()+ : scrollTop();++ return (scrollOffset / maxScroll) * (containerHeight - thumbH);};+const isVisible = () => scrollHeight() > clientHeight();// Handle scroll events@@ -78,6 +107,11 @@ function InnerCustomScrollbar(props: CustomScrollbarProps) {setScrollVelocity(velocity);+ if (props.labelVisibilityDebounceMs !== Infinity) {+ setScrollLabelVisible(true);+ debouncedHideScrollLabel();+ }+// Gradually reduce velocity - slower fade outif (velocityTimeoutId) clearTimeout(velocityTimeoutId);velocityTimeoutId = setTimeout(() => {@@ -114,7 +148,11 @@ function InnerCustomScrollbar(props: CustomScrollbarProps) {if (!container) return;setIsDragging(true);- setScrollStartTop(container.scrollTop);+ setScrollStartTop(+ props.reverse+ ? container.scrollHeight + container.scrollTop+ : container.scrollTop+ );let isDraggingLocal = true;const handleMouseMove = (moveEvent: MouseEvent) => {@@ -123,15 +161,25 @@ function InnerCustomScrollbar(props: CustomScrollbarProps) {const deltaY = moveEvent.clientY - e.clientY;const trackH = clientHeight();const contentHeight = scrollHeight();- const maxScroll = contentHeight - trackH;++ let maxScroll = contentHeight;++ if (!props.reverse) {+ maxScroll -= trackH;+ }+const thumbH = thumbHeight();const scrollRatio = deltaY / (trackH - thumbH);- const newScrollTop = Math.max(+ let newScrollTop = Math.max(0,Math.min(maxScroll, scrollStartTop() + scrollRatio * maxScroll));+ if (props.reverse) {+ newScrollTop = newScrollTop - contentHeight;+ }+container.scrollTop = newScrollTop;setScrollTop(newScrollTop);};@@ -156,18 +204,45 @@ function InnerCustomScrollbar(props: CustomScrollbarProps) {const clickY = e.clientY - rect.top;const trackH = clientHeight();const contentHeight = scrollHeight();- const maxScroll = contentHeight - trackH;+ let maxScroll = contentHeight;++ if (!props.reverse) {+ maxScroll -= trackH;+ }const scrollRatio = clickY / trackH;- const newScrollTop = Math.max(+ let newScrollTop = Math.max(0,Math.min(maxScroll, scrollRatio * maxScroll));+ if (props.reverse) {+ newScrollTop = newScrollTop - contentHeight;+ }+container.scrollTop = newScrollTop;setScrollTop(newScrollTop);};+ const getThumbOpacity = () => {+ if (isDragging()) return 1;+ if (isHovering()) return 0.8;+ const vel = scrollVelocity();+ if (vel === 0) return 0;+ // Normalize velocity (0-5px/ms is typical fast scroll)+ const normalizedVel = Math.min(vel / 5, 1);+ return normalizedVel;+ };++ const getThumbTransform = () => {+ if (isDragging()) return 'scaleX(1.6)';+ const vel = scrollVelocity();+ if (vel === 0) return 'scaleX(1)';+ // Scale more aggressively with velocity - up to 2x width at high speeds+ const normalizedVel = Math.min(vel / 5, 1);+ return `scaleX(${1 + normalizedVel * 1.0})`;+ };+return (<Show when={isVisible()}><div@@ -189,36 +264,23 @@ function InnerCustomScrollbar(props: CustomScrollbarProps) {width: '1px','background-color': 'var(--color-accent)','transform-origin': 'right center',- opacity: (() => {- if (isDragging()) return 1;- if (isHovering()) return 0.8;- const vel = scrollVelocity();- if (vel === 0) return 0;- // Normalize velocity (0-5px/ms is typical fast scroll)- const normalizedVel = Math.min(vel / 5, 1);- return normalizedVel;- })(),- transform: (() => {- if (isDragging()) return 'scaleX(1.6)';- const vel = scrollVelocity();- if (vel === 0) return 'scaleX(1)';- // Scale more aggressively with velocity - up to 2x width at high speeds- const normalizedVel = Math.min(vel / 5, 1);- return `scaleX(${1 + normalizedVel * 1.0})`;- })(),+ opacity: getThumbOpacity(),+ transform: getThumbTransform(),'transition-property': 'opacity, transform',}}onMouseDown={handleMouseDown}/>- <Show when={props.label}>+ <Show when={props.getLabel}><divclass={`absolute right-[calc(100%+8px)] -translate-y-1/2 whitespace-nowrap font-mono text-sm text-accent pointer-events-none select-none drop-shadow transition-opacity duration-200 ease-out ${props.labelClass || ''}`}style={{top: `${thumbTop() + thumbHeight() / 2}px`,- opacity: props.showLabel ? 1 : 0,+ opacity: scrollLabelVisible() ? 1 : 0,}}>- {props.label}+ {props.getLabel?.(+ props.reverse ? scrollTop() + scrollHeight() : scrollTop()+ )}</div></Show></div>diff --git a/js/app/patches/[email protected] b/js/app/patches/[email protected]index e3fe9a6b3c..364807de1d 100644--- a/js/app/patches/[email protected]+++ b/js/app/patches/[email protected]@@ -1,3 +1,17 @@+diff --git a/node_modules/virtua/.bun-tag-172fdc1cd9f249d3 b/.bun-tag-172fdc1cd9f249d3+new file mode 100644+index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391+diff --git a/node_modules/virtua/.bun-tag-69ffcae45e968edb b/.bun-tag-69ffcae45e968edb+new file mode 100644+index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391+diff --git a/node_modules/virtua/.bun-tag-dc314e50881f3a5e b/.bun-tag-dc314e50881f3a5e+new file mode 100644+index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391+diff --git a/node_modules/virtua/.bun-tag-eeedd702ea82f0a5 b/.bun-tag-eeedd702ea82f0a5+new file mode 100644+index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391+=======+>>>>>>> 37a2487dd5f6dec4ad4a0aa297dc057159d90255diff --git a/lib/solid/index.jsx b/lib/solid/index.jsxindex 84788e713100b0e5a746bae3411a789002b42b8d..a62faf6f759e654aea303717fd18f9767428f7be 100644--- a/lib/solid/index.jsx