From 719828958b2483a4dd37a62706136c102a91d554 Mon Sep 17 00:00:00 2001 From: David Hill Date: Wed, 11 Mar 2026 16:46:25 +0000 Subject: [PATCH] revert(app): remove shared link button in session header Drop the inline share-url copy icon next to session context, returning the session header controls to context + options only. --- .../src/pages/session/message-timeline.tsx | 84 +------------------ 1 file changed, 2 insertions(+), 82 deletions(-) diff --git a/packages/app/src/pages/session/message-timeline.tsx b/packages/app/src/pages/session/message-timeline.tsx index 41d99da96d..aa540e6a93 100644 --- a/packages/app/src/pages/session/message-timeline.tsx +++ b/packages/app/src/pages/session/message-timeline.tsx @@ -17,7 +17,6 @@ import { showToast } from "@opencode-ai/ui/toast" import { Binary } from "@opencode-ai/util/binary" import { getFilename } from "@opencode-ai/util/path" import { Popover as KobaltePopover } from "@kobalte/core/popover" -import { Tooltip } from "@opencode-ai/ui/tooltip" import { shouldMarkBoundaryGesture, normalizeWheelDelta } from "@/pages/session/message-gesture" import { SessionContextUsage } from "@/components/session-context-usage" import { useDialog } from "@opencode-ai/ui/context/dialog" @@ -301,7 +300,6 @@ export function MessageTimeline(props: { const titleValue = createMemo(() => info()?.title) const shareUrl = createMemo(() => info()?.share?.url) const shareEnabled = createMemo(() => sync.data.config.share !== "disabled") - const shared = createMemo(() => shareEnabled() && !!shareUrl()) const parentID = createMemo(() => info()?.parentID) const showHeader = createMemo(() => !!(titleValue() || parentID())) const stageCfg = { init: 1, batch: 3 } @@ -327,11 +325,6 @@ export function MessageTimeline(props: { dismiss: null as "escape" | "outside" | null, }) - const [clip, setClip] = createStore({ - ok: false, - timer: undefined as number | undefined, - }) - let more: HTMLButtonElement | undefined const [req, setReq] = createStore({ share: false, unshare: false }) @@ -372,42 +365,6 @@ export function MessageTimeline(props: { platform.openLink(url) } - createEffect(() => { - const url = shareUrl() - if (url) return - if (clip.timer) window.clearTimeout(clip.timer) - setClip({ ok: false, timer: undefined }) - }) - - onCleanup(() => { - if (!clip.timer) return - window.clearTimeout(clip.timer) - }) - - const copy = () => { - const url = shareUrl() - if (!url) return - navigator.clipboard - .writeText(url) - .then(() => { - if (clip.timer) window.clearTimeout(clip.timer) - setClip("ok", true) - setClip( - "timer", - window.setTimeout(() => { - setClip({ ok: false, timer: undefined }) - }, 3000), - ) - }) - .catch((err: unknown) => - showToast({ - variant: "error", - title: language.t("common.requestFailed"), - description: err instanceof Error ? err.message : String(err), - }), - ) - } - const errorMessage = (err: unknown) => { if (err && typeof err === "object" && "data" in err) { const data = (err as { data?: { message?: string } }).data @@ -771,45 +728,8 @@ export function MessageTimeline(props: { {(id) => ( -
-
- -
-
-
- - - -
-
+
+