From 47463b79a7dcf1559d03fd06611e39c7a2dec7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=93=E8=89=AF?= <1204183885@qq.com> Date: Fri, 2 Oct 2026 03:34:00 +0000 Subject: [PATCH] chore: drop the unanchored workspace/ ignore rule that hides web-shell sources (#13155) * chore: drop the unanchored workspace/ ignore rule that hides web-shell sources The bare `workspace/` line under the brand-builder section matches every directory named workspace at any depth, including the tracked source tree packages/web-shell/client/daemon/workspace/. Its 34 files are tracked but ignored, so a new file there never shows in git status and git add -A skips it silently (a test in #13154 was nearly left out this way). Nothing in the repo creates a workspace/ directory: the desktop brand builder writes to brand-builds/, which stays ignored. The line arrived in a squashed history import (99fd76553e), so its original intent cannot be recovered from git. * style(web-shell): format the two daemon/workspace tests prettier never saw Prettier honours .gitignore, so the old bare `workspace/` rule also kept packages/web-shell/client/daemon/workspace/ out of the formatting gate. With the rule gone the gate checks the directory and flags these two files; this is prettier --write output only. --- .gitignore | 1 - .../workspace/DaemonWorkspaceProvider.test.tsx | 12 +++++++++--- .../daemon/workspace/hooks/useDaemonSkills.test.tsx | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 7e1bf71edb..2f73a6e96c 100644 --- a/.gitignore +++ b/.gitignore @@ -147,7 +147,6 @@ tmp/ # Brand build workspaces (created by the desktop-brand-builder skill) brand-builds/ -workspace/ # Dependencies install with pnpm from pnpm-lock.yaml; keep an npm install # from bringing the retired root lockfile back. diff --git a/packages/web-shell/client/daemon/workspace/DaemonWorkspaceProvider.test.tsx b/packages/web-shell/client/daemon/workspace/DaemonWorkspaceProvider.test.tsx index 3d8cfe5a0e..dcf305421e 100644 --- a/packages/web-shell/client/daemon/workspace/DaemonWorkspaceProvider.test.tsx +++ b/packages/web-shell/client/daemon/workspace/DaemonWorkspaceProvider.test.tsx @@ -872,7 +872,10 @@ describe('DaemonWorkspaceProvider', () => { const root = createRoot(container); await act(async () => { root.render( - + , ); @@ -884,7 +887,10 @@ describe('DaemonWorkspaceProvider', () => { await act(async () => { root.render( - + , ); @@ -960,7 +966,7 @@ describe('DaemonWorkspaceProvider', () => { container.remove(); }); - it('never publishes the previous client\'s brand on the re-point commit', async () => { + it("never publishes the previous client's brand on the re-point commit", async () => { // The reset lives in the render that observes the client change, so no // committed frame may carry daemon A's brand beside daemon B's baseUrl — // a consumer effect keyed on baseUrl must see the reset state. diff --git a/packages/web-shell/client/daemon/workspace/hooks/useDaemonSkills.test.tsx b/packages/web-shell/client/daemon/workspace/hooks/useDaemonSkills.test.tsx index 8d9b53ac66..9596d0b452 100644 --- a/packages/web-shell/client/daemon/workspace/hooks/useDaemonSkills.test.tsx +++ b/packages/web-shell/client/daemon/workspace/hooks/useDaemonSkills.test.tsx @@ -425,9 +425,9 @@ describe('useDaemonSkills', () => { await act(async () => vi.advanceTimersByTimeAsync(5_000)); - expect( - mocks.workspaceClient.workspaceRuntimeSkills, - ).toHaveBeenCalledTimes(2); + expect(mocks.workspaceClient.workspaceRuntimeSkills).toHaveBeenCalledTimes( + 2, + ); expect(result?.skills.map((skill) => skill.name)).toEqual([ 'configured', 'runtime-only',