From d2ba379b4fff603308bf2ab2ec6e94d96a3e3fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E4=BF=8A=E5=AE=87?= Date: Thu, 30 Apr 2026 14:55:35 +0800 Subject: [PATCH] fix(share): render all turns as scrollable list instead of single-turn + nav Desktop share page previously showed one turn at a time with MessageNav sidebar navigation. The turns() scrollable list view already existed for mobile but was gated behind a responsive tab. This change replaces the desktop MessageNav + single SessionTurn layout with the scrollable For-each loop, showing all conversation turns in one continuous scroll. This matches the standard UX pattern of most chat applications. Changes: - Remove MessageNav import and usage - Remove store/activeMessage/setActiveMessage state management - Replace single SessionTurn with - provider/modelID now references firstUserMessage() directly --- .../enterprise/src/routes/share/[shareID].tsx | 63 +++++++------------ 1 file changed, 23 insertions(+), 40 deletions(-) diff --git a/packages/enterprise/src/routes/share/[shareID].tsx b/packages/enterprise/src/routes/share/[shareID].tsx index b12afce27aef..161fd7967026 100644 --- a/packages/enterprise/src/routes/share/[shareID].tsx +++ b/packages/enterprise/src/routes/share/[shareID].tsx @@ -14,11 +14,11 @@ import { iife } from "@opencode-ai/core/util/iife" import { Binary } from "@opencode-ai/core/util/binary" import { NamedError } from "@opencode-ai/core/util/error" import { DateTime } from "luxon" -import { createStore } from "solid-js/store" + import z from "zod" import NotFound from "../[...404]" import { Tabs } from "@opencode-ai/ui/tabs" -import { MessageNav } from "@opencode-ai/ui/message-nav" + import { FileSSR } from "@opencode-ai/ui/file-ssr" import { clientOnly } from "@solidjs/start" import { Meta, Title } from "@solidjs/meta" @@ -180,9 +180,6 @@ export default function () { {iife(() => { - const [store, setStore] = createStore({ - messageId: undefined as string | undefined, - }) const messages = createMemo(() => data().sessionID ? (data().message[data().sessionID]?.filter((m) => m.role === "user") ?? []).sort( @@ -191,18 +188,8 @@ export default function () { : [], ) const firstUserMessage = createMemo(() => messages().at(0)) - const activeMessage = createMemo( - () => messages().find((m) => m.id === store.messageId) ?? firstUserMessage(), - ) - function setActiveMessage(message: UserMessage | undefined) { - if (message) { - setStore("messageId", message.id) - } else { - setStore("messageId", undefined) - } - } - const provider = createMemo(() => activeMessage()?.model?.providerID) - const modelID = createMemo(() => activeMessage()?.model?.modelID) + const provider = createMemo(() => firstUserMessage()?.model?.providerID) + const modelID = createMemo(() => firstUserMessage()?.model?.modelID) const model = createMemo(() => data().model[data().sessionID]?.find((m) => m.id === modelID())) const diffs = createMemo(() => data().session_diff[data().sessionID] ?? []) const [diffStyle, setDiffStyle] = createSignal<"unified" | "split">("unified") @@ -301,29 +288,25 @@ export default function () { > {title()} -
- 1}> - - - -
- -
-
+
+
+ + {(message) => ( + + )} + +
+
+ +
0}>