From 03d3cf410e0fceed130d9ecdbc11ab680b44e499 Mon Sep 17 00:00:00 2001 From: Thomas Deverin Date: Tue, 31 Mar 2026 15:05:38 -0400 Subject: [PATCH 1/7] Added game logic unplugged activity --- frontend/src/util/UnpluggedBooks.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/src/util/UnpluggedBooks.ts b/frontend/src/util/UnpluggedBooks.ts index b46682f7..f1c3232e 100644 --- a/frontend/src/util/UnpluggedBooks.ts +++ b/frontend/src/util/UnpluggedBooks.ts @@ -125,4 +125,22 @@ export const unpluggedBooks = [ title: "Recipe for LLMs", link: "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/LLMs_Lesson_Plan.pdf", }, + { + author: "Jenna", + blurb: "Learn how games \"think\" by exploring if-statements and loops through videos, activities, and gameplay.", + bookCover: "/color_2.png", + category: "UNPLUGGED", + courses: [], + coverImage: + "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/controller.jpg", + id: 9999992, + owner: null, + ownerId: 16, + pages: [], + published: true, + readyForPublish: false, + tags: [], + title: " Intro to Game Logic", + link: "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/Intro_to_Game_Logic.pdf", + }, ]; From e2683e9416a8ec2051ede4f0673724d5882e5714 Mon Sep 17 00:00:00 2001 From: Thomas Deverin Date: Tue, 31 Mar 2026 15:07:31 -0400 Subject: [PATCH 2/7] Run format --- frontend/src/util/UnpluggedBooks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/util/UnpluggedBooks.ts b/frontend/src/util/UnpluggedBooks.ts index f1c3232e..0cffb2d9 100644 --- a/frontend/src/util/UnpluggedBooks.ts +++ b/frontend/src/util/UnpluggedBooks.ts @@ -127,7 +127,8 @@ export const unpluggedBooks = [ }, { author: "Jenna", - blurb: "Learn how games \"think\" by exploring if-statements and loops through videos, activities, and gameplay.", + blurb: + 'Learn how games "think" by exploring if-statements and loops through videos, activities, and gameplay.', bookCover: "/color_2.png", category: "UNPLUGGED", courses: [], From d2daa1d77da2b804e525dd8e6961a05616677fc8 Mon Sep 17 00:00:00 2001 From: scout517 <58794291+scout517@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:23:51 -0400 Subject: [PATCH 3/7] Pin black version to 24.1.1 in workflow --- .github/workflows/check-formatting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index cc36b53d..b4c14ed1 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -22,7 +22,7 @@ jobs: run: | cd backend && pip install . && - pip install black ruff pyright && + pip install black==24.1.1 ruff pyright && prisma generate - name: Setup Bun From fea8a5161fdd6ffc039cd81bc9de6880e8c5e877 Mon Sep 17 00:00:00 2001 From: Thomas Deverin Date: Tue, 31 Mar 2026 15:54:01 -0400 Subject: [PATCH 4/7] Fix schema difference --- frontend/src/api/models/ValidationError.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/api/models/ValidationError.ts b/frontend/src/api/models/ValidationError.ts index aed8da76..fddc0ddc 100644 --- a/frontend/src/api/models/ValidationError.ts +++ b/frontend/src/api/models/ValidationError.ts @@ -6,4 +6,6 @@ export type ValidationError = { loc: Array; msg: string; type: string; + input?: any; + ctx?: Record; }; From 757f59f5555823af1ac2c62a6c475d2705519ade Mon Sep 17 00:00:00 2001 From: Thomas Deverin Date: Tue, 31 Mar 2026 21:51:42 -0400 Subject: [PATCH 5/7] Fix schema --- frontend/src/components/ImageUploadSection.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/ImageUploadSection.tsx b/frontend/src/components/ImageUploadSection.tsx index 01642a38..7e043f93 100644 --- a/frontend/src/components/ImageUploadSection.tsx +++ b/frontend/src/components/ImageUploadSection.tsx @@ -22,18 +22,16 @@ export function ImageUploadSection({ console.log("File size:", file.size); console.log("File lastModified:", new Date(file.lastModified)); - // Verify file is readable const fileContent = await file.arrayBuffer(); console.log("File content length:", fileContent.byteLength); - // Create the form data object matching the generated type - const formData: Body_upload_image_images_post = { - image: file, - }; + // Temporary workaround: generated type says string, but backend expects a file upload + const formData = { + image: file as any, + } as Body_upload_image_images_post; console.log("Sending request..."); - // Use the generated ImagesService const result = await ImagesService.uploadImageImagesPost(formData); console.log("Upload successful:", result); @@ -50,7 +48,6 @@ export function ImageUploadSection({ console.error("Error body:", error.body); console.error("Error message:", error.message); - // Handle validation errors if (error.status === 422) { const detail = error.body?.detail || "Invalid image data"; throw new Error(`Validation error: ${JSON.stringify(detail)}`); @@ -60,7 +57,6 @@ export function ImageUploadSection({ throw new Error(error.body?.detail || "Bad request - invalid image"); } - // Handle API errors if (error.body?.detail) { throw new Error(error.body.detail); } From 8b34779ca10886397ea1a3a9082c50edb8297c16 Mon Sep 17 00:00:00 2001 From: Thomas Deverin Date: Tue, 31 Mar 2026 21:57:01 -0400 Subject: [PATCH 6/7] fix schema 2 --- frontend/src/api/models/Body_upload_image_images_post.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/models/Body_upload_image_images_post.ts b/frontend/src/api/models/Body_upload_image_images_post.ts index 0001d0e5..21c665cf 100644 --- a/frontend/src/api/models/Body_upload_image_images_post.ts +++ b/frontend/src/api/models/Body_upload_image_images_post.ts @@ -3,5 +3,5 @@ /* tslint:disable */ /* eslint-disable */ export type Body_upload_image_images_post = { - image: Blob; + image: string; }; From 38bb51a4c78a22c6655bd6a659e702e611effc74 Mon Sep 17 00:00:00 2001 From: Thomas Deverin Date: Tue, 31 Mar 2026 22:31:17 -0400 Subject: [PATCH 7/7] Added various unplugged activities --- frontend/src/util/UnpluggedBooks.ts | 76 ++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/frontend/src/util/UnpluggedBooks.ts b/frontend/src/util/UnpluggedBooks.ts index 0cffb2d9..5f4f5698 100644 --- a/frontend/src/util/UnpluggedBooks.ts +++ b/frontend/src/util/UnpluggedBooks.ts @@ -141,7 +141,81 @@ export const unpluggedBooks = [ published: true, readyForPublish: false, tags: [], - title: " Intro to Game Logic", + title: "Intro to Game Logic", link: "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/Intro_to_Game_Logic.pdf", }, + { + author: "Martin", + blurb: + "Learn about algorithms and why clear, step-by-step instructions are important in programming.", + bookCover: "/color_1.png", + category: "UNPLUGGED", + courses: [], + coverImage: + "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/shoelace.png", + id: 9999991, + owner: null, + ownerId: 16, + pages: [], + published: true, + readyForPublish: false, + tags: [], + title: "Shoelace Algorithms", + link: "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/Shoelace_Algorithms.pdf", + }, + { + author: "Martin", + blurb: + "Learn about For Loops in programming and how they help make code shorter and more efficient.", + bookCover: "/color_7.png", + category: "UNPLUGGED", + courses: [], + coverImage: + "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/lego_for_loop.png", + id: 9999990, + owner: null, + ownerId: 16, + pages: [], + published: true, + readyForPublish: false, + tags: [], + title: "Lego For Loops", + link: "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/Lego_For_Loops.pdf", + }, + { + author: "Martin", + blurb: "Learn about how computers learn.", + bookCover: "/color_8.png", + category: "UNPLUGGED", + courses: [], + coverImage: + "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/supervised_learning.png", + id: 9999989, + owner: null, + ownerId: 16, + pages: [], + published: true, + readyForPublish: false, + tags: [], + title: "Supervised vs Unsupervised Learning", + link: "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/Supervised_v_Unsupervised_Learning.pdf", + }, + { + author: "Martin", + blurb: "Explore how AI makes decisions by playing Rock Paper Scissors.", + bookCover: "/color_3.png", + category: "UNPLUGGED", + courses: [], + coverImage: + "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/rock_paper_scissors.png", + id: 9999988, + owner: null, + ownerId: 16, + pages: [], + published: true, + readyForPublish: false, + tags: [], + title: "Rock Paper Scissors AI Activity", + link: "https://codekids-minio.endeavour.cs.vt.edu/codekids/unplugged/Rock_Paper_Scissors_AI_Activity.pdf", + }, ];