源码快照 @ 2026-09-02 (source-only, 剔除非源码素材)

This commit is contained in:
agent-radar
2026-09-02 01:05:41 +08:00
commit 04bac1f6e2
2200 changed files with 489415 additions and 0 deletions
@@ -0,0 +1,41 @@
/** @jsxImportSource react */
import { describe, expect, test } from "bun:test";
import { renderToStaticMarkup } from "react-dom/server";
import { DotMatrixLoader } from "../src/components/ui/dot-matrix-loader";
import { shouldTickWorkspaceElapsedClock } from "../src/react-app/domains/workspace/create-workspace-modal-state";
describe("render cycle state", () => {
test("only advances the workspace elapsed clock for visible progress", () => {
expect(shouldTickWorkspaceElapsedClock({
open: true,
submitting: true,
startedAt: 100,
})).toBe(true);
expect(shouldTickWorkspaceElapsedClock({
open: false,
submitting: true,
startedAt: 100,
})).toBe(false);
expect(shouldTickWorkspaceElapsedClock({
open: true,
submitting: true,
startedAt: null,
})).toBe(false);
expect(shouldTickWorkspaceElapsedClock({
open: true,
submitting: false,
startedAt: 100,
})).toBe(false);
});
test("renders the task activity mark as nine CSS-animated dots", () => {
const html = renderToStaticMarkup(<DotMatrixLoader label="Running" />);
expect(html.match(/ow-dot-matrix-dot/g)).toHaveLength(9);
expect(html).toContain("ow-dot-matrix-frame-a");
expect(html).toContain("ow-dot-matrix-frame-g");
expect(html).toContain('role="status"');
expect(html).toContain('aria-label="Running"');
});
});