From 6df86a77cb5cb05eab1200dbe7dec02520becb81 Mon Sep 17 00:00:00 2001 From: onyekachi66 Date: Wed, 26 Aug 2026 11:36:00 +0100 Subject: [PATCH 1/2] Fix focus trap: focus textarea on open and restore focus on close --- src/components/ChatSidebar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ChatSidebar.tsx b/src/components/ChatSidebar.tsx index 208ebb1..ac98424 100644 --- a/src/components/ChatSidebar.tsx +++ b/src/components/ChatSidebar.tsx @@ -160,6 +160,7 @@ export function ChatSidebar({ showNewsRibbon = true }: ChatSidebarProps) { useFocusTrap(sidebarRef, { active: isMobileOpen, onEscape: () => setIsMobileOpen(false), + initialFocusRef: textareaRef, restoreFocusRef: mobileToggleRef, }); From d8a5f684173be78f7843767f6b942552e45aebb0 Mon Sep 17 00:00:00 2001 From: onyekachi66 Date: Wed, 26 Aug 2026 12:11:57 +0100 Subject: [PATCH 2/2] feat: offer copy tx hash and toast on successful prediction --- src/components/TxStatusTimeline.tsx | 37 ++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/src/components/TxStatusTimeline.tsx b/src/components/TxStatusTimeline.tsx index d11ecbc..70f06b9 100644 --- a/src/components/TxStatusTimeline.tsx +++ b/src/components/TxStatusTimeline.tsx @@ -1,5 +1,6 @@ /* eslint-disable react-refresh/only-export-components -- shared status-machine module (component + hook) */ import { Fragment, useCallback, useRef, useState } from 'react'; +import { toast } from 'sonner'; import { cn } from '../lib/utils'; /** @@ -220,6 +221,20 @@ export default function TxStatusTimeline({ const displayHash = txHash ? formatTxHash(txHash) : ''; const href = explorerUrl ?? `https://stellarexpert.org/tx/${txHash ?? ''}`; + const handleCopy = async () => { + if (!txHash) return; + if (window.isSecureContext && navigator.clipboard) { + try { + await navigator.clipboard.writeText(txHash); + toast.success('Transaction hash copied to clipboard'); + } catch (err) { + toast.error('Failed to copy transaction hash'); + } + } else { + toast.error('Clipboard access is restricted in this environment'); + } + }; + return (
@@ -230,12 +245,22 @@ export default function TxStatusTimeline({ {successMessage ?? 'Your transaction has been successfully written on-chain.'}

{displayHash && ( - - Tx: {displayHash} - +
+ + Tx: {displayHash} + + +
)}
{txHash && (