atagen

malice

public
Star0
Watch0

Commit 0bc1aca195fb

tarball

atagen <boss@atagen.co>2026-10-28 07:49 UTC

1 file changed+19-3
web: drop the splash before the restored room finishes opening

boot() awaited restoreRoute, which awaited openRoom and, for a space route, getSpaceChildren, so the whole app sat behind "Loading Malice…" until the engine had restored the room. On a cold engine catching up 500 rooms that took several seconds, while the room list was already available.
Modified file: web/src/App.svelte+19 additions−3 deletions
@@ -299,10 +299,26 @@
299299 } else if (roomId && $rooms.some((room) => room.room_id === roomId && !room.space)) {
300300 selectedSpaceId = spaceId && $rooms.some((room) => room.room_id === spaceId && room.space) ? spaceId : null;
301301 spaceChildrenError = null;
302- spaceChildIds = selectedSpaceId ? (await getSpaceChildren(selectedSpaceId)).room_ids ?? [] : null;
303- await selectRoom(roomId);
302+ spaceChildIds = null;
303+ void selectRoom(roomId);
304+ const space = selectedSpaceId;
305+ if (space) {
306+ spaceChildrenLoading = true;
307+ void getSpaceChildren(space)
308+ .then((res) => {
309+ if (selectedSpaceId === space) spaceChildIds = res.room_ids ?? [];
310+ })
311+ .catch((e) => {
312+ if (selectedSpaceId !== space) return;
313+ spaceChildrenError = e instanceof Error ? e.message : 'Could not load rooms in this space';
314+ spaceChildIds = [];
315+ })
316+ .finally(() => {
317+ if (selectedSpaceId === space) spaceChildrenLoading = false;
318+ });
319+ }
304320 } else if (spaceId && $rooms.some((room) => room.room_id === spaceId && room.space)) {
305- await selectSpace(spaceId);
321+ void selectSpace(spaceId);
306322 } else {
307323 await selectHome();
308324 }