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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user