From f77ab9b0a0ec65b061cb856c6bc051c23f61361f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Tue, 19 May 2026 00:17:59 +0800 Subject: [PATCH] Stabilize workspace preview coverage timing The workspace long-file preview test regularly crosses ten seconds under V8 coverage instrumentation even though the behavior passes. Raising its explicit timeout keeps the coverage lane aligned with the runtime it already observes. Constraint: PR verification runs the full desktop test suite under coverage, which adds substantial highlighting overhead for this fixture. Rejected: Change the component rendering path | the failure was a coverage-mode test timeout, not a product regression. Confidence: high Scope-risk: narrow Tested: cd desktop && bun run test -- src/components/workspace/WorkspacePanel.test.tsx --run --coverage --coverage.reporter=json-summary --coverage.reporter=lcov --coverage.reportsDirectory=/tmp/cc-haha-workspace-panel-coverage --testTimeout=20000 Tested: bun run check:native Tested: bun run check:coverage Tested: git diff --check --- desktop/src/components/workspace/WorkspacePanel.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/src/components/workspace/WorkspacePanel.test.tsx b/desktop/src/components/workspace/WorkspacePanel.test.tsx index f5bfaf0c..b2d36688 100644 --- a/desktop/src/components/workspace/WorkspacePanel.test.tsx +++ b/desktop/src/components/workspace/WorkspacePanel.test.tsx @@ -970,7 +970,7 @@ describe('WorkspacePanel', () => { expect(view.getByTestId('workspace-code').textContent).toContain('const line2300 = 2300') }) expect(view.getByRole('button', { name: 'Collapse preview' })).toBeTruthy() - }, 10_000) + }, 20_000) it('renders image previews from workspace files', async () => { await setWorkspaceState((state) => ({