Add account based multiplayer hosting and bug report retention

This commit is contained in:
2026-10-10 16:24:34 +05:00
parent 9af71c85c2
commit fc6da6756d
33 changed files with 1538 additions and 102 deletions

View File

@@ -3,6 +3,7 @@ import { randomUUID } from "node:crypto";
import { after } from "next/server";
import { admin, required } from "./supabase";
import { LinearSupportClient } from "./linear-support-client";
import { scheduleBugCleanup } from "./bug-lifecycle";
export function supportReady() {
return !!(
@@ -58,13 +59,20 @@ export async function syncBugReport(id: string) {
.update({
issue_synced: true,
linear_identifier: issue.identifier,
state: "open",
})
.eq("id", id)
.eq("lease_owner", worker)
.select("id")
.single(),
);
required(
await db
.from("bug_reports")
.update({ state: "open" })
.eq("id", id)
.eq("state", "pending")
.select("id"),
);
}
required(
await db
@@ -102,6 +110,7 @@ export async function syncBugReport(id: string) {
.eq("lease_owner", worker)
.select("id"),
);
await scheduleBugCleanup(id);
} catch {
console.error("Bug report delivery paused; the saved report will retry.");
required(