Skip to content

v1.0.61 - Curriculum Delete & Video Not Found Fix

Choose a tag to compare

@parthasdey2304 parthasdey2304 released this 11 Sep 09:50
· 1 commit to main since this release
da9f195

Vastavik Learning v1.0.61 - Release Notes

Welcome to Vastavik Learning v1.0.61! This release fixes the Curriculum Editor delete flow and the “Video not found” error that appeared for every lesson, plus the underlying backend lesson-resolution that was hitting the wrong document.


What's New and Improved

1. Curriculum Editor — Delete for Lessons and Collections

  • Per-lesson delete: each lesson row in String in Java / Functions in Java / Array in Java now shows a trash button on the right. Tap → confirm Delete lesson "X" from this part? → optional second confirm Also delete the linked video file itself? → the row disappears optimistically, rolls back and shows an alert if the server fails, then refetches. Uses hooks/useCourses.ts: add removeLessonFromPart / removePart (optimistic + localStorage + DELETE /admin/courses/{cid}/parts/{pid}/subparts/{sid}?delete_video=true).
  • Per-collection delete: each part header (1 String in Java — 4 lessons, 2 Functions in Java — 1 lessons, 3 Array in Java — 0 lessons) now has Delete Part next to Add Video Lesson (red outline, trash icon). Confirm → deletes the whole part and all its lessons.
  • Backend: new DELETE /admin/courses/{courseId}/parts/{partId}/subparts/{subpartId} (cascades nested lessons subcollection, optional ?delete_video=true for flat videos/{id}, then invalidate_catalog_cache()) and DELETE /admin/courses/{courseId}/parts/{partId} (cascades all subparts + nested lessons) in app/routers/admin_dashboard.py:1911.

2. “Video not found — pull to refresh Learn and try again” Fixed for Every Lesson

  • Root cause: GET /api/v1/courses/{id}/curriculum returns lesson_id = subpart.lesson_id or subpart_doc.id. For manually created subparts with no lesson_id field, the app received the subpart doc ID (e.g. 8kdGIQMKX7dCbBv81m1D in your screenshot) as the lesson ID, but db.get_lesson() only searched flat videos + collection_group("lessons") — never the subpart itself.
  • Backend fix: app/db/firebase.py:472 get_lesson now has step 3 — collection_group("subparts") search: if the subpart doc itself carries youtubeUrl/youtubeVideoId it is returned as a lesson, else its nested lessons subcollection is checked (exact id, else first), else the linked flat videos/{lesson_id} is followed. Added get_lesson_by_subpart(course, part, subpart) and new GET /api/v1/lessons/by-subpart/{course}/{part}/{subpart} in app/routers/catalog.py:129 that reuses the same premium/normalization path.
  • App fix: VideoLessonViewModel.kt:36 now tries getLessonV1(lessonId) (title/desc/whiteboard/code), then getLessonBySubpart(course, part, subpart) (fixes your “Testing — vid_1789106985472” and all 8kd... cases), then legacy getLesson, then one-shot streamLessons().first() with timeout — never hangs, always clears isLoading with a clear Retry / Back to Learn error instead of a spinner.
  • If videos still 404 after deploy: GET /api/v1/health/firestore on the backend will now report use_live_firestore: false with an explicit in-memory warning — set FIREBASE_CREDENTIALS_BASE64 on Render so uploads persist and are visible to the app's direct Firestore listeners.

3. Version Bump for Hotfix

  • App versionCode 61 / versionName 1.0.61 (app/build.gradle.kts:21) and Companion versionCode 28 / versionName 1.0.61 (companion-codeoss/build.gradle.kts:15).

Release Assets

Asset Description Size
vastavikLearning-v1.0.61.apk Main Vastavik Learning Android app (versionCode 61, versionName 1.0.61, minSdk 24, targetSdk 35) ~59.3 MB
vastavik-codeoss-extension.apk CodeOSS Companion Extension Pack with Monaco/VS Code Web and Ubuntu Terminal (versionCode 28, versionName 1.0.61) ~13.4 MB

Upgrade Notes

  • Install vastavikLearning-v1.0.61.apk over your existing build — user data, login session, and user_profile prefs are preserved. The companion APK is side-by-side.
  • After upgrading, open Curriculum Editor — every lesson row now has a trash button and every part header has Delete Part. After deleting, pull to refresh Learn (the Refresh button on the Learn row) and the Duolingo path updates instantly.
  • If a video still shows “Video not found” after an admin upload, check GET /api/v1/health/firestore on the backend — an in-memory warning there means Firestore credentials are missing on Render.

Built with love by the Vastavik Learning Team