diff --git a/src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte b/src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte
index d0b4c2abe..7cd30b38b 100644
--- a/src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte
+++ b/src/routes/projects/[projectId]/sessions/[sessionId]/+page.svelte
@@ -1,9 +1,8 @@
@@ -78,36 +64,30 @@
previousSesssion={$previousSesssion}
/>
+
- {#each Object.entries(files) as [filepath, contentAtSessionStart]}
- {#if $deltas[filepath]}
-
-
- {filepath}
-
-
-
- {/if}
- {/each}
-
-
- {#each Object.entries($deltas) as [filepath, deltas]}
-
-
{filepath}
-
- {#each deltas as delta}
-
- {delta.operations.length}
-
- {/each}
+ {#each Object.entries($docsNext) as [filepath, content]}
+
+ {filepath}
+
+
+ {#each $deltas[filepath] as delta, i}
+
+ {/each}
+
+
-
+
{/each}
diff --git a/src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts b/src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts
index c43f58d8c..57d138cf3 100644
--- a/src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts
+++ b/src/routes/projects/[projectId]/sessions/[sessionId]/+page.ts
@@ -1,5 +1,5 @@
import type { PageLoad } from "./$types";
-import { derived, readable } from "svelte/store";
+import { derived, readable, writable } from "svelte/store";
import { building } from "$app/environment";
import type { Delta } from "$lib/deltas";
@@ -19,8 +19,10 @@ export const load: PageLoad = async ({ parent, params }) => {
sessionId: params.sessionId,
});
return {
- session: derived(sessions, (sessions) =>
- sessions.find((session) => session.id === params.sessionId)
+ session: derived(sessions, (sessions) => {
+ const result = sessions.find((session) => session.id === params.sessionId)
+ return result ? result : sessions[0];
+ }
),
previousSesssion: derived(sessions, (sessions) => {
const currentSessionIndex = sessions.findIndex(