From bd9c5bf9d17e9c480e406fedf6573f61d4022d9c Mon Sep 17 00:00:00 2001 From: root Date: Tue, 14 Jul 2026 03:34:37 +0200 Subject: [PATCH] =?UTF-8?q?refactor(web):=20=E9=87=8D=E5=86=99=E9=9D=9E=20?= =?UTF-8?q?Workbench=20=E5=B7=A5=E4=B8=9A=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/r6-architecture-parity.test.ts | 40 + .../src/components/common/EmptyState.vue | 7 +- .../src/components/common/EntityCard.vue | 13 +- .../components/common/ResourceCollection.vue | 45 +- .../src/components/console/ConsoleIcon.vue | 4 + .../src/components/layout/AppShell.vue | 9 +- web/hwlab-cloud-web/src/main.ts | 3 +- web/hwlab-cloud-web/src/styles/console-r2.css | 724 ++++++++++++++++++ .../{console-legacy.css => console-shell.css} | 2 +- web/hwlab-cloud-web/src/views/SkillsView.vue | 3 +- .../src/views/admin/ProviderProfilesView.vue | 3 +- .../src/views/projects/ProjectsView.vue | 5 +- .../src/views/user/ApiKeysView.vue | 5 +- 13 files changed, 844 insertions(+), 19 deletions(-) create mode 100644 web/hwlab-cloud-web/src/styles/console-r2.css rename web/hwlab-cloud-web/src/styles/{console-legacy.css => console-shell.css} (99%) diff --git a/web/hwlab-cloud-web/scripts/r6-architecture-parity.test.ts b/web/hwlab-cloud-web/scripts/r6-architecture-parity.test.ts index 7b3bc780..2d69b01b 100644 --- a/web/hwlab-cloud-web/scripts/r6-architecture-parity.test.ts +++ b/web/hwlab-cloud-web/scripts/r6-architecture-parity.test.ts @@ -218,6 +218,46 @@ test("R6 MDTODO task rows expose opaque task references", () => { assert.match(taskTreeSource, /:data-task-ref="task\.taskRef"/u); }); +test("R2 console rewrite owns the final visual layer and removes private letter glyphs", () => { + const mainSource = read("src/main.ts"); + assert.match(mainSource, /console-shell\.css/u); + assert.match(mainSource, /console-r2\.css/u); + assert.doesNotMatch(mainSource, /console-legacy\.css/u); + + const iconSource = read("src/components/console/ConsoleIcon.vue"); + for (const icon of ["menu", "info", "logout", "empty", "project", "key", "provider", "skills"]) + assert.match(iconSource, new RegExp(`\\b${icon}:`, "u"), `ConsoleIcon should define ${icon}`); + + const migratedViews = [ + "src/components/common/EmptyState.vue", + "src/views/SkillsView.vue", + "src/views/projects/ProjectsView.vue", + "src/views/admin/ProviderProfilesView.vue", + "src/views/user/ApiKeysView.vue", + ]; + for (const relativePath of migratedViews) { + const source = read(relativePath); + assert.match(source, /ConsoleIcon/u, `${relativePath} should use the shared icon system`); + assert.doesNotMatch(source, />\s*(?:SK|PJ|AI|KEY|HW)\s* { const issueBody = readIssueBodyFixture(); assert.match(issueBody, /Wei-Shaw\/sub2api@v0\.1\.136=a2f76e4/u); diff --git a/web/hwlab-cloud-web/src/components/common/EmptyState.vue b/web/hwlab-cloud-web/src/components/common/EmptyState.vue index 28667557..36a9ae5b 100644 --- a/web/hwlab-cloud-web/src/components/common/EmptyState.vue +++ b/web/hwlab-cloud-web/src/components/common/EmptyState.vue @@ -1,14 +1,17 @@