Write project.json to the storage owner prefix.

update_project used meta.user_id for the path, so JWT projects that still
have user_id=local never persisted pcb_status=queued and the PCB worker
exited as draft. Point writes at the prefix used to read the project.
This commit is contained in:
2026-09-20 00:57:15 +02:00
parent 344ecb3389
commit 3e2ba269f9
3 changed files with 63 additions and 6 deletions
@@ -28,6 +28,7 @@ export default function PcbReviewPage({
const { id } = use(params);
const [projectName, setProjectName] = useState("");
const [pcbStatus, setPcbStatus] = useState<string>("draft");
const [analysisBusy, setAnalysisBusy] = useState(false);
const [inventory, setInventory] = useState<{
nets: Array<Record<string, unknown>>;
domains: string[];
@@ -49,6 +50,7 @@ export default function PcbReviewPage({
.then((p) => {
setProjectName(p.name);
setPcbStatus(p.pcbStatus ?? "draft");
setAnalysisBusy(p.status === "running" || p.status === "queued");
setStatusLoaded(true);
})
.catch(() => setStatusLoaded(true));
@@ -198,8 +200,19 @@ export default function PcbReviewPage({
</Card>
)}
{statusLoaded && pcbStatus === "draft" && analysisBusy && (
<p className="text-sm text-muted-foreground">
Schematic review is still running. Wait for it to finish (or cancel
it), then start PCB review the two jobs cannot run at the same time.
</p>
)}
{statusLoaded && pcbStatus === "draft" && (
<Button size="sm" disabled={starting} onClick={handleStart}>
<Button
size="sm"
disabled={starting || analysisBusy}
onClick={handleStart}
>
<CircuitBoard className="h-4 w-4 mr-1" />
{starting ? "Starting…" : "Run PCB review"}
</Button>