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

zqr10159 pushed a commit to branch 2.0.0
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git

commit b8f13bffe9c2314adabc4347405a09dd7bf337f3
Author: Logic <[email protected]>
AuthorDate: Sun May 31 08:30:10 2026 +0800

    fix(web-next): dedupe topology focus filters
---
 web-next/app/topology/page.test.tsx               | 5 ++++-
 web-next/app/ui-lab/page.test.tsx                 | 3 +++
 web-next/packages/hertzbeat-ui/src/index.test.tsx | 6 +++++-
 web-next/packages/hertzbeat-ui/src/index.tsx      | 9 ++++++---
 4 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/web-next/app/topology/page.test.tsx 
b/web-next/app/topology/page.test.tsx
index 7ba725afc8..c15758cea4 100644
--- a/web-next/app/topology/page.test.tsx
+++ b/web-next/app/topology/page.test.tsx
@@ -561,10 +561,13 @@ describe('topology page', () => {
     
expect(html).toContain('data-hz-topology-focus-trail-position-contract="document-flow"');
     expect(html).toContain('data-hz-topology-focus-trail-priority="canvas"');
     
expect(html).toContain('data-hz-topology-focus-trail-alignment="shared-control-grid"');
-    expect(html).toContain('data-hz-topology-focus-trail-inset="16px"');
+    expect(html).toContain('data-hz-topology-focus-trail-inset="0px"');
     
expect(html).toContain('data-hz-topology-focus-trail-control-height="28px"');
     
expect(html).toContain('data-hz-topology-focus-trail-visual-weight="low-interruption"');
     
expect(html).toContain('data-hz-topology-focus-trail-visual-weight-owner="hertzbeat-ui-focus-trail-visual-weight"');
+    
expect(html).toContain('data-hz-topology-focus-filter-visibility="assistive"');
+    
expect(html).toContain('data-hz-topology-focus-filter-visibility-owner="hertzbeat-ui-focus-trail-filter-visibility"');
+    
expect(html).toContain('data-hz-topology-focus-filter-deduped-by="topology-toolbar"');
     expect(html).toContain('data-hz-topology-focus-trail-chrome="frameless"');
     expect(html).toContain('data-hz-topology-focus-trail-frame="none"');
     
expect(html).toContain('data-topology-focus-trail-compactness="graph-dock"');
diff --git a/web-next/app/ui-lab/page.test.tsx 
b/web-next/app/ui-lab/page.test.tsx
index 09959b54d8..dbe95c950a 100644
--- a/web-next/app/ui-lab/page.test.tsx
+++ b/web-next/app/ui-lab/page.test.tsx
@@ -2249,6 +2249,9 @@ describe('HertzBeat UI lab page', () => {
     
expect(html).toContain('data-hz-topology-focus-crumb-label-owner="hertzbeat-ui-focus-trail-crumb-label"');
     
expect(html).toContain('data-hz-topology-focus-crumb-value-owner="hertzbeat-ui-focus-trail-crumb-value"');
     
expect(html).toContain('data-hz-topology-focus-filters-owner="hertzbeat-ui-focus-trail-filters"');
+    
expect(html).toContain('data-hz-topology-focus-filter-visibility="assistive"');
+    
expect(html).toContain('data-hz-topology-focus-filter-visibility-owner="hertzbeat-ui-focus-trail-filter-visibility"');
+    
expect(html).toContain('data-hz-topology-focus-filter-deduped-by="topology-toolbar"');
     expect(html).toContain('data-hz-topology-focus-filter="environment"');
     expect(html).toContain('data-hz-topology-focus-filter="source"');
     
expect(html).toContain('data-hz-topology-focus-filter-owner="hertzbeat-ui-focus-trail-filter"');
diff --git a/web-next/packages/hertzbeat-ui/src/index.test.tsx 
b/web-next/packages/hertzbeat-ui/src/index.test.tsx
index 8747e1a6ad..f75ebf9007 100644
--- a/web-next/packages/hertzbeat-ui/src/index.test.tsx
+++ b/web-next/packages/hertzbeat-ui/src/index.test.tsx
@@ -5739,10 +5739,14 @@ describe('@hertzbeat/ui', () => {
     
expect(html).toContain('data-hz-topology-focus-trail-position-contract="document-flow"');
     expect(html).toContain('data-hz-topology-focus-trail-priority="canvas"');
     
expect(html).toContain('data-hz-topology-focus-trail-alignment="shared-control-grid"');
-    expect(html).toContain('data-hz-topology-focus-trail-inset="16px"');
+    expect(html).toContain('data-hz-topology-focus-trail-inset="0px"');
     
expect(html).toContain('data-hz-topology-focus-trail-control-height="28px"');
     
expect(html).toContain('data-hz-topology-focus-trail-visual-weight="low-interruption"');
     
expect(html).toContain('data-hz-topology-focus-trail-visual-weight-owner="hertzbeat-ui-focus-trail-visual-weight"');
+    
expect(html).toContain('data-hz-topology-focus-filter-visibility="assistive"');
+    
expect(html).toContain('data-hz-topology-focus-filter-visibility-owner="hertzbeat-ui-focus-trail-filter-visibility"');
+    
expect(html).toContain('data-hz-topology-focus-filter-deduped-by="topology-toolbar"');
+    expect(html).toContain('sr-only');
     expect(html).toContain('py-1');
     expect(html).toContain('h-6');
     expect(html).not.toContain('absolute');
diff --git a/web-next/packages/hertzbeat-ui/src/index.tsx 
b/web-next/packages/hertzbeat-ui/src/index.tsx
index 93e6dde149..91225227d0 100644
--- a/web-next/packages/hertzbeat-ui/src/index.tsx
+++ b/web-next/packages/hertzbeat-ui/src/index.tsx
@@ -11843,7 +11843,7 @@ export function HzTopologyFocusTrail({
             ? 'flex min-w-0 flex-wrap items-center gap-1.5 
bg-[var(--hz-ui-surface)] text-[12px]'
             : 'grid min-w-0 gap-2 bg-[var(--hz-ui-surface)] text-[12px] 
lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center',
         isGraphDock && boundary === 'section'
-          ? 'border-t border-[var(--hz-ui-line-soft)] px-4 py-1'
+          ? 'border-t border-[var(--hz-ui-line-soft)] py-1'
           : isRail && boundary === 'section'
           ? 'border-t border-[var(--hz-ui-line-soft)] px-3 py-1'
           : topologyFocusTrailBoundaryClassName[boundary],
@@ -11864,7 +11864,7 @@ export function HzTopologyFocusTrail({
       data-hz-topology-focus-trail-position-contract={isGraphDock ? 
'document-flow' : undefined}
       data-hz-topology-focus-trail-priority={isGraphDock ? 'canvas' : 
undefined}
       data-hz-topology-focus-trail-alignment={isGraphDock ? 
'shared-control-grid' : undefined}
-      data-hz-topology-focus-trail-inset={isGraphDock ? '16px' : undefined}
+      data-hz-topology-focus-trail-inset={isGraphDock ? '0px' : undefined}
       data-hz-topology-focus-trail-control-height={isGraphDock ? '28px' : 
undefined}
       data-hz-topology-focus-trail-visual-weight={isGraphDock ? 
'low-interruption' : undefined}
       data-hz-topology-focus-trail-visual-weight-owner={isGraphDock ? 
'hertzbeat-ui-focus-trail-visual-weight' : undefined}
@@ -11934,9 +11934,12 @@ export function HzTopologyFocusTrail({
           <div
             className={cn(
               'flex min-w-0 items-center gap-1 overflow-x-auto',
-              isGraphDock ? 'flex-nowrap' : isRail ? 'flex-wrap 
overflow-x-visible' : 'flex-nowrap'
+              isGraphDock ? 'sr-only flex-nowrap' : isRail ? 'flex-wrap 
overflow-x-visible' : 'flex-nowrap'
             )}
             
data-hz-topology-focus-filters-owner="hertzbeat-ui-focus-trail-filters"
+            data-hz-topology-focus-filter-visibility={isGraphDock ? 
'assistive' : 'visible'}
+            
data-hz-topology-focus-filter-visibility-owner="hertzbeat-ui-focus-trail-filter-visibility"
+            data-hz-topology-focus-filter-deduped-by={isGraphDock ? 
'topology-toolbar' : undefined}
           >
             {filters.map(filter => {
               const { id, label: filterLabel, value, className: 
filterClassName, ...filterProps } = filter;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to