源码快照 @ 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,26 @@
import { describe, expect, test } from "bun:test";
import { cloudSessionOrganizationFromSettings } from "../src/react-app/domains/settings/cloud/cloud-session-provider";
describe("Cloud session settings projection", () => {
test("restores the persisted active organization for late settings updates", () => {
expect(cloudSessionOrganizationFromSettings({
activeOrgId: " org_123 ",
activeOrgName: " OpenWork Labs ",
activeOrgSlug: " openwork-labs ",
})).toEqual({
id: "org_123",
name: "OpenWork Labs",
role: "member",
slug: "openwork-labs",
});
});
test("does not invent an organization before one is persisted", () => {
expect(cloudSessionOrganizationFromSettings({
activeOrgId: null,
activeOrgName: null,
activeOrgSlug: null,
})).toBeNull();
});
});