From d7deaff393f6842ad4b0cb899dacbd8a7da8def5 Mon Sep 17 00:00:00 2001 From: Zakk Date: Sun, 4 Oct 2026 05:38:52 +1100 Subject: [PATCH] fix(widgets): drop the group widget's repeated title The dashboard card already carries the title, so the row label repeated it. The panel now names the widget the way it names every other one, by its title when titles are shown. --- src/shell/widgets/ContentPolicies.tsx | 22 ++++++++++------------ src/shell/widgets/layout.test.ts | 2 +- src/shell/widgets/layout.ts | 2 +- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/shell/widgets/ContentPolicies.tsx b/src/shell/widgets/ContentPolicies.tsx index 286d3c5e..b06ef06f 100644 --- a/src/shell/widgets/ContentPolicies.tsx +++ b/src/shell/widgets/ContentPolicies.tsx @@ -50,18 +50,16 @@ export function GroupWidget({item, onChange}: {item: Widget; onChange?: (item: W {selected ? ( <> - - ({id: group.id, label: group.name}))} - onChange={group => onChange?.({...item, group})} - searchLabel={t('ui.filterGroups')} - > - {selected.name} - - + ({id: group.id, label: group.name}))} + onChange={group => onChange?.({...item, group})} + searchLabel={t('ui.filterGroups')} + > + {selected.name} + ) : ( diff --git a/src/shell/widgets/layout.test.ts b/src/shell/widgets/layout.test.ts index 2b0c04da..1e884ff2 100644 --- a/src/shell/widgets/layout.test.ts +++ b/src/shell/widgets/layout.test.ts @@ -178,7 +178,7 @@ it.each([ ], ['lists', idsWith(definition => definition.rows), ['nodeLatency', 'ranking', 'notices', 'policyGroups', 'sourceHealth', 'outbounds', 'connectionOutbounds']], ['rates', idsWith(definition => definition.rate), ['speed', 'history', 'download', 'upload']], - ['untitled in the panel', idsWith(definition => definition.untitled), ['connections', 'cpu', 'global', 'group']], + ['untitled in the panel', idsWith(definition => definition.untitled), ['connections', 'cpu', 'global']], ['group choices', idsWith(definition => definition.groupChoice), ['nodeLatency', 'policyGroups', 'latency']] ])('derives the %s from the registry', (_name, derived, expected) => expect(derived).toEqual([...expected].sort())); it('names the Automatic group as each widget did', () => { diff --git a/src/shell/widgets/layout.ts b/src/shell/widgets/layout.ts index 6791388d..ba4cde75 100644 --- a/src/shell/widgets/layout.ts +++ b/src/shell/widgets/layout.ts @@ -71,7 +71,7 @@ const definitions = { outbounds: share('widgets.outbounds', 'runtime_outbounds'), mode: {...list('act.mode', 'config'), sizes: ['medium']}, global: {...list('act.global', 'config'), sizes: ['medium'], untitled: true}, - group: {...list('widgets.group', 'groups'), sizes: ['medium'], widest: '2/3', untitled: true}, + group: {...list('widgets.group', 'groups'), sizes: ['medium'], widest: '2/3'}, status: {...list('widgets.status', 'runtime'), sizes: ['medium'], forms: ['facts', 'kv'], compact: ['kv']}, notices: {...list('widgets.notices', 'events'), rows: true}, download: {...metric('ui.download', 'runtime'), tile: true, rate: true},