feat(deploy): notify clients of new releases
CI / Verify (push) Successful in 1m8s
CI / Build immutable images and deploy (push) Has been skipped

This commit is contained in:
2026-08-29 07:13:04 +00:00 Unverified
parent 6fe6d8fd95
commit be095ab236
10 changed files with 162 additions and 1 deletions
+14
View File
@@ -110,6 +110,20 @@ describe("production deployment contract", () => {
);
expect(workflow).not.toMatch(/playwright|chromium/iu);
});
it("mounts the deployment stream and offers a full reload for new releases", async () => {
const [layout, notifier, route] = await Promise.all([
repositoryFile("app/layout.tsx"),
repositoryFile("components/deployment-update-notifier.tsx"),
repositoryFile("app/api/active/route.ts"),
]);
expect(layout).toContain("<DeploymentUpdateNotifier");
expect(notifier).toContain('new EventSource("/api/active")');
expect(notifier).toContain("window.location.reload()");
expect(notifier).toContain('label: "รีโหลด"');
expect(route).toContain('channel.sendNamed("deployment", deploymentId)');
});
});
describe("environment template contract", () => {