fix(canvas): handle board startup requests

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 545df520-6557-4211-a110-53c60f4b9f3a
This commit is contained in:
Aaron Powell
2026-10-12 13:49:34 +11:00
co-authored by Copilot App
parent 758f4382db
commit 01678e9489
2 changed files with 35 additions and 2 deletions
@@ -213,6 +213,7 @@ function routesFor(instanceId) {
function wrap(fn) {
return async (ctx) => {
try {
if (!store) throw new CanvasError("not_ready", "The extension is still starting. Retry the action.");
return await fn(ctx);
} catch (error) {
if (error instanceof CanvasError) throw error;
@@ -316,6 +317,7 @@ session = await joinSession({
},
],
open: async (ctx) => {
if (!store) throw new CanvasError("not_ready", "The extension is still starting. Retry opening it.");
let entry = servers.get(ctx.instanceId);
if (!entry) {
entry = await startBoardServer({