Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
perf(ci): shorten WebUI feedback latency
chengyongruf869212e7d80
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 1b5fe26e6..ec325bafb 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -278,7 +278,8 @@ jobs:tests/cli/test_wsl_browser.py--durations=25 --durations-min=1.0- webui:+ webui_checks:+ name: WebUI checks and buildneeds: changesif: needs.changes.outputs.webui_required == 'true'runs-on: ubuntu-latest@@ -316,6 +317,29 @@ jobs:working-directory: webuirun: bun run test:coverage+ - name: Build WebUI+ working-directory: webui+ run: bun run build++ webui_browser:+ name: WebUI browser+ needs: changes+ if: needs.changes.outputs.webui_required == 'true'+ runs-on: ubuntu-latest+ timeout-minutes: 15++ steps:+ - uses: actions/checkout@v4++ - name: Set up Bun+ uses: oven-sh/setup-bun@v2+ with:+ bun-version: 1.3.6++ - name: Install WebUI dependencies+ working-directory: webui+ run: bun install --frozen-lockfile+- name: Install browser for layout regressionsworking-directory: webuirun: bun x playwright install --with-deps chromium@@ -324,9 +348,19 @@ jobs:working-directory: webuirun: bun run test:browser- - name: Build WebUI- working-directory: webui- run: bun run build+ webui:+ needs: [changes, webui_checks, webui_browser]+ if: always() && needs.changes.outputs.webui_required == 'true'+ runs-on: ubuntu-latest+ timeout-minutes: 1++ steps:+ # Keep the existing check name dependent on every WebUI acceptance check.+ - name: Require both WebUI jobs to pass+ env:+ CHECKS_RESULT: ${{ needs.webui_checks.result }}+ BROWSER_RESULT: ${{ needs.webui_browser.result }}+ run: test "$CHECKS_RESULT" = success && test "$BROWSER_RESULT" = successtui:needs: changesdiff --git a/webui/src/tests/settings-models.test.tsx b/webui/src/tests/settings-models.test.tsxindex a2bdcd3b2..5e93efcd0 100644--- a/webui/src/tests/settings-models.test.tsx+++ b/webui/src/tests/settings-models.test.tsx@@ -666,10 +666,12 @@ describe("Settings models", () => {await togglePresetEditor();fireEvent.click(screen.getByRole("button", { name: /Advanced options/ }));const input = screen.getByRole("textbox", { name: "Context window" });+ vi.useFakeTimers();fireEvent.change(input, { target: { value } });expect(input).toHaveAttribute("aria-invalid", "true");expect(input).toHaveAccessibleDescription("Enter a positive token count, such as 200k, 1m, or 131072.");- await new Promise((resolve) => setTimeout(resolve, 750));+ await act(() => vi.advanceTimersByTimeAsync(750));+ vi.useRealTimers();expect(requestMutationMock).not.toHaveBeenCalled();expect(input).toHaveValue(value);returnToPresetEditor();@@ -700,10 +702,12 @@ describe("Settings models", () => {input = screen.getByRole("textbox", { name: "Max output tokens" });expect(input).toHaveValue("32k");requestMutationMock.mockClear();+ vi.useFakeTimers();fireEvent.change(input, { target: { value: "" } });expect(input).toHaveAttribute("aria-invalid", "true");expect(presetSaveButton()).toBeDisabled();- await new Promise((resolve) => setTimeout(resolve, 750));+ await act(() => vi.advanceTimersByTimeAsync(750));+ vi.useRealTimers();expect(requestMutationMock).not.toHaveBeenCalled();fireEvent.change(input, { target: { value: "8.192k" } });returnToPresetEditor();