From 961615b88c42c1335b524ffea6656df7bb2275a3 Mon Sep 17 00:00:00 2001 From: bruce Date: Thu, 4 Jun 2026 04:24:32 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=94=B6=E5=8F=A3=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=8C=87=E6=8C=A5=E5=8F=B0=E5=9B=9B=E5=85=A5=E5=8F=A3=E4=B8=BB?= =?UTF-8?q?=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/platform_ui/services.py | 4 +- templates/platform_ui/command_center_v2.html | 42 +++++++++++++++----- tests/test_platform_ui.py | 24 +++++++++++ 3 files changed, 58 insertions(+), 12 deletions(-) diff --git a/apps/platform_ui/services.py b/apps/platform_ui/services.py index 9238926..5ba4038 100644 --- a/apps/platform_ui/services.py +++ b/apps/platform_ui/services.py @@ -33,8 +33,8 @@ def get_platform_demo_context(): quick_links = [ {"title": "知识库配置", "url_name": "platform_ui:knowledge-base", "desc": "维护法规规则树与切片策略"}, {"title": "文件中心", "url_name": "documents:list", "desc": "查看上传、解析、切片与异常状态"}, - {"title": "审核工作台", "url_name": "chat:index", "desc": "发起审核、抽取与一致性核查演示"}, - {"title": "工作台大屏", "url_name": "platform_ui:command-center", "desc": "面向演示的 Agent 流程解释大屏"}, + {"title": "审核智能体", "url_name": "chat:index", "desc": "发起审核、抽取与一致性核查演示"}, + {"title": "审核指挥台", "url_name": "platform_ui:command-center", "desc": "面向演示的 Agent 流程解释大屏"}, ] knowledge_sources = [ { diff --git a/templates/platform_ui/command_center_v2.html b/templates/platform_ui/command_center_v2.html index 799b447..b009a90 100644 --- a/templates/platform_ui/command_center_v2.html +++ b/templates/platform_ui/command_center_v2.html @@ -61,6 +61,22 @@ padding: 8px 0; } + .nav-group { + display: grid; + gap: 4px; + } + + .nav-group + .nav-group { + margin-top: 12px; + } + + .nav-group-label { + padding: 10px 14px 6px; + color: rgba(220, 236, 255, 0.72); + font-size: 0.76rem; + letter-spacing: 0.08em; + } + .side-link { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; @@ -897,16 +913,22 @@
< 收起菜单 diff --git a/tests/test_platform_ui.py b/tests/test_platform_ui.py index fb355cb..38aa537 100644 --- a/tests/test_platform_ui.py +++ b/tests/test_platform_ui.py @@ -212,3 +212,27 @@ def test_command_center_v2_uses_unified_four_entry_labels(client): assert "法规库" not in content assert "智能审核" not in content assert "统计分析" not in content + + +def test_command_center_v2_uses_four_product_entries_as_primary_navigation(client): + response = client.get(reverse("platform_ui:command-center-v2")) + + content = response.content.decode("utf-8") + assert response.status_code == 200 + assert 'aria-label="一级产品入口"' in content + assert "一级产品" in content + assert "协同治理" in content + assert "审核指挥台" in content + assert "场景配置参考" in content + assert "任务中心" not in content + assert "工作台" not in content + + +def test_platform_demo_context_uses_agent_product_labels_for_quick_links(): + context = get_platform_demo_context() + titles = [item["title"] for item in context["quick_links"]] + + assert "审核智能体" in titles + assert "审核指挥台" in titles + assert "审核工作台" not in titles + assert "工作台大屏" not in titles