This is an automated email from the ASF dual-hosted git repository.

imbajin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hugegraph-toolchain.git

commit 34ef393aa05d7154c1e79284f621443e666d69b4
Author: dark <[email protected]>
AuthorDate: Fri Aug 14 12:39:02 2026 +0800

    fix(operations): improve node detail feedback
---
 hugegraph-hubble/hubble-fe/src/pages/Graph/index.module.scss   |  5 +++++
 hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.js  | 10 +++++++---
 .../hubble-fe/src/pages/Operations/NodeDetail.test.js          |  3 +--
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/hugegraph-hubble/hubble-fe/src/pages/Graph/index.module.scss 
b/hugegraph-hubble/hubble-fe/src/pages/Graph/index.module.scss
index 6c5c6df8f..e4f558218 100644
--- a/hugegraph-hubble/hubble-fe/src/pages/Graph/index.module.scss
+++ b/hugegraph-hubble/hubble-fe/src/pages/Graph/index.module.scss
@@ -44,6 +44,11 @@ div.add_card {
     .card_content {
         padding-top: 1px;
         height: 154px;
+
+        &:focus-visible {
+            outline: 2px solid #1890ff;
+            outline-offset: -2px;
+        }
     }
     &:hover {
         border-color: #1890ff;
diff --git a/hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.js 
b/hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.js
index 530f78b2e..bfd05d91b 100644
--- a/hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.js
+++ b/hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.js
@@ -19,7 +19,7 @@
 import {Alert, Button, Descriptions, Progress, Skeleton, Space, Statistic} 
from 'antd';
 import {ArrowLeftOutlined} from '@ant-design/icons';
 import {useCallback, useEffect, useRef, useState} from 'react';
-import {useNavigate, useParams} from 'react-router-dom';
+import {useLocation, useNavigate, useParams} from 'react-router-dom';
 import {useTranslation} from 'react-i18next';
 import {getNode} from '../../api/operations';
 import {isPdEnabled} from '../../utils/config';
@@ -31,6 +31,7 @@ import {
     TierIcon,
 } from './components';
 import {formatMetricValue, formatObservedAt} from './topology';
+import {operationsReturnTo} from './navigation';
 import './operations.scss';
 
 const GROUPS_BY_TYPE = {
@@ -409,6 +410,7 @@ const NodeDetail = () => {
     const pdMode = isPdEnabled();
     const {nodeId} = useParams();
     const navigate = useNavigate();
+    const location = useLocation();
     const [data, setData] = useState(null);
     const [loading, setLoading] = useState(true);
     const [error, setError] = useState(null);
@@ -442,7 +444,9 @@ const NodeDetail = () => {
     useEffect(() => {
         load(false);
     }, [load]);
-    const back = useCallback(() => navigate(-1), [navigate]);
+    const back = useCallback(() => {
+        navigate(operationsReturnTo(location), {replace: true});
+    }, [location, navigate]);
     const refresh = useCallback(() => load(true), [load]);
 
     if (loading && !data) {
@@ -460,7 +464,7 @@ const NodeDetail = () => {
                     message={t('operations.node_unavailable')}
                     action={(
                         <Space>
-                            <Button href='/operations/nodes' size='small'>
+                            <Button size='small' onClick={back}>
                                 {t('operations.back_to_nodes')}
                             </Button>
                             <Button size='small' type='primary' 
onClick={refresh}>
diff --git a/hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.test.js 
b/hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.test.js
index a0b3fc8ce..ab0f63b9c 100644
--- a/hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.test.js
+++ b/hugegraph-hubble/hubble-fe/src/pages/Operations/NodeDetail.test.js
@@ -225,8 +225,7 @@ test('recovers an initial node failure and keeps a 
canonical node-list action',
     renderDetail();
 
     expect(await screen.findByRole('alert')).toBeInTheDocument();
-    expect(screen.getByRole('link', {name: /Back to nodes/i}))
-        .toHaveAttribute('href', '/operations/nodes');
+    expect(screen.getByRole('button', {name: /Back to nodes/i})).toBeEnabled();
 
     fireEvent.click(screen.getByRole('button', {name: /Retry/i}));
 

Reply via email to